#[derive(Enum)]
{
// Attributes available to this derive:
#[oai]
}
Expand description
Define a OpenAPI enum
Attribute | Description | Type | Optional |
rename | Rename the enum | string | Y |
rename_all | Rename all the items according to the given case convention. The possible values are “lowercase”, “UPPERCASE”, “PascalCase”, “camelCase”, “snake_case”, “SCREAMING_SNAKE_CASE”, “kebab-case”, “SCREAMING-KEBAB-CASE”. | string | Y |
deprecated | Schema deprecated | bool | Y |
external_docs | Specify a external resource for extended documentation | string | Y |
remote | Derive a remote enum | string | Y |
Attribute | Description | Type | Optional |
rename | Rename the item | string | Y |
use poem_openapi::Enum;
#[derive(Enum)]
enum PetStatus {
Available,
Pending,
Sold,
}