Expand description
This crate is used by rocket_okapi
for code generation. This crate includes the procedural macros like:
#[openapi]: To generate the documentation for an endpoint/route.openapi_routes![...]: Returns a closure for generating routes.openapi_spec![...]: Returns a closure for generating OpenApi objects.#[derive(OpenApiFromRequest)]: ImplementOpenApiFromRequesttrait for a given struct.
Macros§
- openapi_
routes  - Generate and return a closure that can be used to generate the routes.
 - openapi_
spec  - Generate and return a closure that can be used to generate the OpenAPI specification.
 
Attribute Macros§
- openapi
 - A proc macro to be used in tandem with one of 
Rocket’s endpoint macros. It requires that all of the arguments of the route implement one of the traits inrocket_okapi::request, and that the return type implementsOpenApiResponder. 
Derive Macros§
- Open
ApiFrom Request  - Derive marco for the 
OpenApiFromRequesttrait.