forked from loafle/openapi-generator-original
Handle both types of additional properties when getting type declaration (#18201)
This commit is contained in:
parent
8288b6fb15
commit
aedf571811
@ -171,9 +171,13 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi
|
|||||||
|
|
||||||
return "(s/coll-of " + getTypeDeclaration(inner) + ")";
|
return "(s/coll-of " + getTypeDeclaration(inner) + ")";
|
||||||
} else if (ModelUtils.isMapSchema(p)) {
|
} else if (ModelUtils.isMapSchema(p)) {
|
||||||
Schema inner = (Schema) p.getAdditionalProperties();
|
Object additionalProperties = p.getAdditionalProperties();
|
||||||
|
// additionalProperties is either a Schema or a Boolean
|
||||||
return "(s/map-of string? " + getTypeDeclaration(inner) + ")";
|
if (additionalProperties instanceof Schema) {
|
||||||
|
Schema inner = (Schema) additionalProperties;
|
||||||
|
return "(s/map-of string? " + getTypeDeclaration(inner) + ")";
|
||||||
|
}
|
||||||
|
return "(s/map-of string? s/any?)";
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's a type we defined, we want to append the spec suffix
|
// If it's a type we defined, we want to append the spec suffix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user