Closed mattiasw2 closed 4 years ago
The swagger.json is generated by
"x-generator": "NSwag v13.1.6.0 (NJsonSchema v10.0.28.0 (Newtonsoft.Json v12.0.0.0))",
After reading the https://tools.ietf.org/html/rfc7807 , I get the impression that the extensions field shouldn't even be part of the the type in the swagger.json. When a ProblemDetails object is converted to json, all pairs in extensions should be lifted to the top level.
Hi. Thanks for contacting us. We're closing this issue as there was not much community interest in this ask for quite a while now.
Is your feature request related to a problem? Please describe.
I use aspnet core 3.0, and I am generating the client using openapi-generator for Elm. The problem is that Elm is a typed programming language, so the extensions field below in the swagger.json cannot be handled by Elm. If TypeScript takes types seriously, it should have the same problem.
I am also wondering about the type, it just says object, but according to https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.problemdetails.extensions?view=aspnetcore-3.0 it should be
Why the mismatch? However this would not help me, since there is still a generic object in the type.
Describe the solution you'd like
Currently, I just delete the extensions field in swagger.json, and then generate the api. So even if the server sends it, it will just be thrown away by the client code.
However, a more type-friendly solution would be appreciated.