swagger-api/swagger-ui

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

Open

#6.505 aberto em 11 de out. de 2020

Ver no GitHub
 (15 comments) (23 reactions) (0 assignees)JavaScript (8.801 forks)batch import
Hacktoberfesttype: feature

Métricas do repositório

Stars
 (25.447 stars)
Métricas de merge de PR
 (Mesclagem média 20h 34m) (14 fundiu PRs em 30d)

Description

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'

Guia do colaborador