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

OpenAPI client generator docs link? #616

Open
mrlubos opened this issue Apr 3, 2024 · 3 comments
Open

OpenAPI client generator docs link? #616

mrlubos opened this issue Apr 3, 2024 · 3 comments

Comments

@mrlubos
Copy link

mrlubos commented Apr 3, 2024

Hey there! I'm one of the maintainers of openapi-ts, a package for turning the generated OpenAPI specs into TypeScript clients. Would you be open to including a section in README on generating clients from OpenAPI specs? FastAPI has a similar section

@lukevp
Copy link

lukevp commented Jun 2, 2024

It's not clear to me how to even get an openapi spec out of flasgger vs. just a ui rendering of the spec. I'm trying to run httpbin locally and export the openapi spec so I can use it to wrap it for typescript use (same use case you specified) and I don't know where to start. httpbin is a flask app that uses this package to host https://httpbin.org. Does anyone have any idea how to get flasgger to output an openapi spec for use in client generation?

@mrlubos
Copy link
Author

mrlubos commented Jun 2, 2024

@lukevp I can't try right now since I see their website is down, but do you not have a link to the spec in Swagger UI? Can you alternatively try to replace/append a .json to your docs URL?

@lukevp
Copy link

lukevp commented Jun 2, 2024

Nope... I'm more used to Swagger specs that render from the ASP.NET Core swagger tooling, which includes a link in the UI to download the spec. The main homepage for https://httpbin.org is rendered by flasgger and doesn't have a spec definition link. I don't know where you'd add .json in this case since there's no docs url, it's just at https://httpbin.org (https://httpbin.org.json doesn't work because it's considered a separate site?)
I've tried /openapi.json and /openapi.yml...

Actually, I just had an idea to check the network traces, and I saw that it loads the spec from https://httpbin.org/spec.json , so I think I'm unblocked now, but I still think it would make sense to have a url to download the spec directly in the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants