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
$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
Comments
zyoshoka
added
bug
Something isn't working
openapi-ts
Relevant to the openapi-typescript library
labels
Mar 10, 2024
This is a good addition! I think 6.x or 7.x (beta) could support this addition without it being a breaking change. Would love a PR for this if anyone is able to provide one! |
drwpow
added
help wanted
Extra attention is needed
good first issue
Good for newcomers
labels
Mar 12, 2024
Not sure if I should create another issue for this, but I think it might be related to the above. In the case of composition,
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: