forked from loafle/openapi-generator-original
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;
|
continue;
|
||||||
List<String> values = (List<String>) allowableValues.get("values");
|
List<String> values = (List<String>) allowableValues.get("values");
|
||||||
// put "enumVars" map into `allowableValues", including `name` and `value`
|
// put "enumVars" map into `allowableValues", including `name` and `value`
|
||||||
|
if (values == null)
|
||||||
|
continue;
|
||||||
List<Map<String, String>> enumVars = new ArrayList<Map<String, String>>();
|
List<Map<String, String>> enumVars = new ArrayList<Map<String, String>>();
|
||||||
for (String value : values) {
|
for (String value : values) {
|
||||||
Map<String, String> enumVar = new HashMap<String, String>();
|
Map<String, String> enumVar = new HashMap<String, String>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user