Crate fastapi_gen

Source
Expand description

This is private fastapi codegen library and is not used alone.

The library contains macro implementations for fastapi library. Content of the library documentation is available through fastapi library itself. Consider browsing via the fastapi crate so all links will work correctly.

Macros§

schema
Create OpenAPI Schema from arbitrary type.

Attribute Macros§

path
Path attribute macro implements OpenAPI path for the decorated function.

Derive Macros§

IntoParams
Generate path parameters from struct’s fields.
IntoResponses
Generate responses with status codes what can be attached to the fastapi::path.
OpenApi
Generate OpenApi base object with defaults from project settings.
ToResponse
Generate reusable OpenAPI response that can be used in fastapi::path or in OpenApi.
ToSchema
Generate reusable OpenAPI schema to be used together with OpenApi.