mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
Merge pull request #1144 from ePaul/bugfix/1143-add-nullcheck-for-allowedvalues
Add null check to fix issue #1143
This commit is contained in:
commit
72255286b3
@ -340,6 +340,8 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
continue;
|
||||
List<String> values = (List<String>) allowableValues.get("values");
|
||||
// put "enumVars" map into `allowableValues", including `name` and `value`
|
||||
if (values == null)
|
||||
continue;
|
||||
List<Map<String, String>> enumVars = new ArrayList<Map<String, String>>();
|
||||
for (String value : values) {
|
||||
Map<String, String> enumVar = new HashMap<String, String>();
|
||||
|
Loading…
Reference in New Issue
Block a user