Display example descriptions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
ReDoc supports displaying multiple request/response examples using the examples field. However, the description is not presented anywhere. Currently the only way of explaining the examples is in the main API description.
I propose the description (if present) would be displayed beneath the example selector (for the screenshot I just added one <div> containing the description):

Example OpenAPI file:
openapi: 3.0.0
info:
title: Test
version: 1.0.0
paths:
/rest/stuff:
post:
summary: Create stuff
requestBody:
content:
application/json:
schema:
type: object
examples:
Example one:
description: This explains what example one does.
value:
example: one
Example two:
description: This explains what example two does.
value:
example: two
responses:
"200":
description: stuff is created
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied OpenAPI document and inspecting the request-body example selector and its rendering path. Done means descriptions from the selected example appear beneath the selector, while examples without descriptions continue to render normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100