Skip to content

Commit 9be92fa

Browse files
authored
fix incorrect method name (#14720)
1 parent 6095d2d commit 9be92fa

File tree

17 files changed

+38
-38
lines changed

17 files changed

+38
-38
lines changed

modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e
8080
}
8181
// validate the required field `{{{baseName}}}` (array)
8282
for (const item of data['{{{baseName}}}']) {
83-
{{{items.dataType}}}.validateJsonObject(item);
83+
{{{items.dataType}}}.validateJSON(item);
8484
};
8585
{{/isRequired}}
8686
{{^isRequired}}
@@ -91,7 +91,7 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e
9191
}
9292
// validate the optional field `{{{baseName}}}` (array)
9393
for (const item of data['{{{baseName}}}']) {
94-
{{{items.dataType}}}.validateJsonObject(item);
94+
{{{items.dataType}}}.validateJSON(item);
9595
};
9696
}
9797
{{/isRequired}}

samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class FileSchemaTestClass {
7474
}
7575
// validate the optional field `files` (array)
7676
for (const item of data['files']) {
77-
File.validateJsonObject(item);
77+
File.validateJSON(item);
7878
};
7979
}
8080

samples/client/petstore/javascript-apollo/src/model/Pet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Pet {
106106
}
107107
// validate the optional field `tags` (array)
108108
for (const item of data['tags']) {
109-
Tag.validateJsonObject(item);
109+
Tag.validateJSON(item);
110110
};
111111
}
112112
// ensure the json data is a string

samples/client/petstore/javascript-es6/src/model/FileSchemaTestClass.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class FileSchemaTestClass {
7474
}
7575
// validate the optional field `files` (array)
7676
for (const item of data['files']) {
77-
File.validateJsonObject(item);
77+
File.validateJSON(item);
7878
};
7979
}
8080

samples/client/petstore/javascript-es6/src/model/Pet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Pet {
106106
}
107107
// validate the optional field `tags` (array)
108108
for (const item of data['tags']) {
109-
Tag.validateJsonObject(item);
109+
Tag.validateJSON(item);
110110
};
111111
}
112112
// ensure the json data is a string

samples/client/petstore/javascript-promise-es6/src/model/FileSchemaTestClass.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class FileSchemaTestClass {
7474
}
7575
// validate the optional field `files` (array)
7676
for (const item of data['files']) {
77-
File.validateJsonObject(item);
77+
File.validateJSON(item);
7878
};
7979
}
8080

samples/client/petstore/javascript-promise-es6/src/model/Pet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Pet {
106106
}
107107
// validate the optional field `tags` (array)
108108
for (const item of data['tags']) {
109-
Tag.validateJsonObject(item);
109+
Tag.validateJSON(item);
110110
};
111111
}
112112
// ensure the json data is a string

samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
@JsonTypeName("AdditionalPropertiesClass")
2323
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
2424
public class AdditionalPropertiesClass implements Serializable {
25-
private @Valid Map<String, String> mapString = null;
26-
private @Valid Map<String, BigDecimal> mapNumber = null;
27-
private @Valid Map<String, Integer> mapInteger = null;
28-
private @Valid Map<String, Boolean> mapBoolean = null;
29-
private @Valid Map<String, List<Integer>> mapArrayInteger = null;
30-
private @Valid Map<String, List<Object>> mapArrayAnytype = null;
31-
private @Valid Map<String, Map<String, String>> mapMapString = null;
32-
private @Valid Map<String, Map<String, Object>> mapMapAnytype = null;
25+
private @Valid Map<String, String> mapString = new HashMap<>();
26+
private @Valid Map<String, BigDecimal> mapNumber = new HashMap<>();
27+
private @Valid Map<String, Integer> mapInteger = new HashMap<>();
28+
private @Valid Map<String, Boolean> mapBoolean = new HashMap<>();
29+
private @Valid Map<String, List<Integer>> mapArrayInteger = new HashMap<>();
30+
private @Valid Map<String, List<Object>> mapArrayAnytype = new HashMap<>();
31+
private @Valid Map<String, Map<String, String>> mapMapString = new HashMap<>();
32+
private @Valid Map<String, Map<String, Object>> mapMapAnytype = new HashMap<>();
3333
private @Valid Object anytype1;
3434
private @Valid Object anytype2;
3535
private @Valid Object anytype3;

samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@JsonTypeName("ArrayOfArrayOfNumberOnly")
2222
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
2323
public class ArrayOfArrayOfNumberOnly implements Serializable {
24-
private @Valid List<List<BigDecimal>> arrayArrayNumber = null;
24+
private @Valid List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
2525

2626
protected ArrayOfArrayOfNumberOnly(ArrayOfArrayOfNumberOnlyBuilder<?, ?> b) {
2727
this.arrayArrayNumber = b.arrayArrayNumber;

samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@JsonTypeName("ArrayOfNumberOnly")
2222
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
2323
public class ArrayOfNumberOnly implements Serializable {
24-
private @Valid List<BigDecimal> arrayNumber = null;
24+
private @Valid List<BigDecimal> arrayNumber = new ArrayList<>();
2525

2626
protected ArrayOfNumberOnly(ArrayOfNumberOnlyBuilder<?, ?> b) {
2727
this.arrayNumber = b.arrayNumber;

0 commit comments

Comments
 (0)