-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional boolean as query parameter #339
Comments
Maybe this has to do with Swagger UI? Have a look at: non-required Boolean value is always selected #1191 |
Maybe I should give some context. I'm using Swashbuckle because I heard that it was super easy to integrate into my .NET WebApi project. I'm pretty sure there are no YAML configs for Swashbuckle, so that thread doesn't really help me out. I'm 99% sure that this isn't a bug and I'm just doing something wrong, but Stack-Overflow wasn't being responsive quick enough. |
I'm also new to Swashbuckle (just started using it the day before yesterday). I tried adding an optional boolean to my project and I got the same issue that you had. I then downloaded the newest version of swagger-ui and then it worked. So, it's not actually a Swashbuckle-issue. |
@monobjorn is absolutely correct - this was a swagger-ui issue as opposed to a bug in SB itself. I've upgraded to the latest swagger-ui and the issue is fixed. It will be available with the next release which I'm working hard to get out ASAP. |
Awesome. Thank you so much @domaindrivendev. |
Should be resolved in latest release - 5.2.0 |
I have an optional boolean query param in a GetAll Models function in this format:
But in the swagger UI it doesn't behave like a true nullable.
Is this a bug that is being worked on? Or is there a possible workaround that I should be using?
The text was updated successfully, but these errors were encountered: