Redocly/redoc

Add an option to disable default sample

Open

#1.490 aberto em 30 de dez. de 2020

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)TypeScript (2.272 forks)batch import
Type: Enhancementhelp wanted

Métricas do repositório

Stars
 (21.877 stars)
Métricas de merge de PR
 (Mesclagem média 3h 40m) (11 fundiu PRs em 30d)

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?

Guia do colaborador