FormDataRequest issue with nullable parameters
BernatCarbo opened this issue · 3 comments
Hi there, I'm having a little issue with a FormDataRequest post request, I'm using the next request body:
But all the parameters are added to the request (even the ones which are not specified) at this way:
"Content-Type: multipart/form-data" -F "abbreviation= " -F "name= " -F "icon= "
I believe that those shouldn't be added to the request if aren't specified
You mean in the swagger UI interface ?
This is expected behavior as there is no way to separate empty strings from null, since the field is always displayed.
Hello,
Yes, from the swagger UI, when I click at 'execute' I would expect to be sent only the paramaters that have been specified with values (and hence the rest are null), for example from this (only the name field have a value, the rest are null):
I would expect the parameter 'name' to be sent at the request, but not the rest of them which doesn't have any value specified.
I do not manage the swagger UI project so I cannot help you with that, you can find another ui that accepts OpenAPI.json that suits your needs and disable the swagger ui in the settings.