This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
How to use swagger 2 in FastAPI #1665
Comments
I've had the same issue and i fixed it by using https://github.com/LucyBot-Inc/api-spec-converter I did have to do some manual changes after that (some security stuff and empty body that gcp doesn't like) but that will be different for everyone I can give a more concrete example later if you wish |
Can you provide an example |
First i make the app fill the api data and create an endpoint which just returns a json of the schema
Then i have a function that goes to that url takes the schema and writes to a yaml file (json is also possible i believe)
Then i call the spec-converter as a CLI (requires a node env with npm install api-spec-converter)
After which you should have a version 2 swagger in the openapi.yaml :)
|
Thanks for the help here @ArcLightSlavik ! 👏 🙇 If that solves the original problem, then you can close this issue @somta ✔️ |
Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
We need to use swagger2 in the FastAPI project, can we use Swagger 2 to replace the original OpenAPI
The text was updated successfully, but these errors were encountered: