utoipa icon indicating copy to clipboard operation
utoipa copied to clipboard

[Feature Request] Automatically derive "title" for Enum Variants

Open wallagib opened this issue 4 months ago • 1 comments

I'm adding functionality to another code generator that consumes the OpenAPI spec, and I realized that it would be nice to propagate the enum names from Rust into other languages. I'm probably going to do this by pulling the title field if present.

In my environment, I have a lot of enums and adding schema(title="X") for each variant just to have the same name is tedious. Is there any reason not to automatically set title=<enum name> automatically?

EDIT: I'm not sure if/how this would work with the other serde enum tagging types.

wallagib avatar Feb 12 '24 20:02 wallagib