-
Notifications
You must be signed in to change notification settings - Fork 128
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
bug: inconsistent types for OAS3_1 schemas #1548
Labels
Comments
Good question. They are somewhat different as the first one is using for the code typing while the second one is for an OAS description typing. Ideally they should be synchronised, but I cannot come up with a reliable solution to enforce that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
redocly-cli/packages/core/src/typings/openapi.ts
Lines 160 to 164 in f11ebcb
redocly-cli/packages/core/src/types/oas3_1.ts
Lines 90 to 185 in f11ebcb
Should these two separate typings be refactored to use only one of them across the core package? The
openapi.ts
typing does not include theunevaluated*
keywords required for OAS 3.1.x /JSON Schema 2020-12 schemas.I think this relates to #1546 where an unexpected keyword is throwing an error, but it is indeed valid for JSON Schema 2020-12 schemas to define any arbitrary properties.
In the previous version of OpenAPI 3.0.x, the schema object was strictly defined as a superset and subset of a JSON Schema draft-04 schema, and thus not all JSON Schema related behaviors applied. The interface design of
OAS3_1Schema
does not allow arbitrary properties.The text was updated successfully, but these errors were encountered: