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
When trying to upgrade to NSwag 14 (on a dotnet 7 project) I noticed that the swagger.json and thus all code generated based on that specification includes internal and private properties on classes that are being used.
I have noticed that other people have reported similar things but as a solution added [JsonIgnore] to these properties. See #4681 and some comments on #4524.
But for some types that isn't a solution, for instance for a Tuple that is part of dotnet.
Is there any idea on how to fix this? What has changed between NSwag 13 and 14 that changes this behavior? If someone can point me in some direction I could have a look myself.
The text was updated successfully, but these errors were encountered:
It seems that property1 below will be added to the API but property2 will not.
// Why does this get added to the API? It is private!
private string Property1 { get; }
// This does not get added to the API
private string Property2 { get; set; }
When trying to upgrade to NSwag 14 (on a dotnet 7 project) I noticed that the swagger.json and thus all code generated based on that specification includes internal and private properties on classes that are being used.
I have noticed that other people have reported similar things but as a solution added [JsonIgnore] to these properties. See #4681 and some comments on #4524.
But for some types that isn't a solution, for instance for a Tuple that is part of dotnet.
NSwag 13 generated the following for a Tuple:
NSwag 14 includes 2 private properties:
Is there any idea on how to fix this? What has changed between NSwag 13 and 14 that changes this behavior? If someone can point me in some direction I could have a look myself.
The text was updated successfully, but these errors were encountered: