swagger-api/swagger-ui

Configuration option to change default "send empty value" to true in form data

Open

#6,505 建立於 2020年10月11日

在 GitHub 查看
 (15 留言) (23 反應) (0 負責人)JavaScript (8,801 fork)batch import
Hacktoberfesttype: feature

倉庫指標

Star
 (25,447 star)
PR 合併指標
 (平均合併 20小時 34分鐘) (30 天內合併 14 個 PR)

描述

Hello, In my API, I have some multipart forms, here's a screenshot from the pet store: image

I want to have these checkboxes unchecked by default, because of the way my API deals with empty form fields. So far, I've tried to modify the request-body and the parameter-include-empty components by writing a plug-in, but I'm struggling to have the parameter-include-empty unchecked (by setting isIncluded to false) without breaking the behaviour of request-body. Is the current version of swagger-ui allowing for this customization? Sorry for my poor skills in react, any help is welcome!

Related links: #5830 Allow to skip submitting empty values in form data #6228 Set default true for 'send empty value'

貢獻者指南