From d053a5beb76578dc78ad5cb2028c59b5aafac2bb Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:21:35 +0200 Subject: [PATCH 01/30] update docs for generators --- docs/generators/kotlin-misk.md | 1 + docs/generators/kotlin-server.md | 1 + docs/generators/kotlin-spring.md | 1 + docs/generators/kotlin.md | 1 + 4 files changed, 4 insertions(+) diff --git a/docs/generators/kotlin-misk.md b/docs/generators/kotlin-misk.md index 1fe3d8cd2db2..487d4a71637f 100644 --- a/docs/generators/kotlin-misk.md +++ b/docs/generators/kotlin-misk.md @@ -29,6 +29,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|Generated artifact id (name of jar).| |null| |artifactVersion|Generated artifact's package version.| |1.0.0| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| +|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| |generateStubImplClasses|Generate Stub Impl Classes| |false| |groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |implicitHeaders|Skip header parameters in the generated API methods.| |false| diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 08125378d996..f555ed68d858 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -23,6 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactVersion|Generated artifact's package version.| |1.0.0| |delegatePattern|Whether to generate the server files using the delegate pattern. This option is currently supported only when using ktor library.| |false| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| +|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| |featureAutoHead|Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.| |true| |featureCORS|Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.| |false| |featureCompression|Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.| |true| diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 5eaa5ffc9cfa..d88bcf8f6291 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -32,6 +32,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |delegatePattern|Whether to generate the server files using the delegate pattern| |false| |documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| +|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| |exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true| |generatePageableConstraintValidation|Generate a @ValidPageable annotation and PageableConstraintValidator class, and apply @ValidPageable to the injected Pageable parameter of operations whose 'page' or 'size' parameter specifies a maximum constraint. The annotation enforces those constraints on the Pageable object that replaces the individual page/size query parameters. Requires useBeanValidation=true and library=spring-boot.| |false| |generateSortValidation|Generate a @ValidSort annotation and SortValidator class, and apply @ValidSort to the injected Pageable parameter of operations whose 'sort' parameter has enum values. The annotation validates that sort values in the Pageable object match the allowed enum values from the spec. Requires useBeanValidation=true and library=spring-boot.| |false| diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index cbdab90fc3f8..e2533565f4e6 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -26,6 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |dateLibrary|Option. Date library to use|
**threetenbp-localdatetime**
Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
**kotlinx-datetime**
kotlinx-datetime (preferred for multiplatform)
**string**
String
**java8-localdatetime**
Java 8 native JSR310 (jvm only, for legacy app only)
**java8**
Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
**threetenbp**
Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
|java8| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| |explicitApi|Generates code with explicit access modifiers to comply with Kotlin Explicit API Mode.| |false| +|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| |failOnUnknownProperties|Fail Jackson de-serialization on unknown properties| |false| |generateOneOfAnyOfWrappers|Generate oneOf, anyOf schemas as wrappers. Only `jvm-retrofit2`(library) with `gson` or `kotlinx_serialization`(serializationLibrary) support this option.| |false| |generateRoomModels|Generate Android Room database models in addition to API models (JVM Volley library only)| |false| From b7a8641ab92cc3a79707745750ab8b0df3c764af Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:48:04 +0200 Subject: [PATCH 02/30] only apply flag to kotlin spring generator --- docs/generators/kotlin-misk.md | 1 - docs/generators/kotlin-server.md | 1 - docs/generators/kotlin.md | 1 - .../codegen/languages/KotlinSpringServerCodegen.java | 7 +++++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/generators/kotlin-misk.md b/docs/generators/kotlin-misk.md index 487d4a71637f..1fe3d8cd2db2 100644 --- a/docs/generators/kotlin-misk.md +++ b/docs/generators/kotlin-misk.md @@ -29,7 +29,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|Generated artifact id (name of jar).| |null| |artifactVersion|Generated artifact's package version.| |1.0.0| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| |generateStubImplClasses|Generate Stub Impl Classes| |false| |groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |implicitHeaders|Skip header parameters in the generated API methods.| |false| diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index f555ed68d858..08125378d996 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -23,7 +23,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactVersion|Generated artifact's package version.| |1.0.0| |delegatePattern|Whether to generate the server files using the delegate pattern. This option is currently supported only when using ktor library.| |false| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| |featureAutoHead|Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.| |true| |featureCORS|Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.| |false| |featureCompression|Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.| |true| diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index e2533565f4e6..cbdab90fc3f8 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -26,7 +26,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |dateLibrary|Option. Date library to use|
**threetenbp-localdatetime**
Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
**kotlinx-datetime**
kotlinx-datetime (preferred for multiplatform)
**string**
String
**java8-localdatetime**
Java 8 native JSR310 (jvm only, for legacy app only)
**java8**
Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
**threetenbp**
Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
|java8| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| |explicitApi|Generates code with explicit access modifiers to comply with Kotlin Explicit API Mode.| |false| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| |failOnUnknownProperties|Fail Jackson de-serialization on unknown properties| |false| |generateOneOfAnyOfWrappers|Generate oneOf, anyOf schemas as wrappers. Only `jvm-retrofit2`(library) with `gson` or `kotlinx_serialization`(serializationLibrary) support this option.| |false| |generateRoomModels|Generate Android Room database models in addition to API models (JVM Volley library only)| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index dba07bae883e..735c38834574 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -311,6 +311,8 @@ public KotlinSpringServerCodegen() { addSwitch(COMPANION_OBJECT, "Whether to generate companion objects in data classes, enabling companion extensions.", companionObject); addSwitch(SUSPEND_FUNCTIONS, "Whether to generate suspend functions for API operations. Useful for Spring MVC with Kotlin coroutines without requiring the full reactive stack.", suspendFunctions); cliOptions.add(CliOption.newBoolean(CodegenConstants.USE_DEDUCTION_FOR_ONE_OF_INTERFACES, CodegenConstants.USE_DEDUCTION_FOR_ONE_OF_INTERFACES_DESC, useDeductionForOneOfInterfaces)); + cliOptions.add(cliOption.newBoolean(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE_DESC).defaultValue("false")); + addSwitch(CodegenConstants.USE_ENUM_VALUE_INTERFACE, CodegenConstants.USE_ENUM_VALUE_INTERFACE_DESC, useEnumValueInterface); addSwitch(CodegenConstants.OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library (jackson-databind-nullable) for optional + nullable " @@ -659,6 +661,11 @@ public void processOpts() { } writePropertyBack(SKIP_DEFAULT_INTERFACE, skipDefaultInterface); + + if (additionalProperties.containsKey(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE)) { + setEnumUnknownDefaultCase(Boolean.parseBoolean(additionalProperties.get(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE).toString())); + } + if (additionalProperties.containsKey(REACTIVE)) { if (SPRING_CLOUD_LIBRARY.equals(library)) { throw new IllegalArgumentException("Currently, reactive option doesn't supported by Spring Cloud"); From cf86eb0f2ea52058f3aa52ee7c16e6ddd381ebae Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Wed, 3 Jun 2026 16:01:12 +0200 Subject: [PATCH 03/30] add unknown default value to moustache, and make tests to assert correctness --- .../kotlin-spring/enumClass.mustache | 31 +++-- .../spring/KotlinSpringServerCodegenTest.java | 112 ++++++++++++++++++ .../3_1/enum_unknown_default_case.yaml | 56 +++++++++ 3 files changed, 191 insertions(+), 8 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_1/enum_unknown_default_case.yaml diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index d22051e2367a..0ae38b03bb9d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -1,17 +1,32 @@ /** -* {{{description}}} -* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} -*/ -enum class {{classname}}(@get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ + * {{{description}}} + * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} + */ +enum class {{classname}}( + @get:JsonValue + {{#useEnumValueInterface}}override {{/useEnumValueInterface}} + val value: {{dataType}} +) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { + {{#allowableValues}}{{#enumVars}} - {{&name}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}; + {{&name}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} +{{#enumUnknownDefaultCase}}, + UNKNOWN_DEFAULT_OPEN_API({{#isString}}"unknown_default_open_api"{{/isString}}{{^isString}}{{#dataType}}null{{/dataType}}{{/isString}}) +{{/enumUnknownDefaultCase}}; companion object { @JvmStatic @JsonCreator fun forValue(value: {{dataType}}): {{classname}} { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum '{{classname}}'") + return values().firstOrNull { it.value == value } +{{#enumUnknownDefaultCase}} + ?: UNKNOWN_DEFAULT_OPEN_API +{{/enumUnknownDefaultCase}} +{{^enumUnknownDefaultCase}} + ?: throw IllegalArgumentException( + "Unexpected value '$value' for enum '{{classname}}'" + ) +{{/enumUnknownDefaultCase}} } } -} +} \ No newline at end of file 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 4ac2f195bb74..1e82d46e5cd0 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 @@ -6678,4 +6678,116 @@ public void schemaMappingWithNullableAllOfRendersNullableKotlinProperty() throws String content = Files.readString(myObjectFile.toPath()); assertThat(content).contains("com.example.ExternalModel?"); } + + @Test(description = "test enumUnknownDefaultCase option") + public void testEnumUnknownDefaultCaseOption() { + final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + + // Test default value is false + codegen.processOpts(); + Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.FALSE); + + // Test setting via additionalProperties + codegen.additionalProperties().put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); + codegen.processOpts(); + Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.TRUE); + } + + @Test(description = "test enum model generation with enumUnknownDefaultCase") + public void testEnumModelWithUnknownDefaultCase() { + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_1/enum_unknown_default_case.yaml"); + final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + + // Enable enumUnknownDefaultCase + codegen.additionalProperties().put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); + codegen.setOpenAPI(openAPI); + codegen.processOpts(); + + // Verify that enumUnknownDefaultCase is set + Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.TRUE); + + // Process all models to trigger enum processing + Map schemas = openAPI.getComponents().getSchemas(); + Map allModels = new HashMap<>(); + for (String modelName : schemas.keySet()) { + Schema schema = schemas.get(modelName); + CodegenModel cm = codegen.fromModel(modelName, schema); + ModelsMap modelsMap = new ModelsMap(); + modelsMap.setModels(Collections.singletonList(new ModelMap(Collections.singletonMap("model", cm)))); + allModels.put(modelName, modelsMap); + } + + // Post-process to add enumVars + allModels = codegen.postProcessAllModels(allModels); + + // Get the ColorEnum model + CodegenModel colorEnum = null; + for (Map.Entry entry : allModels.entrySet()) { + if ("ColorEnum".equals(entry.getKey())) { + colorEnum = entry.getValue().getModels().get(0).getModel(); + break; + } + } + + Assert.assertNotNull(colorEnum); + Assert.assertNotNull(colorEnum.allowableValues); + + List> enumVars = (List>) colorEnum.allowableValues.get("enumVars"); + Assert.assertNotNull(enumVars); + + // Check that we have the expected enum values including UNKNOWN_DEFAULT_OPEN_API + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'RED'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'GREEN'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'BLUE'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'YELLOW'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'unknown_default_open_api'".equals(var.get("value")))); + } + + @Test(description = "test enum generation with enumUnknownDefaultCase enabled") + public void testEnumGenerationWithUnknownDefaultCase() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("kotlin-spring") + .setInputSpec("src/test/resources/3_1/enum_unknown_default_case.yaml") + .setOutputDir(outputPath) + .addAdditionalProperty(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + Path enumFile = Paths.get(outputPath, "openapi_client", "models", "color_enum.kt"); + + TestUtils.assertFileContains(enumFile, + "UNKNOWN_DEFAULT_OPEN_API"); + + TestUtils.assertFileContains(enumFile, + "?: UNKNOWN_DEFAULT_OPEN_API"); +} + + @Test(description = "test enum generation with enumUnknownDefaultCase disabled") + public void testEnumGenerationWithoutUnknownDefaultCase() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("kotlin-spring") + .setInputSpec("src/test/resources/3_1/enum_unknown_default_case.yaml") + .setOutputDir(outputPath) + .addAdditionalProperty(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "false"); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + Path enumFile = Paths.get(outputPath, "openapi_client", "models", "color_enum.kt"); + + // Check that UNKNOWN_DEFAULT_OPEN_API is NOT added + TestUtils.assertFileNotContains(enumFile, "UNKNOWN_DEFAULT_OPEN_API"); + + } } diff --git a/modules/openapi-generator/src/test/resources/3_1/enum_unknown_default_case.yaml b/modules/openapi-generator/src/test/resources/3_1/enum_unknown_default_case.yaml new file mode 100644 index 000000000000..05f23cbaef7b --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_1/enum_unknown_default_case.yaml @@ -0,0 +1,56 @@ +openapi: 3.0.0 +info: + title: Enum Test API + description: API for testing enum generation with enumUnknownDefaultCase + version: 1.0.0 +paths: + /colors: + get: + summary: Get color + operationId: getColor + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/ColorResponse' +components: + schemas: + ColorResponse: + type: object + required: + - color + - status + properties: + color: + $ref: '#/components/schemas/ColorEnum' + status: + $ref: '#/components/schemas/StatusEnum' + priority: + $ref: '#/components/schemas/PriorityEnum' + ColorEnum: + type: string + description: Available colors + enum: + - RED + - GREEN + - BLUE + - YELLOW + StatusEnum: + type: string + description: Status values + enum: + - PENDING + - APPROVED + - REJECTED + - IN_PROGRESS + PriorityEnum: + type: integer + description: Priority levels + enum: + - 1 + - 2 + - 3 + - 4 + - 5 \ No newline at end of file From c9a63370a908b248ae9b182ec7c173823193c357 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Wed, 3 Jun 2026 16:25:54 +0200 Subject: [PATCH 04/30] address review comments --- .../spring/KotlinSpringServerCodegenTest.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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 1e82d46e5cd0..4c291bac7067 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 @@ -6759,7 +6759,15 @@ public void testEnumGenerationWithUnknownDefaultCase() throws IOException { List files = generator.opts(configurator.toClientOptInput()).generate(); files.forEach(File::deleteOnExit); - Path enumFile = Paths.get(outputPath, "openapi_client", "models", "color_enum.kt"); + Path enumFile = Paths.get(outputPath, + "src", + "main", + "kotlin", + "org", + "openapitools", + "model", + "Color.kt" + ); TestUtils.assertFileContains(enumFile, "UNKNOWN_DEFAULT_OPEN_API"); @@ -6784,7 +6792,15 @@ public void testEnumGenerationWithoutUnknownDefaultCase() throws IOException { List files = generator.opts(configurator.toClientOptInput()).generate(); files.forEach(File::deleteOnExit); - Path enumFile = Paths.get(outputPath, "openapi_client", "models", "color_enum.kt"); + Path enumFile = Paths.get(outputPath, + "src", + "main", + "kotlin", + "org", + "openapitools", + "model", + "Color.kt" + ); // Check that UNKNOWN_DEFAULT_OPEN_API is NOT added TestUtils.assertFileNotContains(enumFile, "UNKNOWN_DEFAULT_OPEN_API"); From 586b1714b86d9afef8944eef85be699135aac64f Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Thu, 4 Jun 2026 09:50:50 +0200 Subject: [PATCH 05/30] fix typo in cliOption to CliOption... --- .../codegen/languages/KotlinSpringServerCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 735c38834574..4a9f319a15b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -311,7 +311,7 @@ public KotlinSpringServerCodegen() { addSwitch(COMPANION_OBJECT, "Whether to generate companion objects in data classes, enabling companion extensions.", companionObject); addSwitch(SUSPEND_FUNCTIONS, "Whether to generate suspend functions for API operations. Useful for Spring MVC with Kotlin coroutines without requiring the full reactive stack.", suspendFunctions); cliOptions.add(CliOption.newBoolean(CodegenConstants.USE_DEDUCTION_FOR_ONE_OF_INTERFACES, CodegenConstants.USE_DEDUCTION_FOR_ONE_OF_INTERFACES_DESC, useDeductionForOneOfInterfaces)); - cliOptions.add(cliOption.newBoolean(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE_DESC).defaultValue("false")); + cliOptions.add(CliOption.newBoolean(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE_DESC).defaultValue("false")); addSwitch(CodegenConstants.USE_ENUM_VALUE_INTERFACE, CodegenConstants.USE_ENUM_VALUE_INTERFACE_DESC, useEnumValueInterface); addSwitch(CodegenConstants.OPENAPI_NULLABLE, From b899d9dc48db0322264819d096eef69547cc1231 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Thu, 4 Jun 2026 10:58:12 +0200 Subject: [PATCH 06/30] oneline the override in the moustache file --- .../src/main/resources/kotlin-spring/enumClass.mustache | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index 0ae38b03bb9d..edc1be0587ce 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -3,9 +3,7 @@ * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ enum class {{classname}}( - @get:JsonValue - {{#useEnumValueInterface}}override {{/useEnumValueInterface}} - val value: {{dataType}} + @get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}} ) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { {{#allowableValues}}{{#enumVars}} @@ -29,4 +27,4 @@ enum class {{classname}}( {{/enumUnknownDefaultCase}} } } -} \ No newline at end of file +} From 84be4bf5de972609541fc54a93c49d05ce636e9a Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Thu, 4 Jun 2026 11:35:12 +0200 Subject: [PATCH 07/30] add unknown default enum case to the dataclass moustache file --- .../src/main/resources/kotlin-spring/dataClass.mustache | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index 3eeb19e70bcd..bc27ceed8e0f 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -50,14 +50,15 @@ */ enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ {{#allowableValues}}{{#enumVars}} - {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}; + {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}{{#enumUnknownDefaultCase}}, + UNKNOWN_DEFAULT_OPEN_API({{#isString}}"unknown_default_open_api"{{/isString}}{{^isString}}{{#dataType}}null{{/dataType}}{{/isString}}){{/enumUnknownDefaultCase}}; companion object { @JvmStatic @JsonCreator fun forValue(value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}): {{{nameInPascalCase}}} { return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum '{{nameInPascalCase}}'") + {{^enumUnknownDefaultCase}}?: throw IllegalArgumentException("Unexpected value '$value' for enum '{{nameInPascalCase}}'"){{/enumUnknownDefaultCase}}{{#enumUnknownDefaultCase}}?: UNKNOWN_DEFAULT_OPEN_API{{/enumUnknownDefaultCase}} } } } From 599444ea701ae588fef5dbd721d1f0a14703380e Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Thu, 4 Jun 2026 11:47:10 +0200 Subject: [PATCH 08/30] test the inclusion of the enum default for the dataclass files --- .../spring/KotlinSpringServerCodegenTest.java | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) 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 4c291bac7067..6b8cd87d7b1f 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 @@ -6806,4 +6806,126 @@ public void testEnumGenerationWithoutUnknownDefaultCase() throws IOException { TestUtils.assertFileNotContains(enumFile, "UNKNOWN_DEFAULT_OPEN_API"); } + + @Test(description = "test data class model generation containing inline enum with enumUnknownDefaultCase") + public void testDataClassModelWithUnknownDefaultCase() { + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_1/dataclass_unknown_default_case.yaml"); + final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + + // Enable enumUnknownDefaultCase + codegen.additionalProperties().put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); + codegen.setOpenAPI(openAPI); + codegen.processOpts(); + + // Verify that enumUnknownDefaultCase is set + Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.TRUE); + + // Process all models to trigger enum processing + Map schemas = openAPI.getComponents().getSchemas(); + Map allModels = new HashMap<>(); + for (String modelName : schemas.keySet()) { + Schema schema = schemas.get(modelName); + CodegenModel cm = codegen.fromModel(modelName, schema); + ModelsMap modelsMap = new ModelsMap(); + modelsMap.setModels(Collections.singletonList(new ModelMap(Collections.singletonMap("model", cm)))); + allModels.put(modelName, modelsMap); + } + + // Post-process to add enumVars + allModels = codegen.postProcessAllModels(allModels); + + // Get the ColorResponse model + CodegenModel colorResponse = null; + for (Map.Entry entry : allModels.entrySet()) { + if ("ColorResponse".equals(entry.getKey())) { + colorResponse = entry.getValue().getModels().get(0).getModel(); + break; + } + } + + Assert.assertNotNull(colorResponse); + Assert.assertTrue(colorResponse.getHasEnums()); + + CodegenProperty colorVar = colorResponse.vars.stream() + .filter(var -> "color".equals(var.name)) + .findFirst() + .orElse(null); + + Assert.assertNotNull(colorVar); + Assert.assertNotNull(colorVar.allowableValues); + + List> enumVars = (List>) colorVar.allowableValues.get("enumVars"); + Assert.assertNotNull(enumVars); + + // Check that we have the expected inline enum values including UNKNOWN_DEFAULT_OPEN_API + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'RED'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'GREEN'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'BLUE'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'YELLOW'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'unknown_default_open_api'".equals(var.get("value")))); + } + + @Test(description = "test data class generation containing inline enum with enumUnknownDefaultCase enabled") + public void testDataClassGenerationWithUnknownDefaultCase() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("kotlin-spring") + .setInputSpec("src/test/resources/3_1/dataclass_unknown_default_case.yaml") + .setOutputDir(outputPath) + .addAdditionalProperty(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + Path modelFile = Paths.get(outputPath, + "src", + "main", + "kotlin", + "org", + "openapitools", + "model", + "ColorResponse.kt" + ); + + // Assert inline Color enum includes UNKNOWN_DEFAULT_OPEN_API + TestUtils.assertFileContains(modelFile, + "UNKNOWN_DEFAULT_OPEN_API"); + + TestUtils.assertFileContains(modelFile, + "?: UNKNOWN_DEFAULT_OPEN_API"); + } + + @Test(description = "test data class generation containing inline enum with enumUnknownDefaultCase disabled") + public void testDataClassGenerationWithoutUnknownDefaultCase() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("kotlin-spring") + .setInputSpec("src/test/resources/3_1/dataclass_unknown_default_case.yaml") + .setOutputDir(outputPath) + .addAdditionalProperty(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "false"); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + Path modelFile = Paths.get(outputPath, + "src", + "main", + "kotlin", + "org", + "openapitools", + "model", + "ColorResponse.kt" + ); + + // Check that UNKNOWN_DEFAULT_OPEN_API is NOT added within the inner enum of ColorResponse + TestUtils.assertFileNotContains(modelFile, "UNKNOWN_DEFAULT_OPEN_API"); + } } From e7702b203843307cd18cd803e7d4f0dea18522c4 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Thu, 4 Jun 2026 11:49:02 +0200 Subject: [PATCH 09/30] create resources file for testing enum dataclass default --- .../3_1/dataclass_unknown_default_case.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/openapi-generator/src/test/resources/3_1/dataclass_unknown_default_case.yaml diff --git a/modules/openapi-generator/src/test/resources/3_1/dataclass_unknown_default_case.yaml b/modules/openapi-generator/src/test/resources/3_1/dataclass_unknown_default_case.yaml new file mode 100644 index 000000000000..ce5711a2e043 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_1/dataclass_unknown_default_case.yaml @@ -0,0 +1,39 @@ +openapi: 3.0.0 +info: + title: Dataclass Nested Enum Test API + description: API for testing inline/nested enum generation in data classes with enumUnknownDefaultCase + version: 1.0.0 +paths: + /colors: + get: + summary: Get color + operationId: getColor + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/ColorResponse' +components: + schemas: + ColorResponse: + type: object + required: + - color + properties: + color: + type: string + description: Available colors + enum: + - RED + - GREEN + - BLUE + - YELLOW + priority: + type: integer + description: Priority levels + enum: + - 1 + - 2 + - 3 From df45fd0db0216f579d078ea18592bc0f5f6548ee Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Thu, 4 Jun 2026 11:55:02 +0200 Subject: [PATCH 10/30] fallback is non nullable, resolves to 11184809 --- .../src/main/resources/kotlin-spring/dataClass.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index bc27ceed8e0f..36a725a378b9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -51,7 +51,7 @@ enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ {{#allowableValues}}{{#enumVars}} {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}{{#enumUnknownDefaultCase}}, - UNKNOWN_DEFAULT_OPEN_API({{#isString}}"unknown_default_open_api"{{/isString}}{{^isString}}{{#dataType}}null{{/dataType}}{{/isString}}){{/enumUnknownDefaultCase}}; + UNKNOWN_DEFAULT_OPEN_API({{#isString}}"unknown_default_open_api"{{/isString}}{{^isString}}{{#isLong}}11184809L{{/isLong}}{{#isInteger}}11184809{{/isInteger}}{{#isNumber}}11184809{{/isNumber}}{{#isDouble}}11184809.0{{/isDouble}}{{#isFloat}}11184809.0f{{/isFloat}}{{/isString}}){{/enumUnknownDefaultCase}}; companion object { @JvmStatic From 5f444ca5f95c0359b4e0e839d77d89424017da07 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 5 Jun 2026 11:39:18 +0200 Subject: [PATCH 11/30] update kotlin spring docs so that enumUnknownDefaultCase docs is equal to spring docs version --- docs/generators/kotlin-spring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index d88bcf8f6291..714f5080f05d 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -32,7 +32,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |delegatePattern|Whether to generate the server files using the delegate pattern| |false| |documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| +|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response. With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enums are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true| |generatePageableConstraintValidation|Generate a @ValidPageable annotation and PageableConstraintValidator class, and apply @ValidPageable to the injected Pageable parameter of operations whose 'page' or 'size' parameter specifies a maximum constraint. The annotation enforces those constraints on the Pageable object that replaces the individual page/size query parameters. Requires useBeanValidation=true and library=spring-boot.| |false| |generateSortValidation|Generate a @ValidSort annotation and SortValidator class, and apply @ValidSort to the injected Pageable parameter of operations whose 'sort' parameter has enum values. The annotation validates that sort values in the Pageable object match the allowed enum values from the spec. Requires useBeanValidation=true and library=spring-boot.| |false| From cabc59f43d61402a64285487c6d844609a6c9a60 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Sun, 7 Jun 2026 20:48:05 +0200 Subject: [PATCH 12/30] alter test assertions to only assert on UNKNOWN_DEFAULT_OPEN_API and also include it in existing integration test --- ...kotlin-spring-boot-oneof-enum-discriminator.yaml | 1 + .../languages/KotlinSpringServerCodegen.java | 12 ++++++++++++ .../spring/KotlinSpringServerCodegenTest.java | 13 +++++++++---- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/bin/configs/kotlin-spring-boot-oneof-enum-discriminator.yaml b/bin/configs/kotlin-spring-boot-oneof-enum-discriminator.yaml index 235978710b26..c0e2aabcfa26 100644 --- a/bin/configs/kotlin-spring-boot-oneof-enum-discriminator.yaml +++ b/bin/configs/kotlin-spring-boot-oneof-enum-discriminator.yaml @@ -9,3 +9,4 @@ additionalProperties: useSwaggerUI: "false" interfaceOnly: "true" useSpringBoot3: "true" + enumUnknownDefaultCase: "true" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 4a9f319a15b9..eb4d41afc331 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -1527,6 +1527,18 @@ public ModelsMap postProcessModelsEnum(ModelsMap objs) { } } + // If enumUnknownDefaultCase is enabled, remove "unknown_default_open_api" from allowableValues + if (additionalProperties.containsKey(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE) && + Boolean.parseBoolean(additionalProperties.get(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE).toString())) { + + for (ModelMap modelMap : objs.getModels()) { + CodegenModel cm = modelMap.getModel(); + if (cm.isEnum && cm.allowableValues != null) { + cm.allowableValues.removeIf(av -> "unknown_default_open_api".equals(av.value)); + } + } + } + if (useEnumValueInterface) { EnumValueInterfaceUtils.injectInPostProcessModelsEnum( objs, valuedEnumClassName, importMapping.get("ValuedEnum"), 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 6b8cd87d7b1f..15b119fa97f0 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 @@ -4,6 +4,7 @@ import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.parser.core.models.ParseOptions; import org.apache.commons.io.FileUtils; @@ -11,6 +12,8 @@ import org.jetbrains.annotations.NotNull; import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.config.CodegenConfigurator; @@ -23,6 +26,8 @@ import org.openapitools.codegen.languages.features.DocumentationProviderFeatures.AnnotationLibrary; import org.openapitools.codegen.languages.features.DocumentationProviderFeatures.DocumentationProvider; import org.openapitools.codegen.languages.features.SwaggerUIFeatures; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.ModelMap; import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -6735,12 +6740,12 @@ public void testEnumModelWithUnknownDefaultCase() { List> enumVars = (List>) colorEnum.allowableValues.get("enumVars"); Assert.assertNotNull(enumVars); - // Check that we have the expected enum values including UNKNOWN_DEFAULT_OPEN_API + // Check that we have the expected enum values Assert.assertTrue(enumVars.stream().anyMatch(var -> "'RED'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'GREEN'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'BLUE'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'YELLOW'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'unknown_default_open_api'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'UNKNOWN_DEFAULT_OPEN_API'".equals(var.get("value")))); } @Test(description = "test enum generation with enumUnknownDefaultCase enabled") @@ -6844,7 +6849,7 @@ public void testDataClassModelWithUnknownDefaultCase() { } Assert.assertNotNull(colorResponse); - Assert.assertTrue(colorResponse.getHasEnums()); + Assert.assertTrue(colorResponse.hasEnums); CodegenProperty colorVar = colorResponse.vars.stream() .filter(var -> "color".equals(var.name)) @@ -6862,7 +6867,7 @@ public void testDataClassModelWithUnknownDefaultCase() { Assert.assertTrue(enumVars.stream().anyMatch(var -> "'GREEN'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'BLUE'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'YELLOW'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'unknown_default_open_api'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'UNKNOWN_DEFAULT_OPEN_API'".equals(var.get("value")))); } @Test(description = "test data class generation containing inline enum with enumUnknownDefaultCase enabled") From a3bd32db80e177a42fa8b08c8ef155f7f0c1e6cf Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Tue, 9 Jun 2026 21:20:57 +0200 Subject: [PATCH 13/30] enum is correctly generated, but one of the cases uses incorrect capitalisation? --- .../languages/KotlinSpringServerCodegen.java | 12 ----------- .../kotlin-spring/enumClass.mustache | 20 ++++++++++++------- .../org/openapitools/model/VehicleType.kt | 18 +++++++++-------- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index eb4d41afc331..4a9f319a15b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -1527,18 +1527,6 @@ public ModelsMap postProcessModelsEnum(ModelsMap objs) { } } - // If enumUnknownDefaultCase is enabled, remove "unknown_default_open_api" from allowableValues - if (additionalProperties.containsKey(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE) && - Boolean.parseBoolean(additionalProperties.get(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE).toString())) { - - for (ModelMap modelMap : objs.getModels()) { - CodegenModel cm = modelMap.getModel(); - if (cm.isEnum && cm.allowableValues != null) { - cm.allowableValues.removeIf(av -> "unknown_default_open_api".equals(av.value)); - } - } - } - if (useEnumValueInterface) { EnumValueInterfaceUtils.injectInPostProcessModelsEnum( objs, valuedEnumClassName, importMapping.get("ValuedEnum"), diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index edc1be0587ce..4ba24d974f6c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -6,11 +6,11 @@ enum class {{classname}}( @get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}} ) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { -{{#allowableValues}}{{#enumVars}} - {{&name}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} -{{#enumUnknownDefaultCase}}, - UNKNOWN_DEFAULT_OPEN_API({{#isString}}"unknown_default_open_api"{{/isString}}{{^isString}}{{#dataType}}null{{/dataType}}{{/isString}}) -{{/enumUnknownDefaultCase}}; +{{#allowableValues}} +{{#enumVars}} + {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} +{{/enumVars}} +{{/allowableValues}} companion object { @JvmStatic @@ -18,7 +18,13 @@ enum class {{classname}}( fun forValue(value: {{dataType}}): {{classname}} { return values().firstOrNull { it.value == value } {{#enumUnknownDefaultCase}} - ?: UNKNOWN_DEFAULT_OPEN_API +{{#allowableValues}} +{{#enumVars}} +{{#-last}} + ?: {{&name}} +{{/-last}} +{{/enumVars}} +{{/allowableValues}} {{/enumUnknownDefaultCase}} {{^enumUnknownDefaultCase}} ?: throw IllegalArgumentException( @@ -27,4 +33,4 @@ enum class {{classname}}( {{/enumUnknownDefaultCase}} } } -} +} \ No newline at end of file diff --git a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt index 400f44e12a77..f02b86c69fe6 100644 --- a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt +++ b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt @@ -15,21 +15,23 @@ import jakarta.validation.constraints.Size import jakarta.validation.Valid /** -* -* Values: CAR,TRUCK -*/ -enum class VehicleType(@get:JsonValue val value: kotlin.String) { + * + * Values: CAR,TRUCK,unknown_default_open_api + */ +enum class VehicleType( + @get:JsonValue val value: kotlin.String +) { CAR("CAR"), - TRUCK("TRUCK"); + TRUCK("TRUCK"), + unknown_default_open_api("unknown_default_open_api"); companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): VehicleType { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'VehicleType'") + return values().firstOrNull { it.value == value } + ?: unknown_default_open_api } } } - From 8b2a43b0cd27868b2e4fb796dafb1402311208b5 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Tue, 9 Jun 2026 21:35:08 +0200 Subject: [PATCH 14/30] alter whitespace in enum class moustache, and generate dataclass moustache enums based on enumvars --- .../kotlin-spring/dataClass.mustache | 22 ++++++++++++++----- .../kotlin-spring/enumClass.mustache | 20 ++++++++--------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index 36a725a378b9..bae6267413e0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -48,17 +48,29 @@ * {{{description}}} * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ - enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ + enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}} { + {{#allowableValues}}{{#enumVars}} - {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}{{#enumUnknownDefaultCase}}, - UNKNOWN_DEFAULT_OPEN_API({{#isString}}"unknown_default_open_api"{{/isString}}{{^isString}}{{#isLong}}11184809L{{/isLong}}{{#isInteger}}11184809{{/isInteger}}{{#isNumber}}11184809{{/isNumber}}{{#isDouble}}11184809.0{{/isDouble}}{{#isFloat}}11184809.0f{{/isFloat}}{{/isString}}){{/enumUnknownDefaultCase}}; + {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} +{{/enumVars}}{{/allowableValues}} companion object { @JvmStatic @JsonCreator fun forValue(value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}): {{{nameInPascalCase}}} { - return values().firstOrNull{it -> it.value == value} - {{^enumUnknownDefaultCase}}?: throw IllegalArgumentException("Unexpected value '$value' for enum '{{nameInPascalCase}}'"){{/enumUnknownDefaultCase}}{{#enumUnknownDefaultCase}}?: UNKNOWN_DEFAULT_OPEN_API{{/enumUnknownDefaultCase}} + return values().firstOrNull { it.value == value } + {{#enumUnknownDefaultCase}} + {{#allowableValues}} + {{#enumVars}} + {{#-last}} + ?: {{{name}}} + {{/-last}} + {{/enumVars}} + {{/allowableValues}} + {{/enumUnknownDefaultCase}} + {{^enumUnknownDefaultCase}} + ?: throw IllegalArgumentException("Unexpected value '$value' for enum '{{nameInPascalCase}}'") + {{/enumUnknownDefaultCase}} } } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index 4ba24d974f6c..f29304983b29 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -17,20 +17,20 @@ enum class {{classname}}( @JsonCreator fun forValue(value: {{dataType}}): {{classname}} { return values().firstOrNull { it.value == value } -{{#enumUnknownDefaultCase}} -{{#allowableValues}} -{{#enumVars}} -{{#-last}} + {{#enumUnknownDefaultCase}} + {{#allowableValues}} + {{#enumVars}} + {{#-last}} ?: {{&name}} -{{/-last}} -{{/enumVars}} -{{/allowableValues}} -{{/enumUnknownDefaultCase}} -{{^enumUnknownDefaultCase}} + {{/-last}} + {{/enumVars}} + {{/allowableValues}} + {{/enumUnknownDefaultCase}} + {{^enumUnknownDefaultCase}} ?: throw IllegalArgumentException( "Unexpected value '$value' for enum '{{classname}}'" ) -{{/enumUnknownDefaultCase}} + {{/enumUnknownDefaultCase}} } } } \ No newline at end of file From cf4f29c80ef854a8f1a9fcd84ac2d307b5a14c54 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Tue, 9 Jun 2026 21:54:31 +0200 Subject: [PATCH 15/30] alter white space in moustache files, remove useless it->it.value==... --- .../resources/kotlin-spring/dataClass.mustache | 12 +++++------- .../resources/kotlin-spring/enumClass.mustache | 7 ++----- .../main/kotlin/org/openapitools/model/Cat.kt | 8 ++++---- .../kotlin/org/openapitools/model/VehicleType.kt | 7 ++----- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../org/openapitools/model/AnyOfUserOrPet.kt | 8 ++++---- .../model/AnyOfUserOrPetOrArrayString.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Color.kt | 16 ++++++++-------- .../main/kotlin/org/openapitools/model/Dog.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../kotlin/org/openapitools/model/ApiError.kt | 8 ++++---- .../kotlin/org/openapitools/model/ReasonCode.kt | 14 +++++++------- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../openapitools/model/MultipartMixedStatus.kt | 14 +++++++------- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/model/PetSort.kt | 14 +++++++------- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/model/PetSort.kt | 14 +++++++------- .../kotlin/org/openapitools/model/PetSortEnum.kt | 14 +++++++------- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Color.kt | 16 ++++++++-------- .../main/kotlin/org/openapitools/model/Dog.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- 64 files changed, 276 insertions(+), 284 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index bae6267413e0..e7ddc3f03ab6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -48,17 +48,15 @@ * {{{description}}} * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ - enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}} { - -{{#allowableValues}}{{#enumVars}} - {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} -{{/enumVars}}{{/allowableValues}} - + enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ + {{#allowableValues}}{{#enumVars}} + {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} + companion object { @JvmStatic @JsonCreator fun forValue(value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}): {{{nameInPascalCase}}} { - return values().firstOrNull { it.value == value } + return values().firstOrNull{ it.value == value } {{#enumUnknownDefaultCase}} {{#allowableValues}} {{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index f29304983b29..fb2135c8ea95 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -2,10 +2,7 @@ * {{{description}}} * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ -enum class {{classname}}( - @get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}} -) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { - +enum class {{classname}}(@get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}}){{#vendorExtensions.x-kotlin-implements}}{{#-first}} : {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { {{#allowableValues}} {{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} @@ -16,7 +13,7 @@ enum class {{classname}}( @JvmStatic @JsonCreator fun forValue(value: {{dataType}}): {{classname}} { - return values().firstOrNull { it.value == value } + return values().firstOrNull{ it.value == value } {{#enumUnknownDefaultCase}} {{#allowableValues}} {{#enumVars}} diff --git a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt index 045db84aeedc..eccc37ae47d3 100644 --- a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt +++ b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt @@ -35,18 +35,18 @@ data class Cat( * Values: clueless,lazy,adventurous,aggressive */ enum class HuntingSkill(@get:JsonValue val value: kotlin.String) { - + clueless("clueless"), lazy("lazy"), adventurous("adventurous"), aggressive("aggressive"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): HuntingSkill { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'HuntingSkill'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'HuntingSkill'") } } } diff --git a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt index f02b86c69fe6..1a6c28c494ae 100644 --- a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt +++ b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt @@ -18,10 +18,7 @@ import jakarta.validation.Valid * * Values: CAR,TRUCK,unknown_default_open_api */ -enum class VehicleType( - @get:JsonValue val value: kotlin.String -) { - +enum class VehicleType(@get:JsonValue val value: kotlin.String) { CAR("CAR"), TRUCK("TRUCK"), unknown_default_open_api("unknown_default_open_api"); @@ -30,7 +27,7 @@ enum class VehicleType( @JvmStatic @JsonCreator fun forValue(value: kotlin.String): VehicleType { - return values().firstOrNull { it.value == value } + return values().firstOrNull{ it.value == value } ?: unknown_default_open_api } } diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt index f8819a1b18e2..6da457ed4765 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt @@ -51,17 +51,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt index 37e0689e58c3..f7d66b77678a 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt @@ -54,17 +54,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt index 715c0fee45d8..638c03cd4f85 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt index f0a7a8bb6017..07822bfbc9cd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt index 715c0fee45d8..638c03cd4f85 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt index f0a7a8bb6017..07822bfbc9cd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index 715c0fee45d8..638c03cd4f85 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index f0a7a8bb6017..07822bfbc9cd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index 715c0fee45d8..638c03cd4f85 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index f0a7a8bb6017..07822bfbc9cd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt index 715c0fee45d8..638c03cd4f85 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt index f0a7a8bb6017..07822bfbc9cd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt index 2ac072129d73..9cbf70616846 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt @@ -97,17 +97,17 @@ data class AnyOfUserOrPet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt index fc7a28a02d0d..87dda2f03639 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt @@ -97,17 +97,17 @@ data class AnyOfUserOrPetOrArrayString( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt index 83f2628de198..896dd5050a17 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt index e0f3913e9259..4716b750a8b5 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt index 9f5e9a70e069..a6f7e177656e 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt @@ -53,17 +53,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt index 44bea7571691..5b76f984cc20 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt @@ -57,17 +57,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index 7dcae28c0485..5d60d0389937 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -51,17 +51,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index fb6a4ba5a866..f86009e632c0 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -54,17 +54,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt index 7dcae28c0485..5d60d0389937 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt @@ -51,17 +51,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt index fb6a4ba5a866..f86009e632c0 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt @@ -54,17 +54,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt index 7dcae28c0485..5d60d0389937 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt @@ -51,17 +51,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt index fb6a4ba5a866..f86009e632c0 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt @@ -54,17 +54,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt index 7dcae28c0485..5d60d0389937 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt @@ -51,17 +51,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt index 03ea024df173..928bc7b67e86 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt @@ -54,17 +54,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt index 3efc155f0902..12ee0028f9ff 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt index b7d6097268cc..dbedbdbe2ab6 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 83f2628de198..896dd5050a17 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index ec30cdcdbc5f..4942362320cf 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt index 13da2b5afecf..30e0d5fc5230 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt @@ -16,11 +16,10 @@ import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** -* -* Values: black,white,brown,yellow,violet -*/ -enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods , java.io.Serializable { - + * + * Values: black,white,brown,yellow,violet + */ +enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { black("black"), white("white"), brown("brown"), @@ -31,9 +30,10 @@ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDe @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Color { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Color'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException( + "Unexpected value '$value' for enum 'Color'" + ) } } } - diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt index 302fa2eff7d4..8e7cef14635a 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt @@ -79,18 +79,18 @@ data class Dog( * Values: Dingo,Husky,Retriever,Shepherd */ enum class Breed(@get:JsonValue val value: kotlin.String) { - + Dingo("Dingo"), Husky("Husky"), Retriever("Retriever"), Shepherd("Shepherd"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Breed { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Breed'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Breed'") } } } diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 1dc7672da598..b25a4d5ffbe8 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt index a48b4b5e4b8e..7fbd031b5cf0 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt @@ -37,16 +37,16 @@ data class ApiError( * Values: OK,ERROR */ enum class ErrorCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { - + OK(0), ERROR(100); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.Int): ErrorCode { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'ErrorCode'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'ErrorCode'") } } } diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt index 96efb7984c28..466e180f24d8 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt @@ -16,11 +16,10 @@ import jakarta.validation.constraints.Size import jakarta.validation.Valid /** -* -* Values: _10,_20 -*/ + * + * Values: _10,_20 + */ enum class ReasonCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { - _10(10), _20(20); @@ -28,9 +27,10 @@ enum class ReasonCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnu @JvmStatic @JsonCreator fun forValue(value: kotlin.Int): ReasonCode { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'ReasonCode'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException( + "Unexpected value '$value' for enum 'ReasonCode'" + ) } } } - diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index 00a939158c1e..c01511a5496d 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt index 101a0d5bdb27..e21fd68cb331 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt @@ -60,17 +60,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt index a84813d0ee44..25c30dd3185c 100644 --- a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt +++ b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt @@ -16,11 +16,10 @@ import javax.validation.Valid import io.swagger.v3.oas.annotations.media.Schema /** -* additional field as Enum -* Values: ALLOWED,IN_PROGRESS,REJECTED -*/ + * additional field as Enum + * Values: ALLOWED,IN_PROGRESS,REJECTED + */ enum class MultipartMixedStatus(@get:JsonValue val value: kotlin.String) { - ALLOWED("ALLOWED"), IN_PROGRESS("IN_PROGRESS"), REJECTED("REJECTED"); @@ -29,9 +28,10 @@ enum class MultipartMixedStatus(@get:JsonValue val value: kotlin.String) { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): MultipartMixedStatus { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'MultipartMixedStatus'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException( + "Unexpected value '$value' for enum 'MultipartMixedStatus'" + ) } } } - diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt index f8819a1b18e2..6da457ed4765 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -51,17 +51,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index ec6985af729e..e19bff3adae9 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -53,17 +53,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index f8819a1b18e2..6da457ed4765 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -51,17 +51,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index ec6985af729e..e19bff3adae9 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -53,17 +53,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt index b4d4e2ee3a9d..f3345485a53a 100644 --- a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -15,11 +15,10 @@ import jakarta.validation.constraints.Size import jakarta.validation.Valid /** -* -* Values: idCommaAsc,idCommaDesc,nameCommaAsc,nameCommaDesc -*/ + * + * Values: idCommaAsc,idCommaDesc,nameCommaAsc,nameCommaDesc + */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - idCommaAsc("id,asc"), idCommaDesc("id,desc"), nameCommaAsc("name,asc"), @@ -29,9 +28,10 @@ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializab @JvmStatic @JsonCreator fun forValue(value: kotlin.String): PetSort { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'PetSort'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException( + "Unexpected value '$value' for enum 'PetSort'" + ) } } } - diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt index 83f2628de198..896dd5050a17 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt index ec30cdcdbc5f..4942362320cf 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index 83f2628de198..896dd5050a17 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index ec30cdcdbc5f..4942362320cf 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -61,17 +61,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt index 7107f5dde4aa..d924705c2c2c 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt index 94deeafe5d75..cace2381faf7 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt @@ -60,17 +60,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt index 06ce004b5a90..0e0e3ca59f66 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -15,11 +15,10 @@ import jakarta.validation.constraints.Size import jakarta.validation.Valid /** -* -* Values: idCommaAsc,idCommaDesc,createdAtCommaAsc,createdAtCommaDesc -*/ + * + * Values: idCommaAsc,idCommaDesc,createdAtCommaAsc,createdAtCommaDesc + */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - idCommaAsc("id,asc"), idCommaDesc("id,desc"), createdAtCommaAsc("createdAt,asc"), @@ -29,9 +28,10 @@ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializab @JvmStatic @JsonCreator fun forValue(value: kotlin.String): PetSort { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'PetSort'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException( + "Unexpected value '$value' for enum 'PetSort'" + ) } } } - diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt index a8bb6d27cbc9..33439e70831d 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt @@ -15,11 +15,10 @@ import jakarta.validation.constraints.Size import jakarta.validation.Valid /** -* -* Values: nameCommaAsc,nameCommaDesc,idCommaAsc,idCommaDesc -*/ + * + * Values: nameCommaAsc,nameCommaDesc,idCommaAsc,idCommaDesc + */ enum class PetSortEnum(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - nameCommaAsc("name,asc"), nameCommaDesc("name,desc"), idCommaAsc("id,asc"), @@ -29,9 +28,10 @@ enum class PetSortEnum(@get:JsonValue val value: kotlin.String) : java.io.Serial @JvmStatic @JsonCreator fun forValue(value: kotlin.String): PetSortEnum { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'PetSortEnum'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException( + "Unexpected value '$value' for enum 'PetSortEnum'" + ) } } } - diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index cd6d207bf7d5..5c0d33a0fd7a 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt index 59c619dfe330..b94722fe998e 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt @@ -60,17 +60,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index 25a14fcf8421..000620007699 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt index 2ce619534245..f2801bbc51d8 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt @@ -60,17 +60,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt index 13da2b5afecf..30e0d5fc5230 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt @@ -16,11 +16,10 @@ import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** -* -* Values: black,white,brown,yellow,violet -*/ -enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods , java.io.Serializable { - + * + * Values: black,white,brown,yellow,violet + */ +enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { black("black"), white("white"), brown("brown"), @@ -31,9 +30,10 @@ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDe @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Color { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Color'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException( + "Unexpected value '$value' for enum 'Color'" + ) } } } - diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt index 3227118e8756..0d84629ec7ab 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt @@ -79,18 +79,18 @@ data class Dog( * Values: Dingo,Husky,Retriever,Shepherd */ enum class Breed(@get:JsonValue val value: kotlin.String) { - + Dingo("Dingo"), Husky("Husky"), Retriever("Retriever"), Shepherd("Shepherd"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Breed { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Breed'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Breed'") } } } diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt index 1dc7672da598..b25a4d5ffbe8 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt @@ -58,17 +58,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 0aefed01433e..18f9bdc6e5b8 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -52,17 +52,17 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue override val value: kotlin.String) : ValuedEnum { - + placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index 076207ab8f19..ccec7f0767d6 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -54,17 +54,17 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue override val value: kotlin.String) : ValuedEnum { - + available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { - return values().firstOrNull{it -> it.value == value} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + return values().firstOrNull{ it.value == value } + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } From 270695d8b2570b8581ca1a691e34c5dc9e04eda6 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Tue, 9 Jun 2026 21:58:22 +0200 Subject: [PATCH 16/30] also make testcase for enum integers in kotlin spring :) --- bin/configs/kotlin-spring-boot-integer-enum.yaml | 1 + .../src/main/kotlin/org/openapitools/model/ApiError.kt | 7 ++++--- .../src/main/kotlin/org/openapitools/model/ReasonCode.kt | 9 ++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/configs/kotlin-spring-boot-integer-enum.yaml b/bin/configs/kotlin-spring-boot-integer-enum.yaml index 0b23e72b5bf6..bf7c62c6a0c4 100644 --- a/bin/configs/kotlin-spring-boot-integer-enum.yaml +++ b/bin/configs/kotlin-spring-boot-integer-enum.yaml @@ -11,4 +11,5 @@ additionalProperties: annotationLibrary: none documentationProvider: none enumPropertyNaming: UPPERCASE + enumUnknownDefaultCase: "true" useEnumValueInterface: "true" diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt index 7fbd031b5cf0..aad5517b5d47 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt @@ -34,19 +34,20 @@ data class ApiError( /** * - * Values: OK,ERROR + * Values: OK,ERROR,UNKNOWN_DEFAULT_OPEN_API */ enum class ErrorCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { OK(0), - ERROR(100); + ERROR(100), + UNKNOWN_DEFAULT_OPEN_API(11184809); companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.Int): ErrorCode { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'ErrorCode'") + ?: UNKNOWN_DEFAULT_OPEN_API } } } diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt index 466e180f24d8..3a3682f35c8a 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt @@ -17,20 +17,19 @@ import jakarta.validation.Valid /** * - * Values: _10,_20 + * Values: _10,_20,UNKNOWN_DEFAULT_OPEN_API */ enum class ReasonCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { _10(10), - _20(20); + _20(20), + UNKNOWN_DEFAULT_OPEN_API(11184809); companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.Int): ReasonCode { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException( - "Unexpected value '$value' for enum 'ReasonCode'" - ) + ?: UNKNOWN_DEFAULT_OPEN_API } } } From 1cedbe5078e677fd54fe89398d653768dc9de5fa Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Tue, 9 Jun 2026 22:02:15 +0200 Subject: [PATCH 17/30] tests now assert based on correctly, originally, capitalized unknown_default_open_api --- .../spring/KotlinSpringServerCodegenTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 15b119fa97f0..25d05ffa92cb 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 @@ -6745,7 +6745,7 @@ public void testEnumModelWithUnknownDefaultCase() { Assert.assertTrue(enumVars.stream().anyMatch(var -> "'GREEN'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'BLUE'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'YELLOW'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'UNKNOWN_DEFAULT_OPEN_API'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'unknown_default_open_api'".equals(var.get("value")))); } @Test(description = "test enum generation with enumUnknownDefaultCase enabled") @@ -6775,10 +6775,10 @@ public void testEnumGenerationWithUnknownDefaultCase() throws IOException { ); TestUtils.assertFileContains(enumFile, - "UNKNOWN_DEFAULT_OPEN_API"); + "unknown_default_open_api"); TestUtils.assertFileContains(enumFile, - "?: UNKNOWN_DEFAULT_OPEN_API"); + "?: unknown_default_open_api"); } @Test(description = "test enum generation with enumUnknownDefaultCase disabled") @@ -6808,7 +6808,7 @@ public void testEnumGenerationWithoutUnknownDefaultCase() throws IOException { ); // Check that UNKNOWN_DEFAULT_OPEN_API is NOT added - TestUtils.assertFileNotContains(enumFile, "UNKNOWN_DEFAULT_OPEN_API"); + TestUtils.assertFileNotContains(enumFile, "unknown_default_open_api"); } @@ -6867,7 +6867,7 @@ public void testDataClassModelWithUnknownDefaultCase() { Assert.assertTrue(enumVars.stream().anyMatch(var -> "'GREEN'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'BLUE'".equals(var.get("value")))); Assert.assertTrue(enumVars.stream().anyMatch(var -> "'YELLOW'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'UNKNOWN_DEFAULT_OPEN_API'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream().anyMatch(var -> "'unknown_default_open_api'".equals(var.get("value")))); } @Test(description = "test data class generation containing inline enum with enumUnknownDefaultCase enabled") @@ -6898,10 +6898,10 @@ public void testDataClassGenerationWithUnknownDefaultCase() throws IOException { // Assert inline Color enum includes UNKNOWN_DEFAULT_OPEN_API TestUtils.assertFileContains(modelFile, - "UNKNOWN_DEFAULT_OPEN_API"); + "unknown_default_open_api"); TestUtils.assertFileContains(modelFile, - "?: UNKNOWN_DEFAULT_OPEN_API"); + "?: unknown_default_open_api"); } @Test(description = "test data class generation containing inline enum with enumUnknownDefaultCase disabled") @@ -6931,6 +6931,6 @@ public void testDataClassGenerationWithoutUnknownDefaultCase() throws IOExceptio ); // Check that UNKNOWN_DEFAULT_OPEN_API is NOT added within the inner enum of ColorResponse - TestUtils.assertFileNotContains(modelFile, "UNKNOWN_DEFAULT_OPEN_API"); + TestUtils.assertFileNotContains(modelFile, "unknown_default_open_api"); } } From 929309ef1c11b375a4c211e76a349ae54510143e Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Wed, 10 Jun 2026 20:58:26 +0200 Subject: [PATCH 18/30] test based on the lowercased value of unknown_default_open_api, and also alter the way temp files are checked.. --- .../spring/KotlinSpringServerCodegenTest.java | 260 ++++++++---------- 1 file changed, 116 insertions(+), 144 deletions(-) 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 25d05ffa92cb..5b1f0873c5db 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 @@ -6684,7 +6684,7 @@ public void schemaMappingWithNullableAllOfRendersNullableKotlinProperty() throws assertThat(content).contains("com.example.ExternalModel?"); } - @Test(description = "test enumUnknownDefaultCase option") + @Test(description = "test enumUnknownDefaultCase option") public void testEnumUnknownDefaultCaseOption() { final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); @@ -6699,153 +6699,142 @@ public void testEnumUnknownDefaultCaseOption() { } @Test(description = "test enum model generation with enumUnknownDefaultCase") - public void testEnumModelWithUnknownDefaultCase() { + @SuppressWarnings("unchecked") + public void testEnumModelWithUnknownDefaultCase() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_1/enum_unknown_default_case.yaml"); final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); - // Enable enumUnknownDefaultCase codegen.additionalProperties().put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); codegen.setOpenAPI(openAPI); codegen.processOpts(); - // Verify that enumUnknownDefaultCase is set Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.TRUE); - // Process all models to trigger enum processing Map schemas = openAPI.getComponents().getSchemas(); Map allModels = new HashMap<>(); + for (String modelName : schemas.keySet()) { - Schema schema = schemas.get(modelName); - CodegenModel cm = codegen.fromModel(modelName, schema); - ModelsMap modelsMap = new ModelsMap(); - modelsMap.setModels(Collections.singletonList(new ModelMap(Collections.singletonMap("model", cm)))); - allModels.put(modelName, modelsMap); + Schema schema = schemas.get(modelName); + CodegenModel cm = codegen.fromModel(modelName, schema); + + ModelsMap modelsMap = new ModelsMap(); + modelsMap.setModels( + Collections.singletonList( + new ModelMap(Collections.singletonMap("model", cm)) + ) + ); + + allModels.put(modelName, modelsMap); } - // Post-process to add enumVars allModels = codegen.postProcessAllModels(allModels); - // Get the ColorEnum model CodegenModel colorEnum = null; for (Map.Entry entry : allModels.entrySet()) { - if ("ColorEnum".equals(entry.getKey())) { + if ("ColorEnum".equals(entry.getKey())) { colorEnum = entry.getValue().getModels().get(0).getModel(); break; - } + } } Assert.assertNotNull(colorEnum); Assert.assertNotNull(colorEnum.allowableValues); - List> enumVars = (List>) colorEnum.allowableValues.get("enumVars"); + List> enumVars = + (List>) colorEnum.allowableValues.get("enumVars"); + Assert.assertNotNull(enumVars); - // Check that we have the expected enum values - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'RED'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'GREEN'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'BLUE'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'YELLOW'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'unknown_default_open_api'".equals(var.get("value")))); - } + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "'RED'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "'GREEN'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "'BLUE'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "'YELLOW'".equals(var.get("value")))); + + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "unknown_default_open_api".equals(var.get("name")))); + } @Test(description = "test enum generation with enumUnknownDefaultCase enabled") public void testEnumGenerationWithUnknownDefaultCase() throws IOException { - File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); - output.deleteOnExit(); - String outputPath = output.getAbsolutePath().replace('\\', '/'); - - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("kotlin-spring") - .setInputSpec("src/test/resources/3_1/enum_unknown_default_case.yaml") - .setOutputDir(outputPath) - .addAdditionalProperty(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); - - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(configurator.toClientOptInput()).generate(); - files.forEach(File::deleteOnExit); - - Path enumFile = Paths.get(outputPath, - "src", - "main", - "kotlin", - "org", - "openapitools", - "model", - "Color.kt" + Map files = generateFromContract( + "src/test/resources/3_1/enum_unknown_default_case.yaml", + Map.of( + CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, true + ), + new HashMap<>(), + configurator -> {} ); - TestUtils.assertFileContains(enumFile, - "unknown_default_open_api"); - - TestUtils.assertFileContains(enumFile, - "?: unknown_default_open_api"); -} - - @Test(description = "test enum generation with enumUnknownDefaultCase disabled") - public void testEnumGenerationWithoutUnknownDefaultCase() throws IOException { - File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); - output.deleteOnExit(); - String outputPath = output.getAbsolutePath().replace('\\', '/'); + File colorFile = files.get("ColorEnum.kt"); + assertThat(colorFile).isNotNull(); - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("kotlin-spring") - .setInputSpec("src/test/resources/3_1/enum_unknown_default_case.yaml") - .setOutputDir(outputPath) - .addAdditionalProperty(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "false"); + String content = Files.readString(colorFile.toPath()); - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(configurator.toClientOptInput()).generate(); - files.forEach(File::deleteOnExit); + assertThat(content).contains("unknown_default_open_api(\"unknown_default_open_api\")"); + assertThat(content).contains("?: unknown_default_open_api"); + } - Path enumFile = Paths.get(outputPath, - "src", - "main", - "kotlin", - "org", - "openapitools", - "model", - "Color.kt" + @Test(description = "test enum generation with enumUnknownDefaultCase disabled") + public void testEnumGenerationWithoutUnknownDefaultCase() throws IOException { + Map files = generateFromContract( + "src/test/resources/3_1/enum_unknown_default_case.yaml", + Map.of( + CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, false + ), + new HashMap<>(), + configurator -> {} ); - // Check that UNKNOWN_DEFAULT_OPEN_API is NOT added - TestUtils.assertFileNotContains(enumFile, "unknown_default_open_api"); + File colorFile = files.get("ColorEnum.kt"); + assertThat(colorFile).isNotNull(); + String content = Files.readString(colorFile.toPath()); + + assertThat(content).doesNotContain("unknown_default_open_api(\"unknown_default_open_api\")"); + assertThat(content).doesNotContain("?: unknown_default_open_api"); } @Test(description = "test data class model generation containing inline enum with enumUnknownDefaultCase") - public void testDataClassModelWithUnknownDefaultCase() { + @SuppressWarnings("unchecked") + public void testDataClassModelWithUnknownDefaultCase() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_1/dataclass_unknown_default_case.yaml"); final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); - // Enable enumUnknownDefaultCase codegen.additionalProperties().put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); codegen.setOpenAPI(openAPI); codegen.processOpts(); - // Verify that enumUnknownDefaultCase is set Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.TRUE); - // Process all models to trigger enum processing Map schemas = openAPI.getComponents().getSchemas(); Map allModels = new HashMap<>(); + for (String modelName : schemas.keySet()) { - Schema schema = schemas.get(modelName); - CodegenModel cm = codegen.fromModel(modelName, schema); - ModelsMap modelsMap = new ModelsMap(); - modelsMap.setModels(Collections.singletonList(new ModelMap(Collections.singletonMap("model", cm)))); - allModels.put(modelName, modelsMap); + Schema schema = schemas.get(modelName); + CodegenModel cm = codegen.fromModel(modelName, schema); + + ModelsMap modelsMap = new ModelsMap(); + modelsMap.setModels( + Collections.singletonList( + new ModelMap(Collections.singletonMap("model", cm)) + ) + ); + + allModels.put(modelName, modelsMap); } - // Post-process to add enumVars allModels = codegen.postProcessAllModels(allModels); - // Get the ColorResponse model CodegenModel colorResponse = null; for (Map.Entry entry : allModels.entrySet()) { - if ("ColorResponse".equals(entry.getKey())) { + if ("ColorResponse".equals(entry.getKey())) { colorResponse = entry.getValue().getModels().get(0).getModel(); break; - } + } } Assert.assertNotNull(colorResponse); @@ -6859,78 +6848,61 @@ public void testDataClassModelWithUnknownDefaultCase() { Assert.assertNotNull(colorVar); Assert.assertNotNull(colorVar.allowableValues); - List> enumVars = (List>) colorVar.allowableValues.get("enumVars"); + List> enumVars = + (List>) colorVar.allowableValues.get("enumVars"); + Assert.assertNotNull(enumVars); - // Check that we have the expected inline enum values including UNKNOWN_DEFAULT_OPEN_API - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'RED'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'GREEN'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'BLUE'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'YELLOW'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream().anyMatch(var -> "'unknown_default_open_api'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "'RED'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "'GREEN'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "'BLUE'".equals(var.get("value")))); + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "'YELLOW'".equals(var.get("value")))); + + Assert.assertTrue(enumVars.stream() + .anyMatch(var -> "unknown_default_open_api".equals(var.get("name")))); } @Test(description = "test data class generation containing inline enum with enumUnknownDefaultCase enabled") public void testDataClassGenerationWithUnknownDefaultCase() throws IOException { - File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); - output.deleteOnExit(); - String outputPath = output.getAbsolutePath().replace('\\', '/'); - - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("kotlin-spring") - .setInputSpec("src/test/resources/3_1/dataclass_unknown_default_case.yaml") - .setOutputDir(outputPath) - .addAdditionalProperty(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); - - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(configurator.toClientOptInput()).generate(); - files.forEach(File::deleteOnExit); - - Path modelFile = Paths.get(outputPath, - "src", - "main", - "kotlin", - "org", - "openapitools", - "model", - "ColorResponse.kt" + Map files = generateFromContract( + "src/test/resources/3_1/dataclass_unknown_default_case.yaml", + Map.of( + CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, true + ), + new HashMap<>(), + configurator -> {} ); - // Assert inline Color enum includes UNKNOWN_DEFAULT_OPEN_API - TestUtils.assertFileContains(modelFile, - "unknown_default_open_api"); + File colorResponseFile = files.get("ColorResponse.kt"); + assertThat(colorResponseFile).isNotNull(); + + String content = Files.readString(colorResponseFile.toPath()); - TestUtils.assertFileContains(modelFile, - "?: unknown_default_open_api"); + assertThat(content).contains("unknown_default_open_api(\"unknown_default_open_api\")"); + assertThat(content).contains("?: unknown_default_open_api"); } @Test(description = "test data class generation containing inline enum with enumUnknownDefaultCase disabled") public void testDataClassGenerationWithoutUnknownDefaultCase() throws IOException { - File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); - output.deleteOnExit(); - String outputPath = output.getAbsolutePath().replace('\\', '/'); - - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("kotlin-spring") - .setInputSpec("src/test/resources/3_1/dataclass_unknown_default_case.yaml") - .setOutputDir(outputPath) - .addAdditionalProperty(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "false"); + Map files = generateFromContract( + "src/test/resources/3_1/dataclass_unknown_default_case.yaml", + Map.of( + CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, false + ), + new HashMap<>(), + configurator -> {} + ); - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(configurator.toClientOptInput()).generate(); - files.forEach(File::deleteOnExit); + File colorResponseFile = files.get("ColorResponse.kt"); + assertThat(colorResponseFile).isNotNull(); - Path modelFile = Paths.get(outputPath, - "src", - "main", - "kotlin", - "org", - "openapitools", - "model", - "ColorResponse.kt" - ); + String content = Files.readString(colorResponseFile.toPath()); - // Check that UNKNOWN_DEFAULT_OPEN_API is NOT added within the inner enum of ColorResponse - TestUtils.assertFileNotContains(modelFile, "unknown_default_open_api"); + assertThat(content).doesNotContain("unknown_default_open_api(\"unknown_default_open_api\")"); + assertThat(content).doesNotContain("?: unknown_default_open_api"); } } From 99e545d7511b52cbe61aa91acc0a512fc23a5631 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Wed, 10 Jun 2026 21:52:07 +0200 Subject: [PATCH 19/30] dont test on the enum vars themselves, but rely on the ci workflow for correct files, and test presence/absence of the unknown_default_open_api --- .../spring/KotlinSpringServerCodegenTest.java | 128 ------------------ 1 file changed, 128 deletions(-) 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 5b1f0873c5db..56a7da9a245c 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 @@ -6698,66 +6698,6 @@ public void testEnumUnknownDefaultCaseOption() { Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.TRUE); } - @Test(description = "test enum model generation with enumUnknownDefaultCase") - @SuppressWarnings("unchecked") - public void testEnumModelWithUnknownDefaultCase() { - final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_1/enum_unknown_default_case.yaml"); - final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); - - codegen.additionalProperties().put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); - codegen.setOpenAPI(openAPI); - codegen.processOpts(); - - Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.TRUE); - - Map schemas = openAPI.getComponents().getSchemas(); - Map allModels = new HashMap<>(); - - for (String modelName : schemas.keySet()) { - Schema schema = schemas.get(modelName); - CodegenModel cm = codegen.fromModel(modelName, schema); - - ModelsMap modelsMap = new ModelsMap(); - modelsMap.setModels( - Collections.singletonList( - new ModelMap(Collections.singletonMap("model", cm)) - ) - ); - - allModels.put(modelName, modelsMap); - } - - allModels = codegen.postProcessAllModels(allModels); - - CodegenModel colorEnum = null; - for (Map.Entry entry : allModels.entrySet()) { - if ("ColorEnum".equals(entry.getKey())) { - colorEnum = entry.getValue().getModels().get(0).getModel(); - break; - } - } - - Assert.assertNotNull(colorEnum); - Assert.assertNotNull(colorEnum.allowableValues); - - List> enumVars = - (List>) colorEnum.allowableValues.get("enumVars"); - - Assert.assertNotNull(enumVars); - - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "'RED'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "'GREEN'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "'BLUE'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "'YELLOW'".equals(var.get("value")))); - - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "unknown_default_open_api".equals(var.get("name")))); - } - @Test(description = "test enum generation with enumUnknownDefaultCase enabled") public void testEnumGenerationWithUnknownDefaultCase() throws IOException { Map files = generateFromContract( @@ -6798,74 +6738,6 @@ public void testEnumGenerationWithoutUnknownDefaultCase() throws IOException { assertThat(content).doesNotContain("?: unknown_default_open_api"); } - @Test(description = "test data class model generation containing inline enum with enumUnknownDefaultCase") - @SuppressWarnings("unchecked") - public void testDataClassModelWithUnknownDefaultCase() { - final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_1/dataclass_unknown_default_case.yaml"); - final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); - - codegen.additionalProperties().put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, "true"); - codegen.setOpenAPI(openAPI); - codegen.processOpts(); - - Assert.assertEquals(codegen.getEnumUnknownDefaultCase(), Boolean.TRUE); - - Map schemas = openAPI.getComponents().getSchemas(); - Map allModels = new HashMap<>(); - - for (String modelName : schemas.keySet()) { - Schema schema = schemas.get(modelName); - CodegenModel cm = codegen.fromModel(modelName, schema); - - ModelsMap modelsMap = new ModelsMap(); - modelsMap.setModels( - Collections.singletonList( - new ModelMap(Collections.singletonMap("model", cm)) - ) - ); - - allModels.put(modelName, modelsMap); - } - - allModels = codegen.postProcessAllModels(allModels); - - CodegenModel colorResponse = null; - for (Map.Entry entry : allModels.entrySet()) { - if ("ColorResponse".equals(entry.getKey())) { - colorResponse = entry.getValue().getModels().get(0).getModel(); - break; - } - } - - Assert.assertNotNull(colorResponse); - Assert.assertTrue(colorResponse.hasEnums); - - CodegenProperty colorVar = colorResponse.vars.stream() - .filter(var -> "color".equals(var.name)) - .findFirst() - .orElse(null); - - Assert.assertNotNull(colorVar); - Assert.assertNotNull(colorVar.allowableValues); - - List> enumVars = - (List>) colorVar.allowableValues.get("enumVars"); - - Assert.assertNotNull(enumVars); - - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "'RED'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "'GREEN'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "'BLUE'".equals(var.get("value")))); - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "'YELLOW'".equals(var.get("value")))); - - Assert.assertTrue(enumVars.stream() - .anyMatch(var -> "unknown_default_open_api".equals(var.get("name")))); - } - @Test(description = "test data class generation containing inline enum with enumUnknownDefaultCase enabled") public void testDataClassGenerationWithUnknownDefaultCase() throws IOException { Map files = generateFromContract( From 316833e2cae3f7cd40f03b858860ecd204ae512d Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:15:12 +0200 Subject: [PATCH 20/30] update docs based on provided script --- docs/generators/kotlin-spring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 714f5080f05d..ab5e870e7270 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -32,7 +32,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |delegatePattern|Whether to generate the server files using the delegate pattern| |false| |documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response. With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enums are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response. With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.| |false| |exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true| |generatePageableConstraintValidation|Generate a @ValidPageable annotation and PageableConstraintValidator class, and apply @ValidPageable to the injected Pageable parameter of operations whose 'page' or 'size' parameter specifies a maximum constraint. The annotation enforces those constraints on the Pageable object that replaces the individual page/size query parameters. Requires useBeanValidation=true and library=spring-boot.| |false| |generateSortValidation|Generate a @ValidSort annotation and SortValidator class, and apply @ValidSort to the injected Pageable parameter of operations whose 'sort' parameter has enum values. The annotation validates that sort values in the Pageable object match the allowed enum values from the spec. Requires useBeanValidation=true and library=spring-boot.| |false| From dece2115a7bf4532b3ef90e2407ed45fa87d8863 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 26 Jun 2026 17:02:24 +0200 Subject: [PATCH 21/30] add extra line after main merge... very much esthetics :) --- .../codegen/kotlin/spring/KotlinSpringServerCodegenTest.java | 1 + 1 file changed, 1 insertion(+) 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 4389e341d9ff..1e28026dab67 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 @@ -6875,6 +6875,7 @@ public void testDataClassGenerationWithoutUnknownDefaultCase() throws IOExceptio assertThat(content).doesNotContain("unknown_default_open_api(\"unknown_default_open_api\")"); assertThat(content).doesNotContain("?: unknown_default_open_api"); + @Test(description = "nameMappings: @param:JsonProperty must use the original JSON field name for deserialization") public void paramJsonPropertyAnnotationWithNameMappings() throws IOException { // When a property is renamed via nameMappings, @param:JsonProperty must carry the From 532bb028e86af83ac2e54f1de421d15e3e5dcec5 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 17:23:24 +0200 Subject: [PATCH 22/30] fix compilation error from errornous merge in gh webui --- .../codegen/kotlin/spring/KotlinSpringServerCodegenTest.java | 1 + 1 file changed, 1 insertion(+) 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 1e28026dab67..efb3e325ca71 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 @@ -6875,6 +6875,7 @@ public void testDataClassGenerationWithoutUnknownDefaultCase() throws IOExceptio assertThat(content).doesNotContain("unknown_default_open_api(\"unknown_default_open_api\")"); assertThat(content).doesNotContain("?: unknown_default_open_api"); + } @Test(description = "nameMappings: @param:JsonProperty must use the original JSON field name for deserialization") public void paramJsonPropertyAnnotationWithNameMappings() throws IOException { From 19169212147cdffcdd868c4af4975aa4d65b7804 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 17:26:56 +0200 Subject: [PATCH 23/30] fix whitespace formatting after review --- .../src/main/resources/kotlin-spring/dataClass.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index e7ddc3f03ab6..0e16cc6aa981 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -51,7 +51,7 @@ enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ {{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} - + companion object { @JvmStatic @JsonCreator @@ -67,7 +67,7 @@ {{/allowableValues}} {{/enumUnknownDefaultCase}} {{^enumUnknownDefaultCase}} - ?: throw IllegalArgumentException("Unexpected value '$value' for enum '{{nameInPascalCase}}'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum '{{nameInPascalCase}}'") {{/enumUnknownDefaultCase}} } } From 1b280d3ecb052a2fb133a3615fbbf49b332506a3 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 19:37:43 +0200 Subject: [PATCH 24/30] alter whitespaces, and include the altered generated sample files --- .../src/main/kotlin/org/openapitools/model/Cat.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt | 4 ++-- .../org/openapitools/model/AnyOfUserOrPetOrArrayString.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Dog.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/ApiError.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Dog.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Order.kt | 4 ++-- .../src/main/kotlin/org/openapitools/model/Pet.kt | 4 ++-- 54 files changed, 107 insertions(+), 107 deletions(-) diff --git a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt index 92d3bdd7c843..7be2643ffdb2 100644 --- a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt +++ b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt @@ -42,13 +42,13 @@ data class Cat( lazy("lazy"), adventurous("adventurous"), aggressive("aggressive"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): HuntingSkill { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'HuntingSkill'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'HuntingSkill'") } } } diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt index 3ef0caae6927..15ed2244c63b 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt @@ -68,13 +68,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt index 29c4c89c33e9..da61b0143306 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt @@ -69,13 +69,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt index 91bd6886182b..b489e6af3ae2 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt index 6ede75a99a7f..4b6e85c4d2f0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt index 91bd6886182b..b489e6af3ae2 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt index 6ede75a99a7f..4b6e85c4d2f0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index 91bd6886182b..b489e6af3ae2 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index 6ede75a99a7f..4b6e85c4d2f0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index 91bd6886182b..b489e6af3ae2 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index 6ede75a99a7f..4b6e85c4d2f0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt index 91bd6886182b..b489e6af3ae2 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt index 6ede75a99a7f..4b6e85c4d2f0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt index f3179b87ccdd..2220faa1446c 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt @@ -125,13 +125,13 @@ data class AnyOfUserOrPet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt index 5429e1756e9b..1ed8b44b2cc8 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt @@ -125,13 +125,13 @@ data class AnyOfUserOrPetOrArrayString( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt index 1ba07c6a7b26..b54e59fb232f 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt index 813d35d2fc06..f980caac40be 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt index 8dd4a43679c8..84b70646ab7f 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt @@ -70,13 +70,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt index f2c71d8b69b5..8a4e350c0ff4 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,13 +72,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index d8348e82bf50..18a6f0762834 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -68,13 +68,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index c5d573146455..594fb73b6a6c 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -69,13 +69,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt index d8348e82bf50..18a6f0762834 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt @@ -68,13 +68,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt index c5d573146455..594fb73b6a6c 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt @@ -69,13 +69,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt index d8348e82bf50..18a6f0762834 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt @@ -68,13 +68,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt index c5d573146455..594fb73b6a6c 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt @@ -69,13 +69,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt index d8348e82bf50..18a6f0762834 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt @@ -68,13 +68,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt index ff61d8bef95b..0a56c5d43857 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt @@ -69,13 +69,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt index 4d5a1b590537..2b28d0b0fdc2 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt index dc510cf2be33..79ca0729ec67 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 1ba07c6a7b26..b54e59fb232f 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index 627b004b5fae..7b68eb9362b5 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt index 582413985b43..e3e358417c8d 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt @@ -99,13 +99,13 @@ data class Dog( Husky("Husky"), Retriever("Retriever"), Shepherd("Shepherd"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Breed { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Breed'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Breed'") } } } diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 59bdb195718a..5af5136a6496 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt index 339950ef915b..ddb4bb7bfc89 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt @@ -45,7 +45,7 @@ data class ApiError( OK(0), ERROR(100), UNKNOWN_DEFAULT_OPEN_API(11184809); - + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index d34386a95476..260b867886fd 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt index e8d3636c479c..727890211982 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt @@ -75,13 +75,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 3ef0caae6927..15ed2244c63b 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -68,13 +68,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index 28935d17621a..e0c67e147eb8 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -68,13 +68,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index 3ef0caae6927..15ed2244c63b 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -68,13 +68,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index 28935d17621a..e0c67e147eb8 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -68,13 +68,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt index 1ba07c6a7b26..b54e59fb232f 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt index 627b004b5fae..7b68eb9362b5 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index 1ba07c6a7b26..b54e59fb232f 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index 627b004b5fae..7b68eb9362b5 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -76,13 +76,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt index 9781dacc7dbe..4308a44542f8 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt index e63adc6a06ac..16f8f98e26d5 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt @@ -75,13 +75,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index 91e9cc41e432..7b34e7eb125c 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt index 5c5a59ec34c9..a70656fc6aa5 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt @@ -75,13 +75,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index 44b5af5745c4..d5d38629fdd9 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt index 5e32426a0bc1..5d61e46749bf 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt @@ -75,13 +75,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt index 4637234ccca9..3e6b90bf7c59 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt @@ -99,13 +99,13 @@ data class Dog( Husky("Husky"), Retriever("Retriever"), Shepherd("Shepherd"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Breed { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Breed'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Breed'") } } } diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt index 59bdb195718a..5af5136a6496 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt @@ -75,13 +75,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 7feea8e586e1..4ad788c5e05e 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -69,13 +69,13 @@ data class Order( placed("placed"), approved("approved"), delivered("delivered"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index 6f750fcc568d..a20de8a0e9dc 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -69,13 +69,13 @@ data class Pet( available("available"), pending("pending"), sold("sold"); - + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Status { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") } } } From 7f1cf1c70cc55c4b9804edbd5be43ebd4bce431b Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 21:38:29 +0200 Subject: [PATCH 25/30] alter whitespaces in moustache files, and also in generated petstore files :) --- .../main/resources/kotlin-spring/enumClass.mustache | 10 +++------- .../main/kotlin/org/openapitools/model/VehicleType.kt | 4 ++++ .../src/main/kotlin/org/openapitools/model/Color.kt | 10 +++++++--- .../main/kotlin/org/openapitools/model/ReasonCode.kt | 4 ++++ .../org/openapitools/model/MultipartMixedStatus.kt | 8 +++++--- .../src/main/kotlin/org/openapitools/model/PetSort.kt | 9 ++++++--- .../src/main/kotlin/org/openapitools/model/PetSort.kt | 9 ++++++--- .../main/kotlin/org/openapitools/model/PetSortEnum.kt | 9 ++++++--- .../src/main/kotlin/org/openapitools/model/Color.kt | 10 +++++++--- 9 files changed, 48 insertions(+), 25 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index fb2135c8ea95..5ee62a3b3f12 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -3,11 +3,9 @@ * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ enum class {{classname}}(@get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}}){{#vendorExtensions.x-kotlin-implements}}{{#-first}} : {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { -{{#allowableValues}} -{{#enumVars}} +{{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} -{{/enumVars}} -{{/allowableValues}} +{{/enumVars}}{{/allowableValues}} companion object { @JvmStatic @@ -24,9 +22,7 @@ enum class {{classname}}(@get:JsonValue {{#useEnumValueInterface}}override {{/us {{/allowableValues}} {{/enumUnknownDefaultCase}} {{^enumUnknownDefaultCase}} - ?: throw IllegalArgumentException( - "Unexpected value '$value' for enum '{{classname}}'" - ) + ?: throw IllegalArgumentException("Unexpected value '$value' for enum '{{classname}}'") {{/enumUnknownDefaultCase}} } } diff --git a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt index 1a6c28c494ae..fc3c7d60dc66 100644 --- a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt +++ b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt @@ -19,10 +19,14 @@ import jakarta.validation.Valid * Values: CAR,TRUCK,unknown_default_open_api */ enum class VehicleType(@get:JsonValue val value: kotlin.String) { + CAR("CAR"), + TRUCK("TRUCK"), + unknown_default_open_api("unknown_default_open_api"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt index 30e0d5fc5230..454c02d21a56 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt @@ -20,20 +20,24 @@ import io.swagger.annotations.ApiModelProperty * Values: black,white,brown,yellow,violet */ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { + black("black"), + white("white"), + brown("brown"), + yellow("yellow"), + violet("violet"); + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Color { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException( - "Unexpected value '$value' for enum 'Color'" - ) + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Color'") } } } diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt index 3a3682f35c8a..5c296d60b0b9 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt @@ -20,10 +20,14 @@ import jakarta.validation.Valid * Values: _10,_20,UNKNOWN_DEFAULT_OPEN_API */ enum class ReasonCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { + _10(10), + _20(20), + UNKNOWN_DEFAULT_OPEN_API(11184809); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt index 25c30dd3185c..7addd914e73b 100644 --- a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt +++ b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt @@ -20,18 +20,20 @@ import io.swagger.v3.oas.annotations.media.Schema * Values: ALLOWED,IN_PROGRESS,REJECTED */ enum class MultipartMixedStatus(@get:JsonValue val value: kotlin.String) { + ALLOWED("ALLOWED"), + IN_PROGRESS("IN_PROGRESS"), + REJECTED("REJECTED"); + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): MultipartMixedStatus { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException( - "Unexpected value '$value' for enum 'MultipartMixedStatus'" - ) + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'MultipartMixedStatus'") } } } diff --git a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt index f3345485a53a..5cde3781d104 100644 --- a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -19,19 +19,22 @@ import jakarta.validation.Valid * Values: idCommaAsc,idCommaDesc,nameCommaAsc,nameCommaDesc */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { + idCommaAsc("id,asc"), + idCommaDesc("id,desc"), + nameCommaAsc("name,asc"), + nameCommaDesc("name,desc"); + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): PetSort { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException( - "Unexpected value '$value' for enum 'PetSort'" - ) + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'PetSort'") } } } diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt index 0e0e3ca59f66..1695a72eb367 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -19,19 +19,22 @@ import jakarta.validation.Valid * Values: idCommaAsc,idCommaDesc,createdAtCommaAsc,createdAtCommaDesc */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { + idCommaAsc("id,asc"), + idCommaDesc("id,desc"), + createdAtCommaAsc("createdAt,asc"), + createdAtCommaDesc("createdAt,desc"); + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): PetSort { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException( - "Unexpected value '$value' for enum 'PetSort'" - ) + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'PetSort'") } } } diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt index 33439e70831d..ad0f7fd31c03 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt @@ -19,19 +19,22 @@ import jakarta.validation.Valid * Values: nameCommaAsc,nameCommaDesc,idCommaAsc,idCommaDesc */ enum class PetSortEnum(@get:JsonValue val value: kotlin.String) : java.io.Serializable { + nameCommaAsc("name,asc"), + nameCommaDesc("name,desc"), + idCommaAsc("id,asc"), + idCommaDesc("id,desc"); + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): PetSortEnum { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException( - "Unexpected value '$value' for enum 'PetSortEnum'" - ) + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'PetSortEnum'") } } } diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt index 30e0d5fc5230..454c02d21a56 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt @@ -20,20 +20,24 @@ import io.swagger.annotations.ApiModelProperty * Values: black,white,brown,yellow,violet */ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { + black("black"), + white("white"), + brown("brown"), + yellow("yellow"), + violet("violet"); + companion object { @JvmStatic @JsonCreator fun forValue(value: kotlin.String): Color { return values().firstOrNull{ it.value == value } - ?: throw IllegalArgumentException( - "Unexpected value '$value' for enum 'Color'" - ) + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Color'") } } } From 649b2a215d2b100fc4650aa1a5bfaf387e8b2abf Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 21:49:52 +0200 Subject: [PATCH 26/30] alter whitespaces in enumClass moustache file, to remove empty newlines --- .../resources/kotlin-spring/enumClass.mustache | 4 +--- .../kotlin/org/openapitools/model/VehicleType.kt | 10 +++------- .../main/kotlin/org/openapitools/model/Color.kt | 16 +++++----------- .../kotlin/org/openapitools/model/ReasonCode.kt | 10 +++------- .../openapitools/model/MultipartMixedStatus.kt | 10 +++------- .../kotlin/org/openapitools/model/PetSort.kt | 13 ++++--------- .../kotlin/org/openapitools/model/PetSort.kt | 13 ++++--------- .../kotlin/org/openapitools/model/PetSortEnum.kt | 13 ++++--------- .../main/kotlin/org/openapitools/model/Color.kt | 16 +++++----------- 9 files changed, 32 insertions(+), 73 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index 5ee62a3b3f12..5205465125c3 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -3,10 +3,8 @@ * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ enum class {{classname}}(@get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}}){{#vendorExtensions.x-kotlin-implements}}{{#-first}} : {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { -{{#allowableValues}}{{#enumVars}} - {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} +{{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/enumVars}}{{/allowableValues}} - companion object { @JvmStatic @JsonCreator diff --git a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt index fc3c7d60dc66..24779f30f5cb 100644 --- a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt +++ b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt @@ -19,13 +19,9 @@ import jakarta.validation.Valid * Values: CAR,TRUCK,unknown_default_open_api */ enum class VehicleType(@get:JsonValue val value: kotlin.String) { - - CAR("CAR"), - - TRUCK("TRUCK"), - - unknown_default_open_api("unknown_default_open_api"); - + CAR("CAR"), + TRUCK("TRUCK"), + unknown_default_open_api("unknown_default_open_api"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt index 454c02d21a56..6d29510a7e79 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt @@ -20,17 +20,11 @@ import io.swagger.annotations.ApiModelProperty * Values: black,white,brown,yellow,violet */ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { - - black("black"), - - white("white"), - - brown("brown"), - - yellow("yellow"), - - violet("violet"); - + black("black"), + white("white"), + brown("brown"), + yellow("yellow"), + violet("violet"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt index 5c296d60b0b9..d83aa3ed5923 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt @@ -20,13 +20,9 @@ import jakarta.validation.Valid * Values: _10,_20,UNKNOWN_DEFAULT_OPEN_API */ enum class ReasonCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { - - _10(10), - - _20(20), - - UNKNOWN_DEFAULT_OPEN_API(11184809); - + _10(10), + _20(20), + UNKNOWN_DEFAULT_OPEN_API(11184809); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt index 7addd914e73b..4df649bc6750 100644 --- a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt +++ b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt @@ -20,13 +20,9 @@ import io.swagger.v3.oas.annotations.media.Schema * Values: ALLOWED,IN_PROGRESS,REJECTED */ enum class MultipartMixedStatus(@get:JsonValue val value: kotlin.String) { - - ALLOWED("ALLOWED"), - - IN_PROGRESS("IN_PROGRESS"), - - REJECTED("REJECTED"); - + ALLOWED("ALLOWED"), + IN_PROGRESS("IN_PROGRESS"), + REJECTED("REJECTED"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt index 5cde3781d104..13f472d40b6b 100644 --- a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -19,15 +19,10 @@ import jakarta.validation.Valid * Values: idCommaAsc,idCommaDesc,nameCommaAsc,nameCommaDesc */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - - idCommaAsc("id,asc"), - - idCommaDesc("id,desc"), - - nameCommaAsc("name,asc"), - - nameCommaDesc("name,desc"); - + idCommaAsc("id,asc"), + idCommaDesc("id,desc"), + nameCommaAsc("name,asc"), + nameCommaDesc("name,desc"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt index 1695a72eb367..036820b39407 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -19,15 +19,10 @@ import jakarta.validation.Valid * Values: idCommaAsc,idCommaDesc,createdAtCommaAsc,createdAtCommaDesc */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - - idCommaAsc("id,asc"), - - idCommaDesc("id,desc"), - - createdAtCommaAsc("createdAt,asc"), - - createdAtCommaDesc("createdAt,desc"); - + idCommaAsc("id,asc"), + idCommaDesc("id,desc"), + createdAtCommaAsc("createdAt,asc"), + createdAtCommaDesc("createdAt,desc"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt index ad0f7fd31c03..a8485d7de7aa 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt @@ -19,15 +19,10 @@ import jakarta.validation.Valid * Values: nameCommaAsc,nameCommaDesc,idCommaAsc,idCommaDesc */ enum class PetSortEnum(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - - nameCommaAsc("name,asc"), - - nameCommaDesc("name,desc"), - - idCommaAsc("id,asc"), - - idCommaDesc("id,desc"); - + nameCommaAsc("name,asc"), + nameCommaDesc("name,desc"), + idCommaAsc("id,asc"), + idCommaDesc("id,desc"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt index 454c02d21a56..6d29510a7e79 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt @@ -20,17 +20,11 @@ import io.swagger.annotations.ApiModelProperty * Values: black,white,brown,yellow,violet */ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { - - black("black"), - - white("white"), - - brown("brown"), - - yellow("yellow"), - - violet("violet"); - + black("black"), + white("white"), + brown("brown"), + yellow("yellow"), + violet("violet"); companion object { @JvmStatic From 4eff29f9c3654d2ae6c83d0d42568f8b39be5a78 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 21:57:18 +0200 Subject: [PATCH 27/30] alter whitespaces in dataclass moustache file, to remove weird tabs and spaces.. --- .../main/resources/kotlin-spring/dataClass.mustache | 6 +++--- .../src/main/kotlin/org/openapitools/model/Cat.kt | 10 +++++----- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/model/AnyOfUserOrPet.kt | 8 ++++---- .../openapitools/model/AnyOfUserOrPetOrArrayString.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Dog.kt | 10 +++++----- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/ApiError.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Dog.kt | 10 +++++----- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Pet.kt | 8 ++++---- 55 files changed, 222 insertions(+), 222 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index 0e16cc6aa981..963131923086 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -49,9 +49,9 @@ * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ - {{#allowableValues}}{{#enumVars}} - {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} - + + {{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{/enumVars}}{{/allowableValues}} companion object { @JvmStatic @JsonCreator diff --git a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt index 7be2643ffdb2..3df6c9b148fe 100644 --- a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt +++ b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt @@ -38,11 +38,11 @@ data class Cat( */ enum class HuntingSkill(@get:JsonValue val value: kotlin.String) { - clueless("clueless"), - lazy("lazy"), - adventurous("adventurous"), - aggressive("aggressive"); - + clueless("clueless"), + lazy("lazy"), + adventurous("adventurous"), + aggressive("aggressive"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt index 15ed2244c63b..8910c519c99f 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,10 +65,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt index da61b0143306..67d0cc680d9e 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,10 +66,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt index b489e6af3ae2..863bc9565d54 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt index 4b6e85c4d2f0..b308103cecbd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt index b489e6af3ae2..863bc9565d54 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt index 4b6e85c4d2f0..b308103cecbd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index b489e6af3ae2..863bc9565d54 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index 4b6e85c4d2f0..b308103cecbd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index b489e6af3ae2..863bc9565d54 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index 4b6e85c4d2f0..b308103cecbd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt index b489e6af3ae2..863bc9565d54 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt index 4b6e85c4d2f0..b308103cecbd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt index 2220faa1446c..9dfc9adb6b19 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt @@ -122,10 +122,10 @@ data class AnyOfUserOrPet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt index 1ed8b44b2cc8..3e673b0d9248 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt @@ -122,10 +122,10 @@ data class AnyOfUserOrPetOrArrayString( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt index b54e59fb232f..a56a5ae66bbe 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt index f980caac40be..8058ad704ba0 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt index 84b70646ab7f..50f817be4dd0 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt @@ -67,10 +67,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt index 8a4e350c0ff4..f87e0bb4d18f 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt @@ -69,10 +69,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index 18a6f0762834..e494d522e341 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,10 +65,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index 594fb73b6a6c..fc999c88cd19 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,10 +66,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt index 18a6f0762834..e494d522e341 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,10 +65,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt index 594fb73b6a6c..fc999c88cd19 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,10 +66,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt index 18a6f0762834..e494d522e341 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,10 +65,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt index 594fb73b6a6c..fc999c88cd19 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,10 +66,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt index 18a6f0762834..e494d522e341 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,10 +65,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt index 0a56c5d43857..447efdae473b 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,10 +66,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt index 2b28d0b0fdc2..4eca8c16581c 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt index 79ca0729ec67..d959802fc05f 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt index b54e59fb232f..a56a5ae66bbe 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index 7b68eb9362b5..e0fbe6f54f00 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt index e3e358417c8d..59ebb658d4b1 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt @@ -95,11 +95,11 @@ data class Dog( */ enum class Breed(@get:JsonValue val value: kotlin.String) { - Dingo("Dingo"), - Husky("Husky"), - Retriever("Retriever"), - Shepherd("Shepherd"); - + Dingo("Dingo"), + Husky("Husky"), + Retriever("Retriever"), + Shepherd("Shepherd"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 5af5136a6496..cc3fd8f8cabe 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt index ddb4bb7bfc89..a7171cfad8f8 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt @@ -42,10 +42,10 @@ data class ApiError( */ enum class ErrorCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { - OK(0), - ERROR(100), - UNKNOWN_DEFAULT_OPEN_API(11184809); - + OK(0), + ERROR(100), + UNKNOWN_DEFAULT_OPEN_API(11184809); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index 260b867886fd..28e845aefa5f 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt index 727890211982..3727f44f4c93 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,10 +72,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 15ed2244c63b..8910c519c99f 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,10 +65,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index e0c67e147eb8..9bf677fd6955 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,10 +65,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index 15ed2244c63b..8910c519c99f 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,10 +65,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index e0c67e147eb8..9bf677fd6955 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,10 +65,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt index b54e59fb232f..a56a5ae66bbe 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt index 7b68eb9362b5..e0fbe6f54f00 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index b54e59fb232f..a56a5ae66bbe 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index 7b68eb9362b5..e0fbe6f54f00 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,10 +73,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt index 4308a44542f8..014ae2e308a6 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt index 16f8f98e26d5..84c43c47818c 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,10 +72,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index 7b34e7eb125c..92776867cce3 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt index a70656fc6aa5..4a4c376aaf88 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,10 +72,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index d5d38629fdd9..1d82d29e95ec 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt index 5d61e46749bf..347f02650e2a 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,10 +72,10 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt index 3e6b90bf7c59..835a2a3dc42a 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt @@ -95,11 +95,11 @@ data class Dog( */ enum class Breed(@get:JsonValue val value: kotlin.String) { - Dingo("Dingo"), - Husky("Husky"), - Retriever("Retriever"), - Shepherd("Shepherd"); - + Dingo("Dingo"), + Husky("Husky"), + Retriever("Retriever"), + Shepherd("Shepherd"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt index 5af5136a6496..cc3fd8f8cabe 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,10 +72,10 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 4ad788c5e05e..92c5836fe8e8 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -66,10 +66,10 @@ data class Order( */ enum class Status(@get:JsonValue override val value: kotlin.String) : ValuedEnum { - placed("placed"), - approved("approved"), - delivered("delivered"); - + placed("placed"), + approved("approved"), + delivered("delivered"); + companion object { @JvmStatic @JsonCreator diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index a20de8a0e9dc..feeb03a47bba 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,10 +66,10 @@ data class Pet( */ enum class Status(@get:JsonValue override val value: kotlin.String) : ValuedEnum { - available("available"), - pending("pending"), - sold("sold"); - + available("available"), + pending("pending"), + sold("sold"); + companion object { @JvmStatic @JsonCreator From f7f44c98fbeb3bb5658145f0287f332cb396aa59 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 22:00:32 +0200 Subject: [PATCH 28/30] add newline after enum class definition, and before enum listings! --- .../src/main/resources/kotlin-spring/enumClass.mustache | 1 + .../src/main/kotlin/org/openapitools/model/VehicleType.kt | 1 + .../src/main/kotlin/org/openapitools/model/Color.kt | 1 + .../src/main/kotlin/org/openapitools/model/ReasonCode.kt | 1 + .../main/kotlin/org/openapitools/model/MultipartMixedStatus.kt | 1 + .../src/main/kotlin/org/openapitools/model/PetSort.kt | 1 + .../src/main/kotlin/org/openapitools/model/PetSort.kt | 1 + .../src/main/kotlin/org/openapitools/model/PetSortEnum.kt | 1 + .../src/main/kotlin/org/openapitools/model/Color.kt | 1 + 9 files changed, 9 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index 5205465125c3..0bb75180e9a5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -3,6 +3,7 @@ * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ enum class {{classname}}(@get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}}){{#vendorExtensions.x-kotlin-implements}}{{#-first}} : {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { + {{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/enumVars}}{{/allowableValues}} companion object { diff --git a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt index 24779f30f5cb..1d60ecd258c8 100644 --- a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt +++ b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt @@ -19,6 +19,7 @@ import jakarta.validation.Valid * Values: CAR,TRUCK,unknown_default_open_api */ enum class VehicleType(@get:JsonValue val value: kotlin.String) { + CAR("CAR"), TRUCK("TRUCK"), unknown_default_open_api("unknown_default_open_api"); diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt index 6d29510a7e79..c510ffaa66db 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt @@ -20,6 +20,7 @@ import io.swagger.annotations.ApiModelProperty * Values: black,white,brown,yellow,violet */ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { + black("black"), white("white"), brown("brown"), diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt index d83aa3ed5923..e0716d11e63a 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt @@ -20,6 +20,7 @@ import jakarta.validation.Valid * Values: _10,_20,UNKNOWN_DEFAULT_OPEN_API */ enum class ReasonCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { + _10(10), _20(20), UNKNOWN_DEFAULT_OPEN_API(11184809); diff --git a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt index 4df649bc6750..bfb6d087fa3e 100644 --- a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt +++ b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt @@ -20,6 +20,7 @@ import io.swagger.v3.oas.annotations.media.Schema * Values: ALLOWED,IN_PROGRESS,REJECTED */ enum class MultipartMixedStatus(@get:JsonValue val value: kotlin.String) { + ALLOWED("ALLOWED"), IN_PROGRESS("IN_PROGRESS"), REJECTED("REJECTED"); diff --git a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt index 13f472d40b6b..9dc6c294045b 100644 --- a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -19,6 +19,7 @@ import jakarta.validation.Valid * Values: idCommaAsc,idCommaDesc,nameCommaAsc,nameCommaDesc */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { + idCommaAsc("id,asc"), idCommaDesc("id,desc"), nameCommaAsc("name,asc"), diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt index 036820b39407..d7bcb88dd607 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -19,6 +19,7 @@ import jakarta.validation.Valid * Values: idCommaAsc,idCommaDesc,createdAtCommaAsc,createdAtCommaDesc */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { + idCommaAsc("id,asc"), idCommaDesc("id,desc"), createdAtCommaAsc("createdAt,asc"), diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt index a8485d7de7aa..35fcda08ec59 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt @@ -19,6 +19,7 @@ import jakarta.validation.Valid * Values: nameCommaAsc,nameCommaDesc,idCommaAsc,idCommaDesc */ enum class PetSortEnum(@get:JsonValue val value: kotlin.String) : java.io.Serializable { + nameCommaAsc("name,asc"), nameCommaDesc("name,desc"), idCommaAsc("id,asc"), diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt index 6d29510a7e79..c510ffaa66db 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt @@ -20,6 +20,7 @@ import io.swagger.annotations.ApiModelProperty * Values: black,white,brown,yellow,violet */ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { + black("black"), white("white"), brown("brown"), From 0133dc31621f58bc8ceb970cf37e6c33fcbdc5e4 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 22:07:26 +0200 Subject: [PATCH 29/30] fix tab/space formatting issues --- .../main/resources/kotlin-spring/dataClass.mustache | 2 +- .../main/resources/kotlin-spring/enumClass.mustache | 2 +- .../src/main/kotlin/org/openapitools/model/Cat.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/VehicleType.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../kotlin/org/openapitools/model/AnyOfUserOrPet.kt | 6 +++--- .../openapitools/model/AnyOfUserOrPetOrArrayString.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Color.kt | 10 +++++----- .../src/main/kotlin/org/openapitools/model/Dog.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/ApiError.kt | 6 +++--- .../main/kotlin/org/openapitools/model/ReasonCode.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../org/openapitools/model/MultipartMixedStatus.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/PetSort.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/PetSort.kt | 8 ++++---- .../main/kotlin/org/openapitools/model/PetSortEnum.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Color.kt | 10 +++++----- .../src/main/kotlin/org/openapitools/model/Dog.kt | 8 ++++---- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Order.kt | 6 +++--- .../src/main/kotlin/org/openapitools/model/Pet.kt | 6 +++--- 64 files changed, 198 insertions(+), 198 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index 963131923086..8da0de584c9b 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -50,7 +50,7 @@ */ enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ - {{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} + {{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/enumVars}}{{/allowableValues}} companion object { @JvmStatic diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache index 0bb75180e9a5..56e7293755d9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/enumClass.mustache @@ -4,7 +4,7 @@ */ enum class {{classname}}(@get:JsonValue {{#useEnumValueInterface}}override {{/useEnumValueInterface}}val value: {{dataType}}){{#vendorExtensions.x-kotlin-implements}}{{#-first}} : {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-kotlin-implements}} { -{{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} +{{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/enumVars}}{{/allowableValues}} companion object { @JvmStatic diff --git a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt index 3df6c9b148fe..0d334940fb63 100644 --- a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt +++ b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt @@ -38,10 +38,10 @@ data class Cat( */ enum class HuntingSkill(@get:JsonValue val value: kotlin.String) { - clueless("clueless"), - lazy("lazy"), - adventurous("adventurous"), - aggressive("aggressive"); + clueless("clueless"), + lazy("lazy"), + adventurous("adventurous"), + aggressive("aggressive"); companion object { @JvmStatic diff --git a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt index 1d60ecd258c8..00645a4bd7d0 100644 --- a/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt +++ b/samples/server/others/kotlin-springboot/oneOf-enum-discriminator/src/main/kotlin/org/openapitools/model/VehicleType.kt @@ -20,9 +20,9 @@ import jakarta.validation.Valid */ enum class VehicleType(@get:JsonValue val value: kotlin.String) { - CAR("CAR"), - TRUCK("TRUCK"), - unknown_default_open_api("unknown_default_open_api"); + CAR("CAR"), + TRUCK("TRUCK"), + unknown_default_open_api("unknown_default_open_api"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt index 8910c519c99f..ee9b96f767a1 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,9 +65,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt index 67d0cc680d9e..04185c9c3f0a 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,9 +66,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt index 863bc9565d54..fbe4d748d430 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt index b308103cecbd..019eaa2d5ec0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt index 863bc9565d54..fbe4d748d430 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt index b308103cecbd..019eaa2d5ec0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index 863bc9565d54..fbe4d748d430 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index b308103cecbd..019eaa2d5ec0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index 863bc9565d54..fbe4d748d430 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index b308103cecbd..019eaa2d5ec0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt index 863bc9565d54..fbe4d748d430 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt index b308103cecbd..019eaa2d5ec0 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt index 9dfc9adb6b19..4a845a44ab9a 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt @@ -122,9 +122,9 @@ data class AnyOfUserOrPet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt index 3e673b0d9248..2c0584099660 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt @@ -122,9 +122,9 @@ data class AnyOfUserOrPetOrArrayString( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt index a56a5ae66bbe..971813a593a4 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt index 8058ad704ba0..1666588c725a 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt index 50f817be4dd0..a352e5070659 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt @@ -67,9 +67,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt index f87e0bb4d18f..c278e0e8ff81 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt @@ -69,9 +69,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index e494d522e341..40ce5199e433 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,9 +65,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index fc999c88cd19..6943061ac8c6 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,9 +66,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt index e494d522e341..40ce5199e433 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,9 +65,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt index fc999c88cd19..6943061ac8c6 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,9 +66,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt index e494d522e341..40ce5199e433 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,9 +65,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt index fc999c88cd19..6943061ac8c6 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,9 +66,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt index e494d522e341..40ce5199e433 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,9 +65,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt index 447efdae473b..425e61a33d1b 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,9 +66,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt index 4eca8c16581c..65a99292f708 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt index d959802fc05f..479984142926 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt index a56a5ae66bbe..971813a593a4 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index e0fbe6f54f00..3287599e4a58 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt index c510ffaa66db..7ea29ba5043a 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Color.kt @@ -21,11 +21,11 @@ import io.swagger.annotations.ApiModelProperty */ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { - black("black"), - white("white"), - brown("brown"), - yellow("yellow"), - violet("violet"); + black("black"), + white("white"), + brown("brown"), + yellow("yellow"), + violet("violet"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt index 59ebb658d4b1..a10c75eaef71 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt @@ -95,10 +95,10 @@ data class Dog( */ enum class Breed(@get:JsonValue val value: kotlin.String) { - Dingo("Dingo"), - Husky("Husky"), - Retriever("Retriever"), - Shepherd("Shepherd"); + Dingo("Dingo"), + Husky("Husky"), + Retriever("Retriever"), + Shepherd("Shepherd"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt index cc3fd8f8cabe..cfe105be7307 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt index a7171cfad8f8..59dfd6be6f29 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt @@ -42,9 +42,9 @@ data class ApiError( */ enum class ErrorCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { - OK(0), - ERROR(100), - UNKNOWN_DEFAULT_OPEN_API(11184809); + OK(0), + ERROR(100), + UNKNOWN_DEFAULT_OPEN_API(11184809); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt index e0716d11e63a..6f1ff2ec755e 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ReasonCode.kt @@ -21,9 +21,9 @@ import jakarta.validation.Valid */ enum class ReasonCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { - _10(10), - _20(20), - UNKNOWN_DEFAULT_OPEN_API(11184809); + _10(10), + _20(20), + UNKNOWN_DEFAULT_OPEN_API(11184809); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index 28e845aefa5f..bad23f83307b 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt index 3727f44f4c93..d89c93e2ad19 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,9 +72,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt index bfb6d087fa3e..573747822a16 100644 --- a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt +++ b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/model/MultipartMixedStatus.kt @@ -21,9 +21,9 @@ import io.swagger.v3.oas.annotations.media.Schema */ enum class MultipartMixedStatus(@get:JsonValue val value: kotlin.String) { - ALLOWED("ALLOWED"), - IN_PROGRESS("IN_PROGRESS"), - REJECTED("REJECTED"); + ALLOWED("ALLOWED"), + IN_PROGRESS("IN_PROGRESS"), + REJECTED("REJECTED"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 8910c519c99f..ee9b96f767a1 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,9 +65,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index 9bf677fd6955..a983c17e4738 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,9 +65,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index 8910c519c99f..ee9b96f767a1 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,9 +65,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index 9bf677fd6955..a983c17e4738 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,9 +65,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt index 9dc6c294045b..eb770dcccdc5 100644 --- a/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-paged-model/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -20,10 +20,10 @@ import jakarta.validation.Valid */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - idCommaAsc("id,asc"), - idCommaDesc("id,desc"), - nameCommaAsc("name,asc"), - nameCommaDesc("name,desc"); + idCommaAsc("id,asc"), + idCommaDesc("id,desc"), + nameCommaAsc("name,asc"), + nameCommaDesc("name,desc"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt index a56a5ae66bbe..971813a593a4 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt index e0fbe6f54f00..3287599e4a58 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index a56a5ae66bbe..971813a593a4 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index e0fbe6f54f00..3287599e4a58 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -73,9 +73,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt index 014ae2e308a6..7094741eae22 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt index 84c43c47818c..4ab69717b3d2 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,9 +72,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt index d7bcb88dd607..ca149cdefedf 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSort.kt @@ -20,10 +20,10 @@ import jakarta.validation.Valid */ enum class PetSort(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - idCommaAsc("id,asc"), - idCommaDesc("id,desc"), - createdAtCommaAsc("createdAt,asc"), - createdAtCommaDesc("createdAt,desc"); + idCommaAsc("id,asc"), + idCommaDesc("id,desc"), + createdAtCommaAsc("createdAt,asc"), + createdAtCommaDesc("createdAt,desc"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt index 35fcda08ec59..81daf5870824 100644 --- a/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt +++ b/samples/server/petstore/kotlin-springboot-sort-validation/src/main/kotlin/org/openapitools/model/PetSortEnum.kt @@ -20,10 +20,10 @@ import jakarta.validation.Valid */ enum class PetSortEnum(@get:JsonValue val value: kotlin.String) : java.io.Serializable { - nameCommaAsc("name,asc"), - nameCommaDesc("name,desc"), - idCommaAsc("id,asc"), - idCommaDesc("id,desc"); + nameCommaAsc("name,asc"), + nameCommaDesc("name,desc"), + idCommaAsc("id,asc"), + idCommaDesc("id,desc"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index 92776867cce3..eebdbdd65d22 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt index 4a4c376aaf88..4db400b2fea0 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,9 +72,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index 1d82d29e95ec..002c5e3f1117 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt index 347f02650e2a..d1178c5cb905 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,9 +72,9 @@ data class Pet( */ enum class Status(@get:JsonValue val value: kotlin.String) { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt index c510ffaa66db..7ea29ba5043a 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Color.kt @@ -21,11 +21,11 @@ import io.swagger.annotations.ApiModelProperty */ enum class Color(@get:JsonValue val value: kotlin.String) : com.some.pack.WithDefaultMethods, java.io.Serializable { - black("black"), - white("white"), - brown("brown"), - yellow("yellow"), - violet("violet"); + black("black"), + white("white"), + brown("brown"), + yellow("yellow"), + violet("violet"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt index 835a2a3dc42a..3e30da303e46 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt @@ -95,10 +95,10 @@ data class Dog( */ enum class Breed(@get:JsonValue val value: kotlin.String) { - Dingo("Dingo"), - Husky("Husky"), - Retriever("Retriever"), - Shepherd("Shepherd"); + Dingo("Dingo"), + Husky("Husky"), + Retriever("Retriever"), + Shepherd("Shepherd"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt index cc3fd8f8cabe..cfe105be7307 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt @@ -72,9 +72,9 @@ data class Order( */ enum class Status(@get:JsonValue val value: kotlin.String) { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 92c5836fe8e8..fe992198cd42 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -66,9 +66,9 @@ data class Order( */ enum class Status(@get:JsonValue override val value: kotlin.String) : ValuedEnum { - placed("placed"), - approved("approved"), - delivered("delivered"); + placed("placed"), + approved("approved"), + delivered("delivered"); companion object { @JvmStatic diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index feeb03a47bba..4804ec9d1d7d 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -66,9 +66,9 @@ data class Pet( */ enum class Status(@get:JsonValue override val value: kotlin.String) : ValuedEnum { - available("available"), - pending("pending"), - sold("sold"); + available("available"), + pending("pending"), + sold("sold"); companion object { @JvmStatic From 5e21baa4a8eae7a31e20ffa2e252d86272a63bd3 Mon Sep 17 00:00:00 2001 From: dijkstrar <52031414+dijkstrar@users.noreply.github.com> Date: Fri, 31 Jul 2026 22:39:42 +0200 Subject: [PATCH 30/30] final tab alignments.. --- .../src/main/resources/kotlin-spring/dataClass.mustache | 2 +- .../src/main/kotlin/org/openapitools/model/Cat.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt | 2 +- .../org/openapitools/model/AnyOfUserOrPetOrArrayString.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Dog.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/ApiError.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Dog.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Order.kt | 2 +- .../src/main/kotlin/org/openapitools/model/Pet.kt | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index 8da0de584c9b..8a6d32cbdfab 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -49,7 +49,7 @@ * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ enum class {{{nameInPascalCase}}}(@get:JsonValue {{#useEnumValueInterface}}{{^isContainer}}override {{/isContainer}}{{/useEnumValueInterface}}val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {{#vendorExtensions.x-kotlin-implements}}{{#-first}}: {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}} {{/vendorExtensions.x-kotlin-implements}}{ - + {{#allowableValues}}{{#enumVars}} {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/enumVars}}{{/allowableValues}} companion object { diff --git a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt index 0d334940fb63..14dd844fc2f5 100644 --- a/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt +++ b/samples/server/others/kotlin-springboot/oneOf-discriminator-const/src/main/kotlin/org/openapitools/model/Cat.kt @@ -37,7 +37,7 @@ data class Cat( * Values: clueless,lazy,adventurous,aggressive */ enum class HuntingSkill(@get:JsonValue val value: kotlin.String) { - + clueless("clueless"), lazy("lazy"), adventurous("adventurous"), diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt index ee9b96f767a1..91789e073342 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Order.kt @@ -64,7 +64,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt index 04185c9c3f0a..fa87046fcbb6 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,7 +65,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt index fbe4d748d430..a5bbc6f533b7 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt index 019eaa2d5ec0..4946608b9073 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt index fbe4d748d430..a5bbc6f533b7 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt index 019eaa2d5ec0..4946608b9073 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index fbe4d748d430..a5bbc6f533b7 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index 019eaa2d5ec0..4946608b9073 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt index fbe4d748d430..a5bbc6f533b7 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt index 019eaa2d5ec0..4946608b9073 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt index fbe4d748d430..a5bbc6f533b7 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt index 019eaa2d5ec0..4946608b9073 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-declarative-interface/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt index 4a845a44ab9a..4287b455a617 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPet.kt @@ -121,7 +121,7 @@ data class AnyOfUserOrPet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt index 2c0584099660..65466254982f 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/AnyOfUserOrPetOrArrayString.kt @@ -121,7 +121,7 @@ data class AnyOfUserOrPetOrArrayString( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt index 971813a593a4..3c937a7f51ec 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt index 1666588c725a..50e293ffbca8 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt index a352e5070659..9c18c1538b4d 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Order.kt @@ -66,7 +66,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt index c278e0e8ff81..587856ead5b5 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/model/Pet.kt @@ -68,7 +68,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index 40ce5199e433..df8a5532d04a 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -64,7 +64,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index 6943061ac8c6..066dcdb1e2a8 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,7 +65,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt index 40ce5199e433..df8a5532d04a 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Order.kt @@ -64,7 +64,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt index 6943061ac8c6..066dcdb1e2a8 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,7 +65,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt index 40ce5199e433..df8a5532d04a 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Order.kt @@ -64,7 +64,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt index 6943061ac8c6..066dcdb1e2a8 100644 --- a/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-4/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,7 +65,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt index 40ce5199e433..df8a5532d04a 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Order.kt @@ -64,7 +64,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt index 425e61a33d1b..ac440b3ce86f 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,7 +65,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt index 65a99292f708..fbb38c8027c0 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt index 479984142926..cc56831a201b 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 971813a593a4..3c937a7f51ec 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index 3287599e4a58..f2290d28be46 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt index a10c75eaef71..31959dc670dd 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Dog.kt @@ -94,7 +94,7 @@ data class Dog( * Values: Dingo,Husky,Retriever,Shepherd */ enum class Breed(@get:JsonValue val value: kotlin.String) { - + Dingo("Dingo"), Husky("Husky"), Retriever("Retriever"), diff --git a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt index cfe105be7307..53c65bba6977 100644 --- a/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-include-http-request-context-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt index 59dfd6be6f29..d10cfbac5ee9 100644 --- a/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt +++ b/samples/server/petstore/kotlin-springboot-integer-enum/src/main/kotlin/org/openapitools/model/ApiError.kt @@ -41,7 +41,7 @@ data class ApiError( * Values: OK,ERROR,UNKNOWN_DEFAULT_OPEN_API */ enum class ErrorCode(@get:JsonValue override val value: kotlin.Int) : ValuedEnum { - + OK(0), ERROR(100), UNKNOWN_DEFAULT_OPEN_API(11184809); diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index bad23f83307b..60e6cec6d40d 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt index d89c93e2ad19..bc14afd22e3b 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt @@ -71,7 +71,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt index ee9b96f767a1..91789e073342 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -64,7 +64,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index a983c17e4738..f1d20a300b8e 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -64,7 +64,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt index ee9b96f767a1..91789e073342 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Order.kt @@ -64,7 +64,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt index a983c17e4738..f1d20a300b8e 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/model/Pet.kt @@ -64,7 +64,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt index 971813a593a4..3c937a7f51ec 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt index 3287599e4a58..f2290d28be46 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index 971813a593a4..3c937a7f51ec 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index 3287599e4a58..f2290d28be46 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -72,7 +72,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt index 7094741eae22..46302ed38a33 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt index 4ab69717b3d2..c40862b7506d 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/model/Pet.kt @@ -71,7 +71,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index eebdbdd65d22..3b75e2d91245 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt index 4db400b2fea0..989e6f1049d0 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt @@ -71,7 +71,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index 002c5e3f1117..6fef8c05c5df 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt index d1178c5cb905..618ce8582286 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt @@ -71,7 +71,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue val value: kotlin.String) { - + available("available"), pending("pending"), sold("sold"); diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt index 3e30da303e46..f4bdec2e41f9 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Dog.kt @@ -94,7 +94,7 @@ data class Dog( * Values: Dingo,Husky,Retriever,Shepherd */ enum class Breed(@get:JsonValue val value: kotlin.String) { - + Dingo("Dingo"), Husky("Husky"), Retriever("Retriever"), diff --git a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt index cfe105be7307..53c65bba6977 100644 --- a/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-x-kotlin-implements/src/main/kotlin/org/openapitools/model/Order.kt @@ -71,7 +71,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue val value: kotlin.String) { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index fe992198cd42..2b9d73689388 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -65,7 +65,7 @@ data class Order( * Values: placed,approved,delivered */ enum class Status(@get:JsonValue override val value: kotlin.String) : ValuedEnum { - + placed("placed"), approved("approved"), delivered("delivered"); diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index 4804ec9d1d7d..5e608f71cee4 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -65,7 +65,7 @@ data class Pet( * Values: available,pending,sold */ enum class Status(@get:JsonValue override val value: kotlin.String) : ValuedEnum { - + available("available"), pending("pending"), sold("sold");