-
First off, thanks for the awesome work! My API is spread out over numerous crates. Some of them have routers and components. The main application creates an axum router composed of nested routers. I'd really like to keep the OpenAPI docs as close to their respective router as possible. Is it be possible to merge all of the definitions into a single unified OpenAPI document? Thanks! closing #607 as it should have been a discussion. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes there is, you can create mulitple instances of ApiDoc types derived from |
Beta Was this translation helpful? Give feedback.
Yes there is, you can create mulitple instances of ApiDoc types derived from
#[utoipa(OpenApi)]
to their respective crates and then merge all the them into one in main crate. There is a merge method in OpenApi for this purpose https://docs.rs/utoipa/latest/utoipa/openapi/struct.OpenApi.html#method.merge.