Redocly/redoc

Add an option to disable default sample

Aperta

#1490 aperta il 30 dic 2020

 (2 commenti) (0 reazioni) (0 assegnatari)TypeScript (2272 fork)batch import
Type: Enhancementhelp wanted

Metriche repository

Star
 (21.877 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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?

Guida contributor