Open
Description
Description
In the application, there are two different behaviors when fetching the inject contract content:
- 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 :
- 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 :
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.