Skip to content

Conversation

@fernamig
Copy link
Contributor

Please review. POST is not working.

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.

3 participants