diff --git a/apivideo-generator/src/main/java/video/api/client/generator/Java.java b/apivideo-generator/src/main/java/video/api/client/generator/Java.java index e68412f6..915776e6 100644 --- a/apivideo-generator/src/main/java/video/api/client/generator/Java.java +++ b/apivideo-generator/src/main/java/video/api/client/generator/Java.java @@ -75,10 +75,12 @@ public Map postProcessOperationsWithModels(Map o .flatMap(p -> p.vars.stream()) .forEach(v -> { if (v.dataType.equals("List")) { - v.example = "Arrays.asList(" + v.example - .replaceAll("\\[", "") - .replaceAll("\\]", "") - .replaceAll("\\\\\"", "\"") + ")"; + if(v.example != null) { + v.example = "Arrays.asList(" + v.example + .replaceAll("\\[", "") + .replaceAll("\\]", "") + .replaceAll("\\\\\"", "\"") + ")"; + } } else if (v.isArray) { v.example = "Collections.<" + v.items.dataType + ">emptyList()"; } else if (v.isString) {