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

Make suffix optional in POST and remove from PATCH. #168

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

fernamig
Copy link
Contributor

Please review. POST is not working.

@@ -1534,6 +1546,7 @@ components:
attributes:
allOf:
- $ref: '#/components/schemas/JobAttributes'
- $ref: '#/components/schemas/JobSuffixRequired'
Copy link
Member

@tsoliangwu0130 tsoliangwu0130 Aug 29, 2022

Choose a reason for hiding this comment

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

I'm confused. Isn't suffix optional in POST?

jobs that share the same position number. For updating existing
jobs, this field is required.
jobs that share the same position number. This field is required.
JobSuffixOptional:
Copy link
Member

@tsoliangwu0130 tsoliangwu0130 Aug 29, 2022

Choose a reason for hiding this comment

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

Why do we have two suffix attributes defined and the only difference is nullable: true/false? I think what you should do are the following:

  1. Make suffix nullable: true in post attributes.
  2. Separate patch attributes from post attributes (you should still reuse common attributes by references).
  3. Remove suffix from patch attributes.
  4. Also make sure you modify the corresponding API codes including unit tests to reflect the change. For example, we will no longer need to check whether suffixes are matched between path and body for patch.

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.

2 participants