Redocly / Redocly/redoc

Allow description for the oneOf selectors

Open
#752 5 comments 22 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

paths:
  /method:
    post:
      description: My DEFAULT description
        requestBody:
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/RequestOne'
                  - $ref: '#/components/schemas/RequestTwo'

components:
  schemas:
    RequestOne:
      description: My OPTIONAL description for the first method

    RequestSecond:
      description: My OPTIONAL description for the second method

It would be nice to change the description section at the top level of the method as well.

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

The issue provides an OpenAPI example but no file or test entry point. Trace how requestBody oneOf selectors are rendered and how schema descriptions are handled; the work is done when each selector can show its own description while retaining the method-level default description.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, 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.