Skip to content

Commit 0a48976

Browse files
authored
[BUG] KOTLIN URI gerneration for URIs with default value misses the package info and uses wrong quotes. (#11493)
fixed generation of URI with default value
1 parent 5ee2de9 commit 0a48976

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ public String toDefaultValue(Schema schema) {
10051005
}
10061006
} else if (ModelUtils.isURISchema(p)) {
10071007
if (p.getDefault() != null) {
1008-
return "URI.create('" + p.getDefault() + "')";
1008+
return importMapping.get("URI") + ".create(\"" + p.getDefault() + "\")";
10091009
}
10101010
} else if (ModelUtils.isArraySchema(p)) {
10111011
if (p.getDefault() != null) {

0 commit comments

Comments
 (0)