Created by: impl
It is possible, though contrived, for a property to have both isAnyType
and isModel
set. In this case, when the outer type is nullable, the Go template expects a Nullable*
type to be provided by the generator, but it is skipped over instead. This change aligns the generator with the template's expectations.
Note that without these changes, the generated Go code will not compile. I've included a test to demonstrate the expected behavior.
Also, for debugging purposes, it was helpful to have the value of isAnyType
printed when dumping a CodegenProperty
. In fact, it was missing from equals
and hashCode
too, so I updated it. That change doesn't have any impact on the generators though as far as I can tell and I'm happy to back that bit out if needed.
PR checklist
-
Read the contribution guidelines. -
Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. -
Run the following to build the project and update samples: ./mvnw clean package ./bin/generate-samples.sh ./bin/utils/export_docs_generators.sh
./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH. -
File the PR against the correct branch: master
(5.3.0),6.0.x
-
If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
For Go, @antihax @grokify @kemokemo @jirikuncar @ph4r5h4d