Add an option to disable default sample
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
When the scheme doesn't come with example, Redoc will automatically generate a sample by properties default value. This default sample isn't useful in most case and it's confusing to reader.
I'd like to write examples which represent real use cases in the OpenAPI definition and leave unimportant responses/responses without sample. But I didn't find a way to disable the sample. It is possible to add global option in the tool, or add OpenAPI extension to disable default sample?
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 locating Redoc's default sample generation and the handling of explicit OpenAPI examples. Determine how a global option or OpenAPI extension could suppress generated samples without hiding authored examples; done means unneeded property-default samples no longer appear while real examples remain visible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100