Redocly/redoc

Add an option to disable default sample

开放

#1,490 创建于 2020年12月30日

 (2 条评论) (0 个反应) (0 位负责人)TypeScript (2,272 个派生)batch import
Type: Enhancementhelp wanted

仓库指标

星标
 (21,877 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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?

贡献者指南