Skip to main content

create_router_v1

Function create_router_v1 

Source
pub fn create_router_v1<S>(state: S) -> Router
Expand description

Create v1 router with OpenAPI documentation.

Unlike v2 (whose spec comes from the protos, with real schemas for every request and response; see router_v2_docs), most v1 handlers return internal domain types that don’t implement schemars::JsonSchema by design - see ApiJson. The generated spec therefore documents routes, parameters, and summaries, but response bodies are mostly untyped.