Comments (6)
Released in v1.0.2
😁
from poem.
Released in
v1.0.2
grin
Wonderful! What do you think of hiding swagger-ui
behind a feature flag? I could open a PR for that
from poem.
Released in
v1.0.2
grinWonderful! What do you think of hiding
swagger-ui
behind a feature flag? I could open a PR for that
Yes, welcome to PR.😁
from poem.
Is there any example of how to implement this?
from poem.
Still no example for this?
from poem.
You can use the .spec()
(json) or .spec_yaml()
method for writing the openapi specs to a file like this:
let mut file = File::create("openapi.json")?;
file.write_all(api_service.spec().as_bytes())?;
There is also and endpoint .spec_endpoint()
and .spec_endpoint_yaml()
:
Server::new(TcpListener::bind("0.0.0.0:3000"))
.run(Route::new()
.nest("/spec", api_service.spec_endpoint_yaml())
.nest("/", ui))
.await
from poem.
Related Issues (20)
- Acme-alpn does not work
- Multiple 200 OK options?
- Add Typed Multipart Data Extractor to Poem
- Moving from `serde_json` to faster json parser lib
- Transform errors when extract parameters HOT 1
- poem-lambdaV5.0.0 AWS API Gateway triggering lambda is not supported?
- poem-openapi 5.0.1 is incompatible with poem-openapi-derive 5.0.0 HOT 1
- Allow SecurityScheme as Macro parameter of OpenApi or oai
- Middleware examples are out of date
- EmbeddedFilesEndpoint not working for index.html in subdirectory HOT 2
- [poem-openapi] Path parameters in `prefix_path` do not generate the correct openapi specification HOT 1
- Redirect response type error HOT 1
- RequestId Middleware display ERROR Message
- The api doc request response 502 when set the host `0.0.0.0` HOT 2
- Advanced mTLS support
- Correct usage of `CookieJar`, `private` and `private_with_key` HOT 1
- Grpc Build: Format service name as `.{proto_name}` when package is empty
- serve_connection should handle panic?
- Drop `#[derive(Default)]` from handler macro HOT 2
- Merging api specs/different middleware's for different apis with same OpenAPI Specificaton
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poem.