Skip to content

feat(contracts): DRY refactoring of availableExpectations versus predefinedExpectations #305

Description

@guzmud

Backstory

The implementation for availableExpectations and predefinedExpectations defined in #304 , mirroring the implementation from OpenAEV-Platform/openaev#5148 and OpenAEV-Platform/openaev#5554, leads to maintaining two lists in each injectors that need to be synchronized (although the content will vary depending on the wanted user-experience).

This goes against the DRY principle and leads to an eventual desynchronisation between the two lists. Merging both variable to create a single availableExpectations list with a predefined flag per Expectation will provide the same feature while reducing the risk of desynchronisation and minimizing the codebase.

Current workaround

Maintain two fields in pyoaev for two lists inside each injectors.

Proposed solution

Add a predefined field to the Expectation object and merge both lists into a single one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageNeeds triage from the Filigran product team.technical improvementTechnical refactor or improvement is needed

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions