Hi! 👋
I'm playing around with this crate and ran into an issue where schemas (and I'm guessing paths) aren't detected when behind a cfg_attr flag. E.g:
Works:
#[derive(ToSchema)]
struct Todo {
// ...
}
Doesn't work:
#[cfg_attr(feature = "openapi", derive(ToSchema))]
struct Todo {
// ...
}
Essentially, my use case is to only generate the OpenAPI spec when writing it to a file in my CI step, and I don't want to have to compile all my utoipa macros when running the webserver normally.
Thanks for the library, it's really nice!
Hi! 👋
I'm playing around with this crate and ran into an issue where schemas (and I'm guessing paths) aren't detected when behind a
cfg_attrflag. E.g:Works:
Doesn't work:
Essentially, my use case is to only generate the OpenAPI spec when writing it to a file in my CI step, and I don't want to have to compile all my
utoipamacros when running the webserver normally.Thanks for the library, it's really nice!