Swagger 2.0 generator and nullability

106 Views Asked by At

I'm generating a client-side C# api for a swagger 2.0 document using OpenAPI Generator, however none of the hundreds of properties that should be nullable are being generated as that, and the end result is that you use this API to retrieve anything from the server, it just explodes when a record returns null for any given property.

As I understand it Swagger 2.0 doesn't support defining nullability (crazy..)


What solutions can I implement for an OpenAPI generator running against a 2.0 spec regarding nullability? Surely this is a massive problem for the decade since Swagger 2.0 has been around?

0

There are 0 best solutions below