utoipa
utoipa copied to clipboard
Schema name configuration
According to the docs, there is no way to use a different from the struct name in the openaapi doc, like:
#[derive(ToSchema)]
#[schema(name = "Dog")]
pub struct DogSchema;
Which should generate schema Dog
instead of DogSchema
.
According to the docs, there is no way to use a different from the struct name in the openaapi doc, like:
#[derive(ToSchema)] #[schema(name = "Dog")] pub struct DogSchema;
Which should generate schema
Dog
instead ofDogSchema
.
True, there is no separate attribute for that but as = Dog
should be possible. E.g.
#[derive(ToSchema)]
#[schema(as = Dog)]
pub struct DogSchema;
Closing due inactivity. Can be reopened if deemed necessary.