-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Break down #[derive(OpenApi)] #[openapi(...)]
into smaller chunks
#1204
Comments
If you are using You can create multiple If you are using Utoipa 5.0.0 will automatically collect schemas from the usages points recursive. This requires that all types that derive Currently the Example of utoipa axum bindings: https://github.com/juhaku/utoipa/tree/master/examples/actix-web-scopes-binding Also the latest todo examples for axum and actix-web has been updated to use the bindings instead of registering handlers via |
@juhaku thank you very much for your response and suggestions. I will try using |
I'm working on a large project using utoipa with hundreds of paths and component schemas.
My
docs.rs
file where I keep the utoipa macros is thousands of lines long.Adding / organizing new and existing paths and types to
#[derive(OpenApi)] #[openapi(...)]
is becoming a very large pain point in my codebase.I'd like to split them up into separate files. At minimum something like:
I've tried macros and functions to break down the file into the proposed structure above but nothing seems to work, it keeps breaking the utoipa macro and won't compile unless it's all inline in one file.
Is there something I'm missing here? A better workflow perhaps? This is becoming very frustrating.
The text was updated successfully, but these errors were encountered: