Skip to content

Is it possible to merge OpenAPI document definitions? #608

Answered by juhaku
chanced asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@chanced
Comment options

@jayvdb
Comment options

Answer selected by chanced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants