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
This is more related to an issue with the Swagger spec itself (OAI/OpenAPI-Specification#229) but I thought it would be important to track here too. Right now there's no difference between a required field and a nullable field. Let's say I have a model that looks like this
The best way to do this would be have the nullable field be "type" : ["number","null"]but alas swagger doesn't support that.
Right now I'm adding in custom mapping in the swaggerconfig for each of the main nullables and praying no one else does anything weird in the project to require other value types to be exposed as a nullable and putting a vendor extension of "x-nullable"
The text was updated successfully, but these errors were encountered:
I'm going to close this as it's a Swagger limitation. It's worth noting that in a separate thread I'm proposing the introduction of a separate package that extends Swashbuckle with vendor extensions that are required for client generators such as AutoRest - #776
This is more related to an issue with the Swagger spec itself (OAI/OpenAPI-Specification#229) but I thought it would be important to track here too. Right now there's no difference between a required field and a nullable field. Let's say I have a model that looks like this
The best way to do this would be have the nullable field be
"type" : ["number","null"]
but alas swagger doesn't support that.Right now I'm adding in custom mapping in the swaggerconfig for each of the main nullables and praying no one else does anything weird in the project to require other value types to be exposed as a nullable and putting a vendor extension of "x-nullable"
The text was updated successfully, but these errors were encountered: