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

editorial: field not explicitly required can be considered optional #2470

Closed
ioggstream opened this issue Feb 18, 2021 · 7 comments
Closed
Labels
clarification requests to clarify, but not change, part of the spec review

Comments

@ioggstream
Copy link
Contributor

I suggest

  • to use a clear BCP14 terminology

instead

can be considered OPTIONAL

is not clear.

note

  • I'd explicitly add OPTIONAL on optional fields. "Explicit is better than implicit"

otherwise I'd state

  • if a field is not explicitly REQUIRED, it is OPTIONAL
@MikeRalphson
Copy link
Member

@jasonbstanding does this cover the issue you raised a couple of weeks ago?

@handrews handrews added the clarification requests to clarify, but not change, part of the spec label Jan 28, 2024
@lornajane
Copy link
Contributor

@ioggstream was this related to another issue or discussion? (sorry, I realise it's been a while!)

@ioggstream
Copy link
Contributor Author

iirc it was open to suggest a more clean language in the spec

I don't remember if expressions like the above are still present in the latest specs.

The general advise still remains.

@github-actions github-actions bot added Needs attention The author has replied and people with triage rights should take action. and removed Needs author feedback labels Feb 25, 2024
@handrews handrews added review and removed Needs attention The author has replied and people with triage rights should take action. labels May 6, 2024
@handrews
Copy link
Member

handrews commented May 6, 2024

@OAI/tsc review request: We should either decide to do this and do it, or close this issue. It's a straightforward yes or no question.

@lornajane
Copy link
Contributor

I think we could add a note about anything that isn't required being considered optional, if it would make it clearer to anyone.

@handrews
Copy link
Member

handrews commented May 6, 2024

@lornajane we already have that note at the top of the whole "Schema" (meaning structure of OAS, not JSON Schema) section (3.0.3 §4.7; 3.1.0 §4.8):

In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

@lornajane
Copy link
Contributor

We discussed this in a TDC meeting and since we have required fields clearly marked and an overall remark about non-required fields being optional by default, we agreed not to add optional to all other fields.

I suggested that it does not improve readability and was not contradicted. I do want to say thanks for the suggestion though - it was a good discussion and ideas are always welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification requests to clarify, but not change, part of the spec review
Projects
None yet
Development

No branches or pull requests

4 participants