-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
[poem-openapi] Expose generated json #52
Comments
Released in |
Wonderful! What do you think of hiding |
Yes, welcome to PR.😁 |
Is there any example of how to implement this? |
Still no example for this? |
You can use the let mut file = File::create("openapi.json")?;
file.write_all(api_service.spec().as_bytes())?; There is also and endpoint Server::new(TcpListener::bind("0.0.0.0:3000"))
.run(Route::new()
.nest("/spec", api_service.spec_endpoint_yaml())
.nest("/", ui))
.await |
Description of the feature
Hi, first of all good work with poem and poem-openapi, I'm enjoying a lot using them and I'll probably migrate some projects to it.
Anyway, I'd like to be able to get (and maybe serve) the generated
.json
file that contains the open api specification; it would also be nice to be able to deactivate the ui feature entirely.This is because I prefer redoc and I'd like to inspect/edit the final open api document.
Code example (if possible)
The text was updated successfully, but these errors were encountered: