forked from loafle/openapi-generator-original
[kotlin] Fix model imports when using exploded query params (#18440)
* Fix model package import * Fix typo * Add missing properties to docs * Revert "Add missing properties to docs" This reverts commit 67a68f9ea7e4053d7955814f13e76f0e382bf191.
This commit is contained in:
parent
d25c5a8b26
commit
406d00fe9b
@ -957,7 +957,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
|
|||||||
if (param.isQueryParam && "form".equals(param.style) && param.isExplode && param.isModel) {
|
if (param.isQueryParam && "form".equals(param.style) && param.isExplode && param.isModel) {
|
||||||
// query parameter (style: form, explode) referencing models need to import
|
// query parameter (style: form, explode) referencing models need to import
|
||||||
// models defined in the properties of the models
|
// models defined in the properties of the models
|
||||||
operations.put("x-koltin-import-models", true);
|
operations.put("x-kotlin-import-models", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,10 +59,10 @@ import kotlinx.serialization.*
|
|||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
{{#x-koltin-import-models}}
|
{{#x-kotlin-import-models}}
|
||||||
import {{{packageName}}}.models.*
|
import {{{modelPackage}}}.*
|
||||||
|
|
||||||
{{/x-koltin-import-models}}
|
{{/x-kotlin-import-models}}
|
||||||
{{#x-kotlin-multipart-import}}
|
{{#x-kotlin-multipart-import}}
|
||||||
{{^isMultipart}}
|
{{^isMultipart}}
|
||||||
import okhttp3.MultipartBody
|
import okhttp3.MultipartBody
|
||||||
|
Loading…
x
Reference in New Issue
Block a user