Redocly / Redocly/redoc

default is missing when combined with allOf

Open
#1,409 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When I generate API docs for the following property, ReDoc does not render the default:

    allOf:
    - type: string
      enum:
      - grow
      - hold
    - default: grow
    - description: allOf is working

The description is rendered, so I know that it's processing the allOf.

Screenshot from 2020-10-12 13-16-56

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

Reproduce the issue in ReDoc using the allOf schema shown in the report, then trace how the rendered description and default are handled. Confirm the fix when the default: grow value appears for the property while the description continues to render.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.