-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated code does not compile for inheritance with System.Text.Json #3871
Comments
Did you use latest NSwag version? I think this has been fixed recently... |
I've just updated to 13.15.8 Same, nothing changed. |
v13.15.9 (soon) |
After updating to v13.15.9, still there is one more compilation error remained:
|
RicoSuter
added a commit
to RicoSuter/NJsonSchema
that referenced
this issue
Feb 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the OpenAPI 3.0 schema defines inheritance the generated code using
System.Text.Json
is full of compilation errors.NSwag: 13.15.7
OpenAPI definition:
Command:
dotnet nswag openapi2csclient /JsonLibrary:SystemTextJson
Generated model specifies
JsonInheritanceConverter
improperly, which leaves a compilation error:Generated
JsonInheritanceConverter
still uses NewtonsoftJson, which leaves a lot of compilation errors:internal class JsonInheritanceConverter : Newtonsoft.Json.JsonConverter
Is there any issue with the OpenAPI definition or does the command require some more parameters?
Though, the generated code using
NewtonsoftJson
works as expected.The text was updated successfully, but these errors were encountered: