Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor case import methods to avoid making a request to get caseFormat #129

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

jamal-khey
Copy link
Contributor

@jamal-khey jamal-khey commented Feb 5, 2024

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

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

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?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

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:

@jamal-khey jamal-khey self-assigned this Feb 6, 2024
@jamal-khey jamal-khey added the enhancement New feature or request label Feb 6, 2024
@jamal-khey jamal-khey force-pushed the add-case-format-param-to-import-case branch from 9ca6a3f to 95ed5c6 Compare February 6, 2024 13:40
@jamal-khey jamal-khey changed the title [WIP] Refactor case import methods to avoid making a request to get caseFormat Refactor case import methods to avoid making a request to get caseFormat Feb 6, 2024
@Meklo Meklo self-requested a review February 7, 2024 15:09
@jamal-khey jamal-khey force-pushed the add-case-format-param-to-import-case branch from 494670c to 40828b9 Compare February 13, 2024 08:35
Copy link

@jamal-khey jamal-khey requested a review from flomillot February 14, 2024 12:06
Copy link

@flomillot flomillot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code OK

@jamal-khey jamal-khey merged commit 8d17c44 into main Feb 16, 2024
4 checks passed
@jamal-khey jamal-khey deleted the add-case-format-param-to-import-case branch February 16, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants