diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache index e73afb7f3630..e7543518633c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache @@ -30,9 +30,6 @@ import org.springframework.validation.annotation.Validated {{/useBeanValidation}} import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -{{#useRequestMappingOnController}} -import {{#apiPackage}}{{.}}.{{/apiPackage}}{{classname}}Controller.Companion.BASE_PATH -{{/useRequestMappingOnController}} {{#useBeanValidation}} import {{javaxPackage}}.validation.Valid @@ -60,9 +57,7 @@ import kotlin.collections.Map @Api(value = "{{{baseName}}}", description = "The {{{baseName}}} API") {{/swagger1AnnotationLibrary}} {{#useRequestMappingOnController}} -{{=<% %>=}} -@RequestMapping("\${openapi.<%title%>.base-path:\${api.base-path:$BASE_PATH}}") -<%={{ }}=%> +@RequestMapping("\${api.base-path:{{contextPath}}}") {{/useRequestMappingOnController}} {{#operations}} class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) val service: {{classname}}Service{{/serviceInterface}}) { diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/apiController.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/apiController.mustache index 7a74f8a27083..9288062c6270 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/apiController.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/apiController.mustache @@ -3,17 +3,12 @@ package {{package}} import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import java.util.Optional -{{#useRequestMappingOnController}} -import {{#apiPackage}}{{.}}.{{/apiPackage}}{{classname}}Controller.Companion.BASE_PATH -{{/useRequestMappingOnController}} {{>generatedAnnotation}} @Controller{{#beanQualifiers}}("{{package}}.{{classname}}Controller"){{/beanQualifiers}} {{#useRequestMappingOnController}} -{{=<% %>=}} -@RequestMapping("\${openapi.<%title%>.base-path:\${api.base-path:$BASE_PATH}}") -<%={{ }}=%> +@RequestMapping("\${api.base-path:{{contextPath}}}") {{/useRequestMappingOnController}} {{#operations}} class {{classname}}Controller( diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache index 0f1dcbd41551..106f9cc32e42 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache @@ -35,9 +35,6 @@ import org.springframework.validation.annotation.Validated {{/useBeanValidation}} import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -{{#useRequestMappingOnInterface}} -import {{#apiPackage}}{{.}}.{{/apiPackage}}{{classname}}.Companion.BASE_PATH -{{/useRequestMappingOnInterface}} {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.DecimalMax @@ -67,9 +64,7 @@ import kotlin.collections.Map @Api(value = "{{{baseName}}}", description = "The {{{baseName}}} API") {{/swagger1AnnotationLibrary}} {{#useRequestMappingOnInterface}} -{{=<% %>=}} -@RequestMapping("\${openapi.<%title%>.base-path:\${api.base-path:$BASE_PATH}}") -<%={{ }}=%> +@RequestMapping("\${api.base-path:{{contextPath}}}") {{/useRequestMappingOnInterface}} {{#operations}} interface {{classname}} { diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache index 876a558db0b9..4a384caa2a9c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache @@ -6,9 +6,6 @@ package {{package}} {{#imports}}import {{import}} {{/imports}} -{{#useRequestMappingOnInterface}} -import {{#apiPackage}}{{.}}.{{/apiPackage}}{{classname}}.Companion.BASE_PATH -{{/useRequestMappingOnInterface}} {{#swagger2AnnotationLibrary}} import io.swagger.v3.oas.annotations.* @@ -51,9 +48,7 @@ import kotlin.collections.List import kotlin.collections.Map {{#useRequestMappingOnInterface}} -{{=<% %>=}} -@HttpExchange("\${openapi.<%title%>.base-path:\${api.base-path:$BASE_PATH}}") -<%={{ }}=%> +@HttpExchange("\${api.base-path:{{contextPath}}}") {{/useRequestMappingOnInterface}} {{#useBeanValidation}} @Validated diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java index c9843b2a0169..e8101f0d53b5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java @@ -141,9 +141,11 @@ public void testNoRequestMappingAnnotationController() throws IOException { "@RequestMapping(\"\\${" ); // Check that the @RequestMapping annotation is generated in the ApiController file + // Note: We use simple ${api.base-path:} syntax because Spring's @RequestMapping + // doesn't properly resolve nested ${outer:${inner:default}} property placeholder syntax assertFileContains( Paths.get(output + "/src/main/kotlin/org/openapitools/api/PetApiController.kt"), - "@RequestMapping(\"\\${openapi.openAPIPetstore.base-path:\\${api.base-path:$BASE_PATH}}\")", + "@RequestMapping(\"\\${api.base-path:/v2}\")", " companion object {\n" + " //for your own safety never directly reuse these path definitions in tests\n" + " const val BASE_PATH: String = \"/v2\"\n" @@ -156,9 +158,11 @@ public void testNoRequestMappingAnnotationApiInterface() throws IOException { File output = generatePetstoreWithRequestMappingMode(KotlinSpringServerCodegen.RequestMappingMode.api_interface); // Check that the @RequestMapping annotation is generated in the Api file + // Note: We use simple ${api.base-path:} syntax because Spring's @RequestMapping + // doesn't properly resolve nested ${outer:${inner:default}} property placeholder syntax assertFileContains( Paths.get(output + "/src/main/kotlin/org/openapitools/api/PetApi.kt"), - "@RequestMapping(\"\\${openapi.openAPIPetstore.base-path:\\${api.base-path:$BASE_PATH}}\")", + "@RequestMapping(\"\\${api.base-path:/v2}\")", " companion object {\n" + " //for your own safety never directly reuse these path definitions in tests\n" + " const val BASE_PATH: String = \"/v2\"" @@ -1310,11 +1314,11 @@ public void generateHttpInterface() throws Exception { generator.opts(input).generate(); Path path = Paths.get(outputPath + "/src/main/kotlin/org/openapitools/api/StoreApiClient.kt"); + // Note: We use simple ${api.base-path:} syntax because Spring's @HttpExchange + // doesn't properly resolve nested ${outer:${inner:default}} property placeholder syntax assertFileContains( path, - "@HttpExchange(\n" - + "\"\\${openapi.openAPIPetstore.base-path:\\${api.base-path:$BASE_PATH}}\"\n" - + ")", + "@HttpExchange(\"\\${api.base-path:/v2}\")", " fun getInventory(\n" + " ): Map", " fun deleteOrder(\n" diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/FakeApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/FakeApiController.kt index fd53aef0fb32..22e0be86e156 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/FakeApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/FakeApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.FakeApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -31,7 +30,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class FakeApiController() { @Operation( diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt index 8929c5fdb2e4..947050a6ed47 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -32,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController() { @Operation( diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 2d49e91cdd61..fd02efc120e5 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -31,7 +30,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController() { @Operation( diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/UserApiController.kt index 357b5de5802f..1637461c8b3e 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -31,7 +30,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController() { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-bigdecimal-default/src/main/kotlin/org/openapitools/api/TestApiController.kt b/samples/server/petstore/kotlin-springboot-bigdecimal-default/src/main/kotlin/org/openapitools/api/TestApiController.kt index 6e5094763081..786fa3170812 100644 --- a/samples/server/petstore/kotlin-springboot-bigdecimal-default/src/main/kotlin/org/openapitools/api/TestApiController.kt +++ b/samples/server/petstore/kotlin-springboot-bigdecimal-default/src/main/kotlin/org/openapitools/api/TestApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.TestApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -31,7 +30,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.demo.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:}") class TestApiController() { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt index c9dab049cbe7..a3d58a666c0d 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -20,7 +20,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApi.Companion.BASE_PATH import jakarta.validation.constraints.DecimalMax import jakarta.validation.constraints.DecimalMin @@ -37,7 +36,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") interface PetApi { fun getDelegate(): PetApiDelegate diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/StoreApi.kt index 3489667aa143..5dfccbccb6ba 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -19,7 +19,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApi.Companion.BASE_PATH import jakarta.validation.constraints.DecimalMax import jakarta.validation.constraints.DecimalMin @@ -36,7 +35,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") interface StoreApi { fun getDelegate(): StoreApiDelegate diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/UserApi.kt index 6fb4f421ec53..510b8bebeab8 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -19,7 +19,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApi.Companion.BASE_PATH import jakarta.validation.constraints.DecimalMax import jakarta.validation.constraints.DecimalMin @@ -36,7 +35,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") interface UserApi { fun getDelegate(): UserApiDelegate diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/PetApiController.kt index c8f140d26f98..282d9eb898a7 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -3,11 +3,10 @@ package org.openapitools.api import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import java.util.Optional -import org.openapitools.api.PetApiController.Companion.BASE_PATH @javax.annotation.Generated(value = ["org.openapitools.codegen.languages.KotlinSpringServerCodegen"], comments = "Generator version: 7.19.0-SNAPSHOT") @Controller -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController( private val delegate: PetApiDelegate ) : PetApi { diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 63b038073622..012b7d4da854 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -3,11 +3,10 @@ package org.openapitools.api import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import java.util.Optional -import org.openapitools.api.StoreApiController.Companion.BASE_PATH @javax.annotation.Generated(value = ["org.openapitools.codegen.languages.KotlinSpringServerCodegen"], comments = "Generator version: 7.19.0-SNAPSHOT") @Controller -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController( private val delegate: StoreApiDelegate ) : StoreApi { diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/UserApiController.kt index cb8a09ab256e..3912735e1be7 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -3,11 +3,10 @@ package org.openapitools.api import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import java.util.Optional -import org.openapitools.api.UserApiController.Companion.BASE_PATH @javax.annotation.Generated(value = ["org.openapitools.codegen.languages.KotlinSpringServerCodegen"], comments = "Generator version: 7.19.0-SNAPSHOT") @Controller -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController( private val delegate: UserApiDelegate ) : UserApi { diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt index 874a6bc303d1..962ade8e3edd 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -32,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt index fca955f2fd05..4f33be22d54a 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -31,7 +30,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApiController.kt index 869873f9562b..da1123a59ed3 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -31,7 +30,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt index 1e2535655b85..5667157d17d8 100644 --- a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt +++ b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.MultipartMixedApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -32,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.multipartFileTest.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:}") class MultipartMixedApiController() { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiController.kt index 3147d4ffa3db..77a45d37e874 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -3,11 +3,10 @@ package org.openapitools.api import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import java.util.Optional -import org.openapitools.api.PetApiController.Companion.BASE_PATH @javax.annotation.Generated(value = ["org.openapitools.codegen.languages.KotlinSpringServerCodegen"], comments = "Generator version: 7.19.0-SNAPSHOT") @Controller -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController( delegate: PetApiDelegate? ) : PetApi { diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 09ad6040e09e..4e5f96f541cc 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -3,11 +3,10 @@ package org.openapitools.api import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import java.util.Optional -import org.openapitools.api.StoreApiController.Companion.BASE_PATH @javax.annotation.Generated(value = ["org.openapitools.codegen.languages.KotlinSpringServerCodegen"], comments = "Generator version: 7.19.0-SNAPSHOT") @Controller -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController( delegate: StoreApiDelegate? ) : StoreApi { diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/UserApiController.kt index 324e0d4d72f0..7cc9cb00de51 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -3,11 +3,10 @@ package org.openapitools.api import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import java.util.Optional -import org.openapitools.api.UserApiController.Companion.BASE_PATH @javax.annotation.Generated(value = ["org.openapitools.codegen.languages.KotlinSpringServerCodegen"], comments = "Generator version: 7.19.0-SNAPSHOT") @Controller -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController( delegate: UserApiDelegate? ) : UserApi { diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt index ef916fdebbc8..9883bf1e6f0e 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -26,7 +25,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/StoreApiController.kt index b29a1b7af3c3..e3eb06f2505d 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -8,7 +8,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -25,7 +24,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { @ResponseStatus(HttpStatus.BAD_REQUEST) diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/UserApiController.kt index 44632400f82d..306f9c0925d0 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -8,7 +8,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -25,7 +24,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) { @ResponseStatus(HttpStatus.OK) diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt index 223d388acf0b..117cd461b20c 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -33,7 +32,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/StoreApiController.kt index fe53c809ca15..702584aaf3d1 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -32,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/UserApiController.kt index 29102c08ed35..48d01df2a018 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -32,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt index 630c4e2fd0c7..5e19c2fc98bf 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -33,7 +32,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt index fe53c809ca15..702584aaf3d1 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -32,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiController.kt index 29102c08ed35..48d01df2a018 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -32,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt index f99b4146027c..099241453b95 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -35,7 +34,7 @@ import kotlin.collections.Map @RestController @Validated @Api(value = "pet", description = "The pet API") -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiController.kt index fa400197c7ca..9e7f0a56f8d5 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -34,7 +33,7 @@ import kotlin.collections.Map @RestController @Validated @Api(value = "store", description = "The store API") -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/UserApiController.kt index cbaedc3d378b..876614ba9063 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -34,7 +33,7 @@ import kotlin.collections.Map @RestController @Validated @Api(value = "user", description = "The user API") -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) { diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt index 874a6bc303d1..962ade8e3edd 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -32,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt index fca955f2fd05..4f33be22d54a 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -31,7 +30,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/UserApiController.kt index 869873f9562b..da1123a59ed3 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -31,7 +30,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) { @Operation( diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt index f99b4146027c..099241453b95 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -35,7 +34,7 @@ import kotlin.collections.Map @RestController @Validated @Api(value = "pet", description = "The pet API") -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiController.kt index fa400197c7ca..9e7f0a56f8d5 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -34,7 +33,7 @@ import kotlin.collections.Map @RestController @Validated @Api(value = "store", description = "The store API") -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/UserApiController.kt index cbaedc3d378b..876614ba9063 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -34,7 +33,7 @@ import kotlin.collections.Map @RestController @Validated @Api(value = "user", description = "The user API") -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) { diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt index cab508170bc0..dd0753a9e436 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -10,7 +10,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.PetApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -27,7 +26,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiController.kt index f67688fd7976..bf0cd50235f9 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.StoreApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -26,7 +25,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiController.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiController.kt index c20a32b010c8..8d2a5a070cb2 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiController.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApiController.kt @@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired -import org.openapitools.api.UserApiController.Companion.BASE_PATH import javax.validation.Valid import javax.validation.constraints.DecimalMax @@ -26,7 +25,7 @@ import kotlin.collections.Map @RestController @Validated -@RequestMapping("\${openapi.openAPIPetstore.base-path:\${api.base-path:$BASE_PATH}}") +@RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) {