Skip to content

Support $ref at path item object level #1107

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

Closed
1 task
MauroB45 opened this issue May 10, 2023 · 2 comments · Fixed by #1246
Closed
1 task

Support $ref at path item object level #1107

MauroB45 opened this issue May 10, 2023 · 2 comments · Fixed by #1246
Labels
bug Something isn't working enhancement New feature or request openapi-ts Relevant to the openapi-typescript library PRs welcome PRs are welcome to solve this issue!

Comments

@MauroB45
Copy link

MauroB45 commented May 10, 2023

Description

Based on the openapi spec $ref is supported in the path-item-object config (see spec). When I tried generating the types for the following schema it does not generate the link correctly and the result object is empty.

openapi: "3.0"
info:
  title: test
  version: "1.0"
paths:
  /test:
    $ref: './_paths-test.yaml'
...

Proposal

Support $ref at the path item object level instead of the operation object where it is not supported (we can keep it for backward compatibility purposes).

Checklist

@MauroB45 MauroB45 added enhancement New feature or request PRs welcome PRs are welcome to solve this issue! labels May 10, 2023
@drwpow drwpow added the openapi-ts Relevant to the openapi-typescript library label May 22, 2023
@drwpow drwpow added the bug Something isn't working label Jul 25, 2023
@drwpow
Copy link
Contributor

drwpow commented Jul 25, 2023

This is a definite bug and should be fixed. Not supporting valid $refs isn’t an intentional decision.

@drwpow
Copy link
Contributor

drwpow commented Jul 25, 2023

Released in v6.3.8 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request openapi-ts Relevant to the openapi-typescript library PRs welcome PRs are welcome to solve this issue!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants