> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Enum descriptions, names, casing, and availability > Add descriptions, custom names, per-language casing overrides, and deprecation status to OpenAPI enum values with the `x-fern-enum` extension. OpenAPI doesn't natively support adding descriptions to enum values. To do this in Fern you can use the `x-fern-enum` extension. ## Descriptions and availability Use `description` to add documentation to individual enum values and `deprecated` to mark values as deprecated without deprecating the entire enum. These propagate into the generated SDKs and docs website. **`openapi.yml`** ```yaml title="openapi.yml" {11, 13-14, 16, 18} components: schemas: CardSuit: enum: - clubs - diamonds - hearts - spades x-fern-enum: clubs: description: The clubs suit diamonds: description: "Deprecated. Use hearts instead." deprecated: true hearts: description: The hearts suit spades: description: The spades suit ``` ## Custom names Use the `name` field to customize the name of an enum value in generated code. This is particularly useful when enum values rely on symbolic characters that would otherwise cause generated code not to compile. For example, the following OpenAPI: **`openapi.yml`** ```yaml title="openapi.yml" {9,12} components: schemas: Operand: enum: - '>' - '<' x-fern-enum: '>': name: GreaterThan description: Checks if value is greater than '<': name: LessThan description: Checks if value is less than ``` would generate: **`operand.ts`** ```typescript title="operand.ts" export enum Operand { GreaterThan = ">", LessThan = "<" } ``` ## Custom casing Use the `casing` field to specify exact casing for each target language's naming convention. This gives more granular control than `name` alone, which sets a single default name for generated code. The `casing` field supports four optional sub-fields: * `snake` — override for snake\_case (used in languages like Python) * `camel` — override for camelCase (used in languages like TypeScript/Java) * `screamingSnake` — override for SCREAMING\_SNAKE\_CASE (used in languages like Go) * `pascal` — override for PascalCase (used in languages like C#) **`openapi.yml`** ```yaml title="openapi.yml" {13-17} components: schemas: Status: type: string enum: - active - in-progress x-fern-enum: active: description: The item is active in-progress: name: InProgress casing: snake: in_progress camel: inProgress screamingSnake: IN_PROGRESS pascal: InProgress ``` You can use `casing` alongside `name`. The `name` field sets the default generated name, while `casing` provides per-language overrides. If both are specified, the `casing` values take precedence for their respective language targets. > Add descriptions, custom names, per-language casing overrides, and deprecation status to OpenAPI enum values with the `x-fern-enum` extension.