For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Overview
    • What is an API definition?
    • Project structure
      • Overview
      • Overlays
      • Overrides
      • Authentication
      • Servers
      • Sync your specification
        • Overview
        • API version
        • Audiences
        • Availability
        • Base path
        • Default values
        • Enum descriptions, names, and availability
        • Request + response examples
        • API Explorer control
        • Global headers
        • Ignoring elements
        • SDK method names
        • SDK variables
        • Tag display names
        • Parameter names
        • Property names
        • Idempotency
        • Pagination
        • Retry behavior
        • Schema names
        • Server names and URL templating
      • generators.yml reference
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Descriptions and availability
  • Custom names
  • Custom casing
OpenAPIExtensions

Enum descriptions, names, casing, and availability

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Default values

Next

Request + response examples

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
1components:
2 schemas:
3 CardSuit:
4 enum:
5 - clubs
6 - diamonds
7 - hearts
8 - spades
9 x-fern-enum:
10 clubs:
11 description: The clubs suit
12 diamonds:
13 description: "Deprecated. Use hearts instead."
14 deprecated: true
15 hearts:
16 description: The hearts suit
17 spades:
18 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
1components:
2 schemas:
3 Operand:
4 enum:
5 - '>'
6 - '<'
7 x-fern-enum:
8 '>':
9 name: GreaterThan
10 description: Checks if value is greater than
11 '<':
12 name: LessThan
13 description: Checks if value is less than

would generate:

operand.ts
1export enum Operand {
2 GreaterThan = ">",
3 LessThan = "<"
4}

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
1components:
2 schemas:
3 Status:
4 type: string
5 enum:
6 - active
7 - in-progress
8 x-fern-enum:
9 active:
10 description: The item is active
11 in-progress:
12 name: InProgress
13 casing:
14 snake: in_progress
15 camel: inProgress
16 screamingSnake: IN_PROGRESS
17 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.