We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Previously nullable types were supported in scope of this issue #1418
But for now if field is required but nullable, it will not use the reference as expected.
For example if we have such schema
schemaWithNullable: type: object required: - nullable_number properties: nullable_number: type: - number - "null"
The result will be this
type EventWithNullable struct { NullableNumber float64 `json:"nullable_number"` // should be *float64 }
Looks like in this condition must be used OR instead of AND (as the Java generator does)
if (constrainedModel.options.isNullable || !required) { return typeWhenNullableOrOptional; }
For nullable but required field in schema, the result should be generated with reference type, instead of value.
None
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug.
Previously nullable types were supported in scope of this issue #1418
But for now if field is required but nullable, it will not use the reference as expected.
For example if we have such schema
The result will be this
Looks like in this condition must be used OR instead of AND (as the Java generator does)
Expected behavior
For nullable but required field in schema, the result should be generated with reference type, instead of value.
Screenshots
How to Reproduce
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None
The text was updated successfully, but these errors were encountered: