$ref
with other keywords doesn't work
#1591
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
openapi-ts
Relevant to the openapi-typescript library
Description
In the specifications up to the JSON Schema Draft 7, if you included other keywords in an object using
$ref
, they were ignored1, but starting with the Draft 2019-09, you are allowed to include other properties in$ref
2. Since the OAS 3.1.0 is 100% compatible with the Draft 2020-123, the OAS 3.1.0 allows such usage, butopenapi-typescript
does not reflect it in the type definition.openapi-typescript
7.0.0-next.8
21.7.1
macOS 14.4
Reproduction
OpenAPI document
Expected result
I think this would have to be:
Checklist
npx @redocly/cli@latest lint
)Footnotes
https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-01#section-8.3 ↩
https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-02#section-8.2.4.1 ↩
https://www.openapis.org/blog/2021/02/18/openapi-specification-3-1-released ↩
The text was updated successfully, but these errors were encountered: