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 was recently tasked with upgrading Swashbuckle in our codebase from 5.4.1, to what is now 6.5.0; tho I did most of my update with a build straight of of master due to the bug fixed in #2529.
The formatted swagger.json is some 110K, which is quite hefty, and the differences were extensive. In most cases, this was a stricter better change, but one class of change in particular hurt me. Dictionary's for projects that do not yet have implement the Nullability for reference types are producing schema's where the values are nullable. 5.4.1 would produce this:
For me, this is breaking as we use other tools to generate SDK's based on the swagger.json. I have tried a few things to remove the "nullable": true, but have been completely bamboozaled. I am unable to enable nullable reference types in our solution.
Specifically, I've tried to specify what the schema should look like by providing a MapType definition for all the cases that are important to me; e.g.
But regardless of this override, I still get a nullable value. Not what I was expecting.
So I think this is a bug. If have a type map, I should get what I asked for. I have made a change to a local copy, and know where the change needs to take place. But before I submit a PR, I just wanted to ask and see if I was being a bit dippy, and there is in fact a way to get the behaviour I am looking for? Also, is this something you would consider taking as a PR, or not something you want? FWIW, it's not a big change;
To make issue tracking a bit less overwhelming for the new maintainers (see #2778), I've created a new tracking issue to roll-up various nullability issues here: #2793.
We'll refer back to this issue from there and include it as part of resolving that issue, but I'm going to close this one to help prune the backlog.
I was recently tasked with upgrading Swashbuckle in our codebase from
5.4.1
, to what is now6.5.0
; tho I did most of my update with a build straight of of master due to the bug fixed in #2529.The formatted
swagger.json
is some 110K, which is quite hefty, and the differences were extensive. In most cases, this was a stricter better change, but one class of change in particular hurt me.Dictionary
's for projects that do not yet have implement the Nullability for reference types are producing schema's where the values are nullable.5.4.1
would produce this:and 6.x produces this
For me, this is breaking as we use other tools to generate SDK's based on the
swagger.json
. I have tried a few things to remove the"nullable": true
, but have been completely bamboozaled. I am unable to enable nullable reference types in our solution.Specifically, I've tried to specify what the schema should look like by providing a
MapType
definition for all the cases that are important to me; e.g.But regardless of this override, I still get a nullable value. Not what I was expecting.
So I think this is a bug. If have a type map, I should get what I asked for. I have made a change to a local copy, and know where the change needs to take place. But before I submit a PR, I just wanted to ask and see if I was being a bit dippy, and there is in fact a way to get the behaviour I am looking for? Also, is this something you would consider taking as a PR, or not something you want? FWIW, it's not a big change;
The text was updated successfully, but these errors were encountered: