Skip to content

[OSDEV-1778] Fix the validation for number of workers field in POST, PATCH production locations API#44

Merged
Innavin369 merged 3 commits intomainfrom
OSDEV-1778-fix-validation-for-number-of-workers
Feb 27, 2025
Merged

[OSDEV-1778] Fix the validation for number of workers field in POST, PATCH production locations API#44
Innavin369 merged 3 commits intomainfrom
OSDEV-1778-fix-validation-for-number-of-workers

Conversation

@Innavin369
Copy link
Contributor

@Innavin369 Innavin369 commented Feb 24, 2025

OSDEV-1778 Fix the validation for the number_of_workers field in POST, PATCH production locations API:

  • added min<=max to the swagger schema

@Innavin369 Innavin369 self-assigned this Feb 24, 2025
@Innavin369 Innavin369 marked this pull request as ready for review February 25, 2025 11:12
Copy link
Contributor

@VadimKovalenkoSNF VadimKovalenkoSNF left a comment

Choose a reason for hiding this comment

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

Ask question.

Copy link
Contributor

@VadimKovalenkoSNF VadimKovalenkoSNF left a comment

Choose a reason for hiding this comment

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

Lgtm

@vladsha-dev vladsha-dev changed the title [OSDEV-1778] Fix the validation for number of workers field in POST, PATH production locations API [OSDEV-1778] Fix the validation for number of workers field in POST, PATCH production locations API Feb 26, 2025
Copy link
Contributor

@vladsha-dev vladsha-dev left a comment

Choose a reason for hiding this comment

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

Could you please update the minimum values for the min and max fields in the number_of_workers field?
See the following files:

  • open-supply-hub-api-docs/docs/schemas/cleaned_data_fields.json
  • open-supply-hub-api-docs/docs/schemas/cleaned_data_raw_json.json

I believe the minimum values should be the same as in the file you edited.

Copy link
Contributor

@vladsha-dev vladsha-dev left a comment

Choose a reason for hiding this comment

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

LGTM

@Innavin369 Innavin369 merged commit 0a9f6e8 into main Feb 27, 2025
Innavin369 added a commit to opensupplyhub/open-supply-hub that referenced this pull request Feb 27, 2025
…, PATCH production locations API (#532)

[OSDEV-1778](https://opensupplyhub.atlassian.net/browse/OSDEV-1778) Fix
the validation for `number_of_workers` field in POST, PATCH production
locations API.

* min can be less or equal to max
* min and max must be integer 
* fixed [API
spec](https://opensupplyhub.github.io/open-supply-hub-api-docs/) in [the
PR](opensupplyhub/open-supply-hub-api-docs#44)


[OSDEV-1778]:
https://opensupplyhub.atlassian.net/browse/OSDEV-1778?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Inessa Druzhkova <[email protected]>
protsack-stephan pushed a commit to opensupplyhub/open-supply-hub that referenced this pull request Apr 12, 2025
…, PATCH production locations API (#532)

[OSDEV-1778](https://opensupplyhub.atlassian.net/browse/OSDEV-1778) Fix
the validation for `number_of_workers` field in POST, PATCH production
locations API.

* min can be less or equal to max
* min and max must be integer 
* fixed [API
spec](https://opensupplyhub.github.io/open-supply-hub-api-docs/) in [the
PR](opensupplyhub/open-supply-hub-api-docs#44)


[OSDEV-1778]:
https://opensupplyhub.atlassian.net/browse/OSDEV-1778?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Inessa Druzhkova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants