diff --git a/src/main/resources/handlebars/Java/README.mustache b/src/main/resources/handlebars/Java/README.mustache index 1ea6a809fb..cc5c3afefd 100644 --- a/src/main/resources/handlebars/Java/README.mustache +++ b/src/main/resources/handlebars/Java/README.mustache @@ -79,7 +79,7 @@ Please follow the [installation](#installation) instruction and execute the foll {{#apiInfo}}{{#apis}}{{#@first}}{{#operations}}{{#operation}}{{#contents}}{{#@first}} import {{{invokerPackage}}}.*; import {{{invokerPackage}}}.auth.*; -import {{{modelPackage}}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{{package}}}.{{{classname}}}; import java.io.File; diff --git a/src/main/resources/handlebars/Java/api.mustache b/src/main/resources/handlebars/Java/api.mustache index 75577a6b45..d208b6856f 100644 --- a/src/main/resources/handlebars/Java/api.mustache +++ b/src/main/resources/handlebars/Java/api.mustache @@ -6,7 +6,8 @@ import com.sun.jersey.api.client.GenericType; import {{invokerPackage}}.ApiException; import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.Configuration; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} + import {{invokerPackage}}.Pair; {{#imports}}import {{import}}; diff --git a/src/main/resources/handlebars/Java/libraries/okhttp-gson/JSON.mustache b/src/main/resources/handlebars/Java/libraries/okhttp-gson/JSON.mustache index 3aed961e47..3dcef4e9c7 100644 --- a/src/main/resources/handlebars/Java/libraries/okhttp-gson/JSON.mustache +++ b/src/main/resources/handlebars/Java/libraries/okhttp-gson/JSON.mustache @@ -25,7 +25,7 @@ import org.threeten.bp.OffsetDateTime; import org.threeten.bp.format.DateTimeFormatter; {{/threetenbp}} -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import java.io.IOException; import java.io.StringReader; diff --git a/src/main/resources/handlebars/Java/libraries/retrofit2/JSON.mustache b/src/main/resources/handlebars/Java/libraries/retrofit2/JSON.mustache index 237b4640c9..cc73a66ed2 100644 --- a/src/main/resources/handlebars/Java/libraries/retrofit2/JSON.mustache +++ b/src/main/resources/handlebars/Java/libraries/retrofit2/JSON.mustache @@ -25,7 +25,7 @@ import org.threeten.bp.OffsetDateTime; import org.threeten.bp.format.DateTimeFormatter; {{/threetenbp}} -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import java.io.IOException; import java.io.StringReader; diff --git a/src/main/resources/handlebars/JavaInflector/api.mustache b/src/main/resources/handlebars/JavaInflector/api.mustache index de0c86bdcf..055ef574eb 100644 --- a/src/main/resources/handlebars/JavaInflector/api.mustache +++ b/src/main/resources/handlebars/JavaInflector/api.mustache @@ -8,7 +8,7 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import java.io.File; import java.util.List; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#imports}}import {{import}}; {{/imports}} diff --git a/src/main/resources/handlebars/JavaInflector/inflector.mustache b/src/main/resources/handlebars/JavaInflector/inflector.mustache index 8d08a2a015..31c031704e 100644 --- a/src/main/resources/handlebars/JavaInflector/inflector.mustache +++ b/src/main/resources/handlebars/JavaInflector/inflector.mustache @@ -1,5 +1,5 @@ controllerPackage: {{invokerPackage}} -modelPackage: {{modelPackage}} +{{#hasModel}}modelPackage: {{modelPackage}}{{/hasModel}} swaggerUrl: ./src/main/resources/openapi3.yaml modelMappings: # to enable explicit mappings, use this syntax: diff --git a/src/main/resources/handlebars/JavaJaxRS/api.mustache b/src/main/resources/handlebars/JavaJaxRS/api.mustache index 940db88ba2..39489320ec 100644 --- a/src/main/resources/handlebars/JavaJaxRS/api.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{package}}.{{classname}}Service; import {{package}}.factories.{{classname}}ServiceFactory; diff --git a/src/main/resources/handlebars/JavaJaxRS/apiService.mustache b/src/main/resources/handlebars/JavaJaxRS/apiService.mustache index fe6fccf603..860dda7270 100644 --- a/src/main/resources/handlebars/JavaJaxRS/apiService.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import org.glassfish.jersey.media.multipart.FormDataContentDisposition; diff --git a/src/main/resources/handlebars/JavaJaxRS/apiServiceImpl.mustache b/src/main/resources/handlebars/JavaJaxRS/apiServiceImpl.mustache index f67652831f..f43cc2774a 100644 --- a/src/main/resources/handlebars/JavaJaxRS/apiServiceImpl.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#imports}}import {{import}}; {{/imports}} diff --git a/src/main/resources/handlebars/JavaJaxRS/cxf-cdi/apiService.mustache b/src/main/resources/handlebars/JavaJaxRS/cxf-cdi/apiService.mustache index d7360fb52e..d75faaca09 100644 --- a/src/main/resources/handlebars/JavaJaxRS/cxf-cdi/apiService.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/cxf-cdi/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Multipart; diff --git a/src/main/resources/handlebars/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache b/src/main/resources/handlebars/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache index 04e511785f..b0af063d33 100644 --- a/src/main/resources/handlebars/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import org.apache.cxf.jaxrs.ext.multipart.Attachment; diff --git a/src/main/resources/handlebars/JavaJaxRS/di/api.mustache b/src/main/resources/handlebars/JavaJaxRS/di/api.mustache index 4731f87186..6ac2b09fbf 100644 --- a/src/main/resources/handlebars/JavaJaxRS/di/api.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/di/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{package}}.{{classname}}Service; {{#useOas2}} diff --git a/src/main/resources/handlebars/JavaJaxRS/di/apiService.mustache b/src/main/resources/handlebars/JavaJaxRS/di/apiService.mustache index f937313f10..56092f5e7c 100644 --- a/src/main/resources/handlebars/JavaJaxRS/di/apiService.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/di/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import org.glassfish.jersey.media.multipart.FormDataContentDisposition; diff --git a/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/api.mustache b/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/api.mustache index 0dd0d3abfc..f71a06d9bc 100644 --- a/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/api.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{package}}.{{classname}}Service; import {{package}}.factories.{{classname}}ServiceFactory; diff --git a/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/apiService.mustache b/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/apiService.mustache index d22487ed9c..06d2d6a051 100644 --- a/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/apiService.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import com.sun.jersey.multipart.FormDataParam; diff --git a/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache b/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache index 8aca7b5431..d22f98fb8c 100644 --- a/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import com.sun.jersey.multipart.FormDataParam; diff --git a/src/main/resources/handlebars/JavaJaxRS/resteasy/api.mustache b/src/main/resources/handlebars/JavaJaxRS/resteasy/api.mustache index ddb394f55d..d37b6b3936 100644 --- a/src/main/resources/handlebars/JavaJaxRS/resteasy/api.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/resteasy/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{package}}.{{classname}}Service; {{#useOas2}} diff --git a/src/main/resources/handlebars/JavaJaxRS/resteasy/apiService.mustache b/src/main/resources/handlebars/JavaJaxRS/resteasy/apiService.mustache index af75676a32..83741b6ec0 100644 --- a/src/main/resources/handlebars/JavaJaxRS/resteasy/apiService.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/resteasy/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; {{/isMultipart}}{{/operation}}{{/operations}} diff --git a/src/main/resources/handlebars/JavaJaxRS/resteasy/apiServiceImpl.mustache b/src/main/resources/handlebars/JavaJaxRS/resteasy/apiServiceImpl.mustache index bd149e0c98..aa22aae714 100644 --- a/src/main/resources/handlebars/JavaJaxRS/resteasy/apiServiceImpl.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/resteasy/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; {{/isMultipart}}{{/operation}}{{/operations}} diff --git a/src/main/resources/handlebars/JavaJaxRS/resteasy/eap/api.mustache b/src/main/resources/handlebars/JavaJaxRS/resteasy/eap/api.mustache index 8b17312f8e..bc4925176e 100644 --- a/src/main/resources/handlebars/JavaJaxRS/resteasy/eap/api.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/resteasy/eap/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#useOas2}} import io.swagger.annotations.ApiParam; diff --git a/src/main/resources/handlebars/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache b/src/main/resources/handlebars/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache index 48fa8158a8..b37b1cf289 100644 --- a/src/main/resources/handlebars/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; {{/isMultipart}}{{/operation}}{{/operations}} diff --git a/src/main/resources/handlebars/kotlin-client/api_doc.mustache b/src/main/resources/handlebars/kotlin-client/api_doc.mustache index 9257177ca1..b390671f68 100644 --- a/src/main/resources/handlebars/kotlin-client/api_doc.mustache +++ b/src/main/resources/handlebars/kotlin-client/api_doc.mustache @@ -23,7 +23,7 @@ Method | HTTP request | Description ```kotlin // Import classes: //import {{{packageName}}}.infrastructure.* -//import {{{modelPackage}}}.* +//{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() diff --git a/src/main/resources/handlebars/kotlin-server/api_doc.mustache b/src/main/resources/handlebars/kotlin-server/api_doc.mustache index de9ce228d5..eb212243df 100644 --- a/src/main/resources/handlebars/kotlin-server/api_doc.mustache +++ b/src/main/resources/handlebars/kotlin-server/api_doc.mustache @@ -23,7 +23,7 @@ Method | HTTP request | Description ```kotlin // Import classes: //import {{{packageName}}}.infrastructure.* -//import {{{modelPackage}}}.* +//{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() diff --git a/src/main/resources/handlebars/kotlin-server/libraries/ktor/Paths.kt.mustache b/src/main/resources/handlebars/kotlin-server/libraries/ktor/Paths.kt.mustache index d6b7a47378..f2aa869911 100644 --- a/src/main/resources/handlebars/kotlin-server/libraries/ktor/Paths.kt.mustache +++ b/src/main/resources/handlebars/kotlin-server/libraries/ktor/Paths.kt.mustache @@ -7,7 +7,7 @@ import io.ktor.locations.* import io.ktor.pipeline.PipelineContext import io.ktor.routing.Route import io.ktor.routing.method -import {{modelPackage}}.* +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#imports}} import {{import}} diff --git a/src/main/resources/mustache/Java/JSON.mustache b/src/main/resources/mustache/Java/JSON.mustache index c73fdf220f..6056c3f4fa 100644 --- a/src/main/resources/mustache/Java/JSON.mustache +++ b/src/main/resources/mustache/Java/JSON.mustache @@ -26,7 +26,7 @@ import org.threeten.bp.format.DateTimeFormatter; {{/threetenbp}} {{#parent.length}} -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{/parent.length}} import okio.ByteString; diff --git a/src/main/resources/mustache/Java/README.mustache b/src/main/resources/mustache/Java/README.mustache index 6ec3efff47..682a7d48f2 100644 --- a/src/main/resources/mustache/Java/README.mustache +++ b/src/main/resources/mustache/Java/README.mustache @@ -79,7 +79,7 @@ Please follow the [installation](#installation) instruction and execute the foll {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} import {{{invokerPackage}}}.*; import {{{invokerPackage}}}.auth.*; -import {{{modelPackage}}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{{package}}}.{{{classname}}}; import java.io.File; diff --git a/src/main/resources/mustache/Java/api.mustache b/src/main/resources/mustache/Java/api.mustache index 542ccbba28..9cc0912e70 100644 --- a/src/main/resources/mustache/Java/api.mustache +++ b/src/main/resources/mustache/Java/api.mustache @@ -6,7 +6,7 @@ import com.sun.jersey.api.client.GenericType; import {{invokerPackage}}.ApiException; import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.Configuration; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{invokerPackage}}.Pair; {{#imports}}import {{import}}; diff --git a/src/main/resources/mustache/Java/libraries/retrofit2/JSON.mustache b/src/main/resources/mustache/Java/libraries/retrofit2/JSON.mustache index 7fd2e7571e..0e1d28677e 100644 --- a/src/main/resources/mustache/Java/libraries/retrofit2/JSON.mustache +++ b/src/main/resources/mustache/Java/libraries/retrofit2/JSON.mustache @@ -26,7 +26,7 @@ import org.threeten.bp.format.DateTimeFormatter; {{/threetenbp}} {{#parent.length}} -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{/parent.length}} import java.io.IOException; diff --git a/src/main/resources/mustache/JavaInflector/api.mustache b/src/main/resources/mustache/JavaInflector/api.mustache index 7bf9805c43..d65912b7c5 100644 --- a/src/main/resources/mustache/JavaInflector/api.mustache +++ b/src/main/resources/mustache/JavaInflector/api.mustache @@ -8,7 +8,7 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import java.io.File; import java.util.List; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#imports}}import {{import}}; {{/imports}} diff --git a/src/main/resources/mustache/JavaInflector/inflector.mustache b/src/main/resources/mustache/JavaInflector/inflector.mustache index 87fc558131..459f9a5260 100644 --- a/src/main/resources/mustache/JavaInflector/inflector.mustache +++ b/src/main/resources/mustache/JavaInflector/inflector.mustache @@ -1,5 +1,5 @@ controllerPackage: {{invokerPackage}} -modelPackage: {{modelPackage}} +{{#hasModel}}modelPackage: {{modelPackage}}{{/hasModel}} swaggerUrl: ./src/main/swagger/swagger.yaml modelMappings: # to enable explicit mappings, use this syntax: diff --git a/src/main/resources/mustache/JavaJaxRS/api.mustache b/src/main/resources/mustache/JavaJaxRS/api.mustache index 4c1f0d69f6..c11e8530a6 100644 --- a/src/main/resources/mustache/JavaJaxRS/api.mustache +++ b/src/main/resources/mustache/JavaJaxRS/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{package}}.{{classname}}Service; import {{package}}.factories.{{classname}}ServiceFactory; diff --git a/src/main/resources/mustache/JavaJaxRS/apiService.mustache b/src/main/resources/mustache/JavaJaxRS/apiService.mustache index 4f8079c80b..c2926e8b9d 100644 --- a/src/main/resources/mustache/JavaJaxRS/apiService.mustache +++ b/src/main/resources/mustache/JavaJaxRS/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import org.glassfish.jersey.media.multipart.FormDataContentDisposition; diff --git a/src/main/resources/mustache/JavaJaxRS/apiServiceImpl.mustache b/src/main/resources/mustache/JavaJaxRS/apiServiceImpl.mustache index 6d0efd634e..37926a11f4 100644 --- a/src/main/resources/mustache/JavaJaxRS/apiServiceImpl.mustache +++ b/src/main/resources/mustache/JavaJaxRS/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#imports}}import {{import}}; {{/imports}} diff --git a/src/main/resources/mustache/JavaJaxRS/cxf-cdi/apiService.mustache b/src/main/resources/mustache/JavaJaxRS/cxf-cdi/apiService.mustache index d7360fb52e..d75faaca09 100644 --- a/src/main/resources/mustache/JavaJaxRS/cxf-cdi/apiService.mustache +++ b/src/main/resources/mustache/JavaJaxRS/cxf-cdi/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Multipart; diff --git a/src/main/resources/mustache/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache b/src/main/resources/mustache/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache index 04e511785f..b0af063d33 100644 --- a/src/main/resources/mustache/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache +++ b/src/main/resources/mustache/JavaJaxRS/cxf-cdi/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import org.apache.cxf.jaxrs.ext.multipart.Attachment; diff --git a/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/api.mustache b/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/api.mustache index 0dd0d3abfc..f71a06d9bc 100644 --- a/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/api.mustache +++ b/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{package}}.{{classname}}Service; import {{package}}.factories.{{classname}}ServiceFactory; diff --git a/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/apiService.mustache b/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/apiService.mustache index d22487ed9c..06d2d6a051 100644 --- a/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/apiService.mustache +++ b/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import com.sun.jersey.multipart.FormDataParam; diff --git a/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache b/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache index 229a961f8f..1b94d8cb57 100644 --- a/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache +++ b/src/main/resources/mustache/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import com.sun.jersey.multipart.FormDataParam; diff --git a/src/main/resources/mustache/JavaJaxRS/resteasy/api.mustache b/src/main/resources/mustache/JavaJaxRS/resteasy/api.mustache index ddb394f55d..d37b6b3936 100644 --- a/src/main/resources/mustache/JavaJaxRS/resteasy/api.mustache +++ b/src/main/resources/mustache/JavaJaxRS/resteasy/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} import {{package}}.{{classname}}Service; {{#useOas2}} diff --git a/src/main/resources/mustache/JavaJaxRS/resteasy/apiService.mustache b/src/main/resources/mustache/JavaJaxRS/resteasy/apiService.mustache index af75676a32..83741b6ec0 100644 --- a/src/main/resources/mustache/JavaJaxRS/resteasy/apiService.mustache +++ b/src/main/resources/mustache/JavaJaxRS/resteasy/apiService.mustache @@ -1,7 +1,7 @@ package {{package}}; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; {{/isMultipart}}{{/operation}}{{/operations}} diff --git a/src/main/resources/mustache/JavaJaxRS/resteasy/apiServiceImpl.mustache b/src/main/resources/mustache/JavaJaxRS/resteasy/apiServiceImpl.mustache index bd149e0c98..aa22aae714 100644 --- a/src/main/resources/mustache/JavaJaxRS/resteasy/apiServiceImpl.mustache +++ b/src/main/resources/mustache/JavaJaxRS/resteasy/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; {{/isMultipart}}{{/operation}}{{/operations}} diff --git a/src/main/resources/mustache/JavaJaxRS/resteasy/eap/api.mustache b/src/main/resources/mustache/JavaJaxRS/resteasy/eap/api.mustache index 8b17312f8e..bc4925176e 100644 --- a/src/main/resources/mustache/JavaJaxRS/resteasy/eap/api.mustache +++ b/src/main/resources/mustache/JavaJaxRS/resteasy/eap/api.mustache @@ -1,6 +1,6 @@ package {{package}}; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#useOas2}} import io.swagger.annotations.ApiParam; diff --git a/src/main/resources/mustache/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache b/src/main/resources/mustache/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache index 48fa8158a8..b37b1cf289 100644 --- a/src/main/resources/mustache/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache +++ b/src/main/resources/mustache/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache @@ -1,7 +1,7 @@ package {{package}}.impl; import {{package}}.*; -import {{modelPackage}}.*; +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; {{/isMultipart}}{{/operation}}{{/operations}} diff --git a/src/main/resources/mustache/kotlin-client/api_doc.mustache b/src/main/resources/mustache/kotlin-client/api_doc.mustache index 013a643632..05e5e43968 100644 --- a/src/main/resources/mustache/kotlin-client/api_doc.mustache +++ b/src/main/resources/mustache/kotlin-client/api_doc.mustache @@ -23,7 +23,7 @@ Method | HTTP request | Description ```kotlin // Import classes: //import {{{packageName}}}.infrastructure.* -//import {{{modelPackage}}}.* +//{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() diff --git a/src/main/resources/mustache/kotlin-server/api_doc.mustache b/src/main/resources/mustache/kotlin-server/api_doc.mustache index 013a643632..05e5e43968 100644 --- a/src/main/resources/mustache/kotlin-server/api_doc.mustache +++ b/src/main/resources/mustache/kotlin-server/api_doc.mustache @@ -23,7 +23,7 @@ Method | HTTP request | Description ```kotlin // Import classes: //import {{{packageName}}}.infrastructure.* -//import {{{modelPackage}}}.* +//{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{! TODO: Auth method documentation examples}} val apiInstance = {{{classname}}}() diff --git a/src/main/resources/mustache/kotlin-server/libraries/ktor/Paths.kt.mustache b/src/main/resources/mustache/kotlin-server/libraries/ktor/Paths.kt.mustache index d6b7a47378..f2aa869911 100644 --- a/src/main/resources/mustache/kotlin-server/libraries/ktor/Paths.kt.mustache +++ b/src/main/resources/mustache/kotlin-server/libraries/ktor/Paths.kt.mustache @@ -7,7 +7,7 @@ import io.ktor.locations.* import io.ktor.pipeline.PipelineContext import io.ktor.routing.Route import io.ktor.routing.method -import {{modelPackage}}.* +{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}} {{#imports}} import {{import}}