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

Why does the JSON schema for 3.0 specify patternProperties for component names but allows additional properties? #3720

Open
handrews opened this issue Apr 19, 2024 Discussed in #2439 · 0 comments

Comments

@handrews
Copy link
Contributor

Discussed in #2439

Originally posted by ryankinderman January 11, 2021
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 adding additionalProperties: 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant