Skip to content

Improve injector contract content fetching #2452

Open
@MarineLeM

Description

@MarineLeM

Description

In the application, there are two different behaviors when fetching the inject contract content:

  1. Fetching inject contract content as a string
  • The backend returns the inject contract content as a string, which is then parsed on the frontend.
  • Example API endpoint: /api/injector_contracts/search (used when fetching all inject contracts for creating an atomic test).
    request answer :

Image

  1. Fetching inject contract content as both a string and a converted JSON property
  • The backend provides the inject contract content in two different formats
  • Example API endpoint: api/injects/{injectId}
    request answer :
    Image

Proposed Solution :

The inject contract content should always be returned as a JSON object, avoiding string parsing.

A possible improvement is to declare it as ContractContent in the backend instead of using ObjectNode, ensuring a clear and structured API response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureuse for describing a new feature to developtechnical improvementTechnical refactor or improvement is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions