-
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
OIA2 schema for type = array #1891
Comments
@anhle54 this is standard JSON Schema behavior, as you may sometimes want an array without constraining the shape of the items. Or you may define the type as Furthermore, I do not believe there is any more work occurring on OAS v2.x. @webron @MikeRalphson can this be closed? |
As we always say, schema validation is not a guarantee to a compliant definition. We're not doing active work on the OAS2 schema. While I'm ok with reviewing a PR on it, adding this restriction using the older version of JSON Schema would make the already-way-too-complex Schema significantly more complex. |
@webron I'm interpreting that as saying that this is closable. 😄 |
Per spec, if the type is array, then
items
is required. However,I have look into the OAI2 schema, and here is the part that they define the primitiveItems:
If we run the validation based on this schema, we will have this following case, which is not correct, but it still pass the schema validation because there is no where in the schema make
items
required when thetype: array
The text was updated successfully, but these errors were encountered: