Why does the JSON schema for 3.0 specify patternProperties for component names but allows additional properties? #2439
Replies: 2 comments 1 reply
-
I think this does look like an accidental oversight. Perhaps @webron could confirm? Would you be interested in raising a PR against the (YAML version of the) schema to add the missing keywords? We will then regenerate the JSON version and bump the |
Beta Was this translation helpful? Give feedback.
1 reply
-
Migrated to issue #3720 as there's a clear potential action. Closing this discussion in favor of the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been working on some functionality that uses the JSON schema to help validate OpenAPI schemas, and recently noticed that the 3.0 schema allows any value for
{name}
in/components/{component}/{name}
, while the specification states that "All the fixed fields declared above are objects that MUST use keys that match the regular expression:^[a-zA-Z0-9\.\-_]+$.
" It seems like this could have been validated automatically by simply addingadditionalProperties: false
to the JSON schema.My question is: Was not including
additionalProperties: false
in the JSON schema for 3.0 just an accidental omission, or was there some rationale behind not doing it?Thanks for clarifying!
Beta Was this translation helpful? Give feedback.
All reactions