Redocly/redoc

Add an option to disable default sample

Open

#1,490 建立於 2020年12月30日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)TypeScript (2,272 fork)batch import
Type: Enhancementhelp wanted

倉庫指標

Star
 (21,877 star)
PR 合併指標
 (30 天內沒有已合併 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?

貢獻者指南