Refactor case import methods to avoid making a request to get caseFormat #129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a change in the POST /networks endpoint.
The change allows the caseFormat to be passed as a parameter instead of requesting the caseServer to retrieve the caseFormat.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Optimisation
What is the current behavior?
the importCase method relies on the "GET /v1/cases/caseUuid/infos" to fetch the case format from the case-server. However, this approach introduces unnecessary dependencies and potential network overhead.
What is the new behavior (if this is a feature change)?
This pull request modifies the importCase endpoint POST /networks in the NetworkConversionController to accept the caseFormat as a parameter instead of requesting the case-server to retrieve the case format.
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Users of the application will need to update their code to include the caseFormat parameter when calling the importCase endpoint. Previously, the caseFormat was obtained from the caseServer, but now it needs to be provided explicitly.
Other information: