Redocly / Redocly/redoc

enum display improvements

Open
#2,264 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Enhancement
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

When displaying enums, is it possible to:

  • display them as 1 per line rather than all on 1 line?
  • display them without double quotes?

Thanks for your help.

Example:

info:
  title: Test
  version: "1.0"
paths:
  /function_name:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enum_field:
                  type: string
                  enum:
                  - Example Value 1
                  - Example Value 2
                  - Example Value 3
                  - Example Value 4
                  - Example Value 5
                  - Example Value 6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied OpenAPI example in Redoc and locating the enum display path in the documentation UI. Done means enum values render one per line rather than on one line, without double quotes; verify the result with the example and any relevant existing display checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.