-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
OAS 3.1: Suggest rephrasing data-types section for format
keyword and primitive types.
#2301
Comments
This sounds like a good catch. Could you work up a PR? |
sure, will do. In past PRs, my understanding is the guiding principle has been to remove normative sentences from the OAS spec if there is already a normative text in the JSON schema specification. Therefore, I'm wondering if this entire paragraph should be removed? I don't see anything new which isn't already specified in the JSON schema specification.
Update: never mind, scratch that, I see there are additional format. |
I have opened #2302 |
I agree, I don't think that paragraph is now adding anything. |
I've removed a few sentences while trying to keep the flow for the new data formats being introduced. |
@MikeRalphson, is there anything I should do as a next step? |
No, I've labelled the PR for review, hopefully we will get to it on tomorrow's TSC call. |
Closing as #2302 was merged. Thanks. |
The OAS 3.1 data types section states:
Implied in that sentence is that the
format
keyword does not apply to non-primitive types. However, In the JSON schema specification section 7, it is stated theformat
keyword applies to all model instance types:Based on the above the
format
keyword can apply tonull
,boolean
,object
,array
,number
andstring
.One of the goal of OAS 3.1 is to remove some of the constraints that existed in 3.0.3 and support full JSON schema specification. Therefore, shouldn't https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#data-types be rephrased to to avoid conveying the
format
keyword applies to primitive types? Even if in practice most people use theformat
keyword for primitive types, the spec doesn't have such restriction.The text was updated successfully, but these errors were encountered: