You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just recently upgraded from earlier version of FastEndpoints to the latest version of 5.16.0 and noticed that all request model properties have some default values in my swagger-ui. I then dug into it a bit and found that this bug has been introduced in 5.16.0 as it is working as expected in 5.15.0.
The swagger.json seems to be correct in both versions as the property is marked with "nullable": true. So i suspect the bug to reside in the swagger-ui part.
To reproduce:
Have FastEndpoint with model containing QueryParam property that is nullable. I recommend something, that defaults to some human-visible value, like int (0) or datetime (current time or 0000-... date)
Generated OpenAPI definition and Swagger UI.
5.15.0 -> the input box for query parameter is empty
5.16.0 -> the input box is prefilled with default value of datatype
The text was updated successfully, but these errors were encountered:
@dj-nitehawk Thanks! It did, thank you!
Maybe having it turned on by default causes too much confusion, as the engineer puts the questionmark on a property deliberately to make it nullable and then confusingly sees some values in SwaggerUI?
Thanks again! I can now continue to use the latest version. It's a great library!
I just recently upgraded from earlier version of FastEndpoints to the latest version of 5.16.0 and noticed that all request model properties have some default values in my swagger-ui. I then dug into it a bit and found that this bug has been introduced in 5.16.0 as it is working as expected in 5.15.0.
The swagger.json seems to be correct in both versions as the property is marked with
"nullable": true
. So i suspect the bug to reside in the swagger-ui part.To reproduce:
The text was updated successfully, but these errors were encountered: