[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
This commit is contained in:
Stefan Nöbauer 2022-03-21 15:57:19 +01:00 committed by GitHub
parent 5ee2de95ce
commit 0a48976ccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1005,7 +1005,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
} }
} else if (ModelUtils.isURISchema(p)) { } else if (ModelUtils.isURISchema(p)) {
if (p.getDefault() != null) { if (p.getDefault() != null) {
return "URI.create('" + p.getDefault() + "')"; return importMapping.get("URI") + ".create(\"" + p.getDefault() + "\")";
} }
} else if (ModelUtils.isArraySchema(p)) { } else if (ModelUtils.isArraySchema(p)) {
if (p.getDefault() != null) { if (p.getDefault() != null) {