Skip to content
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

Unable to compile generated http client after setting generateNullableReferenceTypes to true #4467

Open
srgoapp opened this issue Jun 26, 2023 · 0 comments

Comments

@srgoapp
Copy link

srgoapp commented Jun 26, 2023

When setting generateNullableReferenceTypes to true, the following compile errors occur.

     C:\riderprojects\Eltilmelding\TestCommon\obj\swaggerClient.cs(17411,30): error CS8765: Nullability of type of parameter 'value' doesn't match overridden member (possibly because of nullability attributes).
     C:\riderprojects\Eltilmelding\TestCommon\obj\swaggerClient.cs(17458,32): error CS8765: Nullability of type of parameter 'existingValue' doesn't match overridden member (possibly because of nullability attributes).
     C:\riderprojects\Eltilmelding\TestCommon\obj\swaggerClient.cs(17466,56): error CS8604: Possible null reference argument for parameter 'discriminator' in 'Type JsonInheritanceConverter.GetObjectSubtype(Type objectType, string discriminator)'.

The problems seems to be that the generated class JsonInheritanceConverter that derive from Newtonsoft.Json.JsonConverter does not match the method signature for override methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant