Created by: DonDi94
Change-Id: Ic6e87bfdfa58a4a8f6f1f3aac043c57260ed873c
PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first. -
Filed the PR against the correct branch: master,4.1.x,5.0.x. Default:master. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
Description of the PR
Referencing to issue #2923
The change is in DefaultCodegen, so I haven't ran any language-specific script.
The referenced enum schema was missing both the type checking and the assignment of the variable isEnum. I moved the typechecking of the property to an external function which I then use for both the properties p and referencedSchema.
I have been using this fix for a personal project and it has been working well so far. I also tested the case in the issue request and it is solved. The library builds correctly with mvn clean install, but sadly I couldn't test through mvn verify -Psamples as it stops on language specific tests because I am missing the needed tools and running it in a protected environment.