Created by: randeepbydesign
demonstrating issue where type mappings are not taken into account when showing the default value. See https://github.com/OpenAPITools/openapi-generator/issues/11029
I would have included the proposed fix along with this PR but it isn't working for me.
- Modified
getDefaultValue()
to callgetSchemaType()
- Was hoping this would return the
Long
type, but it returns ModelLong with a warning. It looks like there is some redundancy in the use of typeMappings as AbstractJavaCodegen.getSchemaType calls the DefaultCodegen.getSchemaType and both use typemappings which interferes with the attempt to return a value before callingtoModelName
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.