- Generation of controllers:
- through
#[Controller]
annotation formod
- bootstrapping router and openapi spec
- specify state type for
State
extractor as an optional argument - specify base path
- Routing setup for handlers through
#[Route]
annotation.- generation and bootstrapping
- allow multiple http methods for one handler
- through
- Requests:
- Request body generation through
#[RequestBody]
annotation- for named
struct
- as a self-contained DTO - for unnamed
struct
with one element - as a wrapper around#[DTO]
- request content type negotiation based on
Content-Type
header:- application/json
- application/x-www-url-encoded
- multipart/form-data
- application/octet-stream
- macro to generate newtype for
axum::body::Bytes
with custom content-type
- macro to generate newtype for
- text/plain
- text/xml, application/xml
- application/bson
- application/cbor
- for named
- thin wrappers around axum standard extractors:
- Query
- Query - we can't possibly type it, though
- Path
- HeaderMap
- Request
- Method
- Extension
- State
- String
- axum::body::Bytes
- Request body generation through
- Responses:
- Response variants generation:
- for
enum
- for
struct
- support Result<T, E> where T and E are types annotated with
#[Response]
- detect collisions in http response codes for composite
#[Response]
types like Result<> IN COMPILE TIME - detect content-type mismatches in Result<> responses IN COMPILE TIME
- for
- Response content type negotiation based on
Accept
header- application/json
- text/plain
- text/html through custom trait
- macro to define html template for specific type
- application/octet-stream
- text/xml, application/xml
- application/bson
- application/cbor
- enforce a default Content-Type if no
Accept
header is specified- allow developer to amend
default_format
if there is only one possible format
- allow developer to amend
- Reject request before running the handler if handler cannot return an appropriate content type
- HTTP response codes through annotation
- Response variants generation:
- DTO (Data transfer objects):
- macro to generate DTOs for requests and responses through
serde
:
- macro to generate DTOs for requests and responses through
- OpenAPI spec generation through
utoipa
- generate schemas for
#[DTO]
- generate schemas for
#[RequestBody]
- generate schemas for
#[Response]
- generate schemas for handlers
- support content negotiation options for requests and responses
- extract schemas into Components instead of inlining them
- as a separate feature
- integrated swagger-ui and alike - as separate features
- generate schemas for
- Security schemas
- Websockets
- SSE
- Overall design:
- split into features
- better organize macro generation code - quite messy at the moment
- better tests
- examples
- documentation with cookbook
- website