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

Support for remote $refs #156

Closed
ioggstream opened this issue Jun 19, 2020 · 6 comments
Closed

Support for remote $refs #156

ioggstream opened this issue Jun 19, 2020 · 6 comments
Labels
enhancement New feature or request released

Comments

@ioggstream
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Remote $ref are not resolved

Describe the solution you'd like

Remote $ref to be resolved

Describe alternatives you've considered

Remote $refs are downloaded and converted to local refs by an external component

Additional context

components:
  schemas:
    Problem:
      $ref: "https://opensource.zalando.com/problem/schema.yaml#/Problem"

@koxudaxi
Copy link
Owner

@ioggstream
OK, I try to implement it 🤓

@ioggstream
Copy link
Contributor Author

@koxudaxi Great! I stubbed an openapi-resolver here https://github.com/ioggstream/openapi-resolver which cover some use cases but has a non-trivial bug with multi-level $refs ioggstream/openapi-resolver#26

The resolver can recursively download $refs and generate a single, bundled, OAS spec trying to preserve relationship between classes and can be an initial building block for fixing the issue.

@koxudaxi
Copy link
Owner

@ioggstream
I published the feature as 0.5.19.

@koxudaxi
Copy link
Owner

@ioggstream
I don't use your library because of cutting dependency.
Also, I decide I don't need it this phase.

@ioggstream
Copy link
Contributor Author

Thank you very much :) These days I was attending EuroPython online edition and I shared your work with the community. Next week I'll push some more tests. Thanks for your great work!

@koxudaxi
Copy link
Owner

@ioggstream
Thank you for sharing my work 😄

Next week I'll push some more tests.

Great!! I will review it 👍

Also, I'll update fastapi-code-generator for remote files and documents 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

2 participants