Skip to content

Commit

Permalink
fix: when instantiation type is not defined for language, return type…
Browse files Browse the repository at this point in the history
… itself for parent (#18164)
  • Loading branch information
mvarchdev committed Mar 21, 2024
1 parent bcd0bc5 commit 9c26ad4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,11 @@ public String toInstantiationType(Schema schema) {
if (ModelUtils.isMapSchema(schema)) {
Schema additionalProperties = ModelUtils.getAdditionalProperties(schema);
String inner = getSchemaType(additionalProperties);
return instantiationTypes.get("map") + "<String, " + inner + ">";
String mapInstantion = instantiationTypes.get("map");
if (mapInstantion != null) {
return mapInstantion + "<String, " + inner + ">";
}
return inner;
} else if (ModelUtils.isArraySchema(schema)) {
ArraySchema arraySchema = (ArraySchema) schema;
String inner = getSchemaType(getSchemaItems(arraySchema));
Expand Down

0 comments on commit 9c26ad4

Please sign in to comment.