From f04e272b4067e56a2d0d7da330dea13361de0d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Enrique=20Garc=C3=ADa=20Maci=C3=B1eiras?= Date: Thu, 1 Jun 2023 14:01:37 +0200 Subject: [PATCH] #160 Fix Templates and white spaces --- .../openapi/templateCallWebClient.ftlh | 15 +- .../templates/openapi/templateSchema.ftlh | 1 - .../plugin/openapi/OpenApiGeneratorTest.java | 4 +- .../assets/testApi/ApiTestAllOfDTO.java | 3 - .../testAllOf/assets/testApi/ApiTestDTO.java | 3 - .../assets/testApi/ApiTestInfoDTO.java | 3 - .../InlineResponse200ListGamesAnyOfDTO.java | 43 ++- .../assets/ApiErrorDTO.java | 3 - .../assets/ApiTestDTO.java | 5 - .../assets/ApiTestInfoDTO.java | 3 - .../assets/ApiTestDTO.java | 1 + .../assets/ApiErrorDTO.java | 3 - .../assets/ApiInlineParameterTestIdDTO.java | 2 - .../assets/ApiTestDTO.java | 3 - .../assets/ApiTestInfoDTO.java | 3 - .../assets/ErrorDTO.java | 3 - .../assets/TestDTO.java | 3 - .../assets/TestInfoDTO.java | 3 - .../assets/ApiErrorDTO.java | 3 - .../assets/ApiTestDTO.java | 3 - .../assets/ApiTestInfoDTO.java | 3 - .../assets/TestSchemaApi.java | 5 +- .../assets/ApiErrorDTO.java | 3 - .../assets/ApiTestDTO.java | 3 - .../assets/ApiTestInfoDTO.java | 3 - .../assets/ErrorDTO.java | 3 - .../testApiTagsGeneration/assets/TestDTO.java | 3 - .../assets/TestInfoDTO.java | 3 - .../assets/TestTagFirstApi.java | 5 +- .../assets/TestTagSecondApi.java | 6 +- .../assets/model/FieldDTO.java | 303 +++++++++++++++--- .../assets/ApiDateFieldDTO.java | 1 - .../assets/ApiEnumFieldDTO.java | 6 - .../assets/ApiMapFieldDTO.java | 8 +- .../assets/ApiNumberFieldDTO.java | 13 - .../assets/ApiObjectFieldDTO.java | 7 +- .../testComplexAnyOf/assets/ApiSchemaDTO.java | 7 - .../assets/ApiSequenceFieldDTO.java | 9 - .../assets/ApiStringFieldDTO.java | 10 - .../assets/ApiTypeArrayDTO.java | 140 -------- .../assets/ApiUnionFieldDTO.java | 10 +- .../assets/ApiTestDTO.java | 3 - .../assets/ApiErrorDTO.java | 3 - .../assets/ApiTestDTO.java | 8 - .../assets/ApiTestProcessorDTO.java | 3 - .../assets/ApiTestTypeDTO.java | 3 - .../InlineResponse200CreateGameDTO.java | 16 +- .../assets/MessageDTO.java | 15 +- .../assets/ApiTestInfoDTO.java | 1 - .../assets/testApi/ApiErrorDTO.java | 4 - .../assets/testApi/ApiTestAllOfDTO.java | 3 - .../assets/testApi/ApiTestDTO.java | 3 - .../assets/testApi/ApiTestInfoDTO.java | 3 - .../assets/ApiErrorDTO.java | 3 - .../assets/ApiTestDTO.java | 3 - .../assets/ApiTestInfoDTO.java | 3 - 56 files changed, 335 insertions(+), 400 deletions(-) diff --git a/multiapi-engine/src/main/resources/templates/openapi/templateCallWebClient.ftlh b/multiapi-engine/src/main/resources/templates/openapi/templateCallWebClient.ftlh index a8bc9095..3b16a515 100644 --- a/multiapi-engine/src/main/resources/templates/openapi/templateCallWebClient.ftlh +++ b/multiapi-engine/src/main/resources/templates/openapi/templateCallWebClient.ftlh @@ -211,21 +211,21 @@ public class ${className?cap_first}Api { } /** - * ${operation.operationType} ${path.pathName} <#if operation.summary?has_content>: ${operation.summary} + * ${operation.operationType} ${path.pathName}<#if operation.summary?has_content>: ${operation.summary} <#if operation.responseObjects?has_content> <#if operation.parameterObjects?has_content> - * @param<#list operation.parameterObjects as parameter> ${parameter.name} ${parameter.description} ${parameter.required?c} + * @param<#list operation.parameterObjects as parameter> ${parameter.name} ${parameter.description} ${parameter.required?c} <#if path.parameterObjects?has_content> - * <#list operation.parameterObjects as parameter>@param ${parameter.name} ${parameter.description} ${parameter.required?c} + * <#list operation.parameterObjects as parameter>@param ${parameter.name} ${parameter.description} ${parameter.required?c} <#if operation.requestObjects?has_content> - * <#list operation.requestObjects as request>@param <#list request.contentObjects as content>${content.dataType?api.getVariableNameString()} <#if content?has_next>, ${request.description! ""}<#if request.required == true> (required) + * <#list operation.requestObjects as request>@param <#list request.contentObjects as content>${content.dataType?api.getVariableNameString()} <#if content?has_next>, ${request.description! ""}<#if request.required == true> (required) - * @return<#list operation.responseObjects as response><#if response.responseName != "default"> ${response.description}; (status code ${response.responseName}) + * @return<#list operation.responseObjects as response><#if response.responseName != "default"> ${response.description}; (status code ${response.responseName}) - * @throws WebClientResponseException if an error occurs while attempting to invoke the API - */ + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ public <@compress single_line=true><#if operation.responseObjects[0].contentObjects[0]??> <#if operation.responseObjects[0].contentObjects[0].dataType.baseType == "array" || operation.responseObjects[0].contentObjects[0].dataType.baseType == "map"> Flux<${operation.responseObjects[0].contentObjects[0].dataType.innerType}><#else>Mono<${operation.responseObjects[0].contentObjects[0].dataType}> @@ -273,5 +273,4 @@ public class ${className?cap_first}Api { - } \ No newline at end of file diff --git a/multiapi-engine/src/main/resources/templates/openapi/templateSchema.ftlh b/multiapi-engine/src/main/resources/templates/openapi/templateSchema.ftlh index 8ba8e1a6..4f10ae7b 100644 --- a/multiapi-engine/src/main/resources/templates/openapi/templateSchema.ftlh +++ b/multiapi-engine/src/main/resources/templates/openapi/templateSchema.ftlh @@ -282,7 +282,6 @@ public class ${schema.className} { public ${field.dataType} get${field.baseName?cap_first}() { return ${field.baseName?uncap_first}; } - <#if field.required == false> public void set${field.baseName?cap_first}(${field.dataType} ${field.baseName?uncap_first}) { this.${field.baseName?uncap_first} = ${field.baseName?uncap_first}; diff --git a/multiapi-engine/src/test/java/com/sngular/api/generator/plugin/openapi/OpenApiGeneratorTest.java b/multiapi-engine/src/test/java/com/sngular/api/generator/plugin/openapi/OpenApiGeneratorTest.java index e8308f6f..8a69bdaf 100644 --- a/multiapi-engine/src/test/java/com/sngular/api/generator/plugin/openapi/OpenApiGeneratorTest.java +++ b/multiapi-engine/src/test/java/com/sngular/api/generator/plugin/openapi/OpenApiGeneratorTest.java @@ -11,11 +11,13 @@ import java.util.List; import java.util.function.Function; import java.util.stream.Stream; + import com.sngular.api.generator.plugin.exception.InvalidAPIException; import com.sngular.api.generator.plugin.openapi.parameter.SpecFile; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.CleanupMode; import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -23,7 +25,7 @@ class OpenApiGeneratorTest { - @TempDir + @TempDir(cleanup = CleanupMode.NEVER) static Path baseDir; private static OpenApiGenerator openApiGenerator; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestAllOfDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestAllOfDTO.java index 39aebe6c..b4841f57 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestAllOfDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestAllOfDTO.java @@ -63,7 +63,6 @@ public ApiTestAllOfDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -72,7 +71,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = false) public String getTestName() { return testName; @@ -108,7 +106,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestDTO.java index 8698cb78..9f56b4a1 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestDTO.java @@ -69,13 +69,11 @@ public ApiTestDTO build() { } } - @Schema(name = "testers", required = true) public List getTesters() { return testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -108,7 +106,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestInfoDTO.java index e96573a1..624576cd 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testAllOf/assets/testApi/ApiTestInfoDTO.java @@ -68,7 +68,6 @@ public ApiTestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testAnyOfInResponse/assets/InlineResponse200ListGamesAnyOfDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testAnyOfInResponse/assets/InlineResponse200ListGamesAnyOfDTO.java index abd37373..b475a81f 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testAnyOfInResponse/assets/InlineResponse200ListGamesAnyOfDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testAnyOfInResponse/assets/InlineResponse200ListGamesAnyOfDTO.java @@ -3,26 +3,45 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.ArrayList; import lombok.Builder; import lombok.Data; +import lombok.NonNull; import lombok.extern.jackson.Jacksonized; import com.sngular.multifileplugin.testanyofinresponse.model.exception.ModelClassException; @Data public class InlineResponse200ListGamesAnyOfDTO { - @JsonProperty(value ="gameInfo") - private GameInfoDTO gameInfo; + @JsonProperty(value ="gameName") + @NonNull + private String gameName; - @JsonProperty(value ="game") - private GameDTO game; + @JsonProperty(value ="name") + @NonNull + private String name; + + @JsonProperty(value ="id") + @NonNull + private Integer id; + + @JsonProperty(value ="rooms") + @NonNull + private Integer rooms; + + @JsonProperty(value ="players") + private List players = new ArrayList(); @Builder @Jacksonized - private InlineResponse200ListGamesAnyOfDTO(GameInfoDTO gameInfo, GameDTO game) { - this.gameInfo = gameInfo; - this.game = game; + private InlineResponse200ListGamesAnyOfDTO(@NonNull String gameName, @NonNull String name, @NonNull Integer id, @NonNull Integer rooms, List players) { + this.gameName = gameName; + this.name = name; + this.id = id; + this.rooms = rooms; + this.players = players; validatePartialCombinations(); } @@ -30,9 +49,15 @@ private InlineResponse200ListGamesAnyOfDTO(GameInfoDTO gameInfo, GameDTO game) { private void validatePartialCombinations() { boolean satisfiedCondition = false; - if (Objects.nonNull(this.gameInfo)) { + if (Objects.nonNull(this.gameName)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.name)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.id)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.rooms)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.game)) { + } else if (Objects.nonNull(this.players)) { satisfiedCondition = true; } diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiErrorDTO.java index 7e8c4b99..69e7b9de 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiErrorDTO.java @@ -59,13 +59,11 @@ public ApiErrorDTO build() { } } - @Schema(name = "code", required = true) public Integer getCode() { return code; } - @Schema(name = "message", required = true) public String getMessage() { return message; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiTestDTO.java index 4a49cae7..38142c99 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiTestDTO.java @@ -152,19 +152,16 @@ public ApiTestDTO build() { } } - @Schema(name = "unionEnum", required = true) public UnionEnum getUnionEnum() { return unionEnum; } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public Integer getId() { return id; @@ -178,7 +175,6 @@ public void setUnionIntegerEnum(UnionIntegerEnum unionIntegerEnum) { this.unionIntegerEnum = unionIntegerEnum; } - @Schema(name = "unionNumberEnum", required = false) public UnionNumberEnum getUnionNumberEnum() { return unionNumberEnum; @@ -217,7 +213,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiTestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiTestInfoDTO.java index ccf6d617..5f7f0bd4 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiTestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsGeneration/assets/ApiTestInfoDTO.java @@ -68,7 +68,6 @@ public ApiTestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsLombokGeneration/assets/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsLombokGeneration/assets/ApiTestDTO.java index cb5f2140..0688d92a 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsLombokGeneration/assets/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiEnumsLombokGeneration/assets/ApiTestDTO.java @@ -96,6 +96,7 @@ public String toString() { } } + @Builder @Jacksonized private ApiTestDTO(UnionEnum unionEnum, @NonNull String name, @NonNull Integer id, UnionIntegerEnum unionIntegerEnum, UnionNumberEnum unionNumberEnum) { diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiErrorDTO.java index 30fd87ea..89c3d5c8 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiErrorDTO.java @@ -59,13 +59,11 @@ public ApiErrorDTO build() { } } - @Schema(name = "code", required = true) public Integer getCode() { return code; } - @Schema(name = "message", required = true) public String getMessage() { return message; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiInlineParameterTestIdDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiInlineParameterTestIdDTO.java index 6a957e41..e7f09fa4 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiInlineParameterTestIdDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiInlineParameterTestIdDTO.java @@ -43,7 +43,6 @@ public ApiInlineParameterTestIdDTO build() { } } - @Schema(name = "email", required = false) public String getEmail() { return email; @@ -78,7 +77,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiTestDTO.java index f588f5f3..abc078e1 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiTestDTO.java @@ -59,13 +59,11 @@ public ApiTestDTO build() { } } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public Integer getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiTestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiTestInfoDTO.java index a80440cc..3b364115 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiTestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiParametersWithContentGeneration/assets/ApiTestInfoDTO.java @@ -68,7 +68,6 @@ public ApiTestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/ErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/ErrorDTO.java index c7d0e0b1..952682fa 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/ErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/ErrorDTO.java @@ -59,13 +59,11 @@ public ErrorDTO build() { } } - @Schema(name = "code", required = true) public Integer getCode() { return code; } - @Schema(name = "message", required = true) public String getMessage() { return message; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/TestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/TestDTO.java index 793450ee..b8a6245f 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/TestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/TestDTO.java @@ -59,13 +59,11 @@ public TestDTO build() { } } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public Integer getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/TestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/TestInfoDTO.java index b184ccb3..daded207 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/TestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiPathParameterGeneration/assets/TestInfoDTO.java @@ -68,7 +68,6 @@ public TestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiErrorDTO.java index eea4e7cb..b683253f 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiErrorDTO.java @@ -59,13 +59,11 @@ public ApiErrorDTO build() { } } - @Schema(name = "code", required = true) public Integer getCode() { return code; } - @Schema(name = "message", required = true) public String getMessage() { return message; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiTestDTO.java index 0eb64872..a474a646 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiTestDTO.java @@ -59,13 +59,11 @@ public ApiTestDTO build() { } } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public Integer getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiTestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiTestInfoDTO.java index 456365f7..34f405f6 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiTestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/ApiTestInfoDTO.java @@ -68,7 +68,6 @@ public ApiTestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/TestSchemaApi.java b/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/TestSchemaApi.java index 13f8f456..24a12663 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/TestSchemaApi.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiPathWithSpecialCharGeneration/assets/TestSchemaApi.java @@ -21,7 +21,10 @@ public interface TestSchemaApi { - + /** + * GET /test_schema: List all available test + * @return A paged array of tests; (status code 200) + */ @Operation( operationId = "listTest", diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiErrorDTO.java index 749d5b91..7643f7aa 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiErrorDTO.java @@ -59,13 +59,11 @@ public ApiErrorDTO build() { } } - @Schema(name = "code", required = true) public Integer getCode() { return code; } - @Schema(name = "message", required = true) public String getMessage() { return message; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiTestDTO.java index f3525ddb..df7419a3 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiTestDTO.java @@ -59,13 +59,11 @@ public ApiTestDTO build() { } } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public Integer getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiTestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiTestInfoDTO.java index 396626cb..298025cc 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiTestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiReactiveGeneration/assets/ApiTestInfoDTO.java @@ -68,7 +68,6 @@ public ApiTestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/ErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/ErrorDTO.java index 1e78fe15..b7fb84c9 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/ErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/ErrorDTO.java @@ -59,13 +59,11 @@ public ErrorDTO build() { } } - @Schema(name = "code", required = true) public Integer getCode() { return code; } - @Schema(name = "message", required = true) public String getMessage() { return message; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestDTO.java index 86f902a8..b5ef46d2 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestDTO.java @@ -59,13 +59,11 @@ public TestDTO build() { } } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public Integer getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestInfoDTO.java index b5340214..459675c5 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestInfoDTO.java @@ -68,7 +68,6 @@ public TestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestTagFirstApi.java b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestTagFirstApi.java index 5fdb988d..741d94b2 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestTagFirstApi.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestTagFirstApi.java @@ -21,7 +21,10 @@ public interface TestTagFirstApi { - + /** + * GET /test: List all available testServer + * @return A paged array of tests; (status code 200) + */ @Operation( operationId = "listTestServer", diff --git a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestTagSecondApi.java b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestTagSecondApi.java index e1174913..84fed12e 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestTagSecondApi.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testApiTagsGeneration/assets/TestTagSecondApi.java @@ -21,7 +21,11 @@ public interface TestTagSecondApi { - + /** + * GET /test/{testId}: Info for a specific test + * @param testId The id of the test to retrieve true + * @return Expected response to a valid request; (status code 200) + */ @Operation( operationId = "showTestById", diff --git a/multiapi-engine/src/test/resources/openapigenerator/testCoconutSchema/assets/model/FieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testCoconutSchema/assets/model/FieldDTO.java index ff7906ed..96b95924 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testCoconutSchema/assets/model/FieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testCoconutSchema/assets/model/FieldDTO.java @@ -3,6 +3,9 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.List; +import java.util.ArrayList; import lombok.Builder; import lombok.Data; import lombok.extern.jackson.Jacksonized; @@ -11,50 +14,218 @@ @Data public class FieldDTO { - @JsonProperty(value ="stringField") - private StringFieldDTO stringField; + @JsonProperty(value ="precision") + private Integer precision; - @JsonProperty(value ="sequenceField") - private SequenceFieldDTO sequenceField; + @JsonProperty(value ="defaultItem") + private List defaultItem = new ArrayList(); - @JsonProperty(value ="dateField") - private DateFieldDTO dateField; + @JsonProperty(value ="maximum") + private Integer maximum; - @JsonProperty(value ="enumField") - private EnumFieldDTO enumField; + @JsonProperty(value ="type") + private String type; - @JsonProperty(value ="booleanField") - private BooleanFieldDTO booleanField; + @JsonProperty(value ="scale") + private Integer scale; - @JsonProperty(value ="arrayField") - private ArrayFieldDTO arrayField; + @JsonProperty(value ="minLength") + private Integer minLength; - @JsonProperty(value ="numberField") - private NumberFieldDTO numberField; + @JsonProperty(value ="increment") + private Integer increment; - @JsonProperty(value ="objectField") - private ObjectFieldDTO objectField; + @JsonProperty(value ="keyType") + private String keyType; - @JsonProperty(value ="mapField") - private MapFieldDTO mapField; + @JsonProperty(value ="requiredValues") + private List requiredValues = new ArrayList(); - @JsonProperty(value ="unionField") - private UnionFieldDTO unionField; + @JsonProperty(value ="optionalUnion") + private Boolean optionalUnion; + + @JsonProperty(value ="initialValue") + private String initialValue; + + @JsonProperty(value ="flagExclusiveMinimum") + private Boolean flagExclusiveMinimum; + + @JsonProperty(value ="flagExclusiveMaximum") + private Boolean flagExclusiveMaximum; + + @JsonProperty(value ="defaultValue") + private Boolean defaultValue; + + @JsonProperty(value ="enumValues") + private List enumValues = new ArrayList(); + + @JsonProperty(value ="properties") + private List properties = new ArrayList(); + + @JsonProperty(value ="defaultValues") + private List defaultValues = new ArrayList(); + + @JsonProperty(value ="unionEnum") + private UnionEnum unionEnum; + + public enum UnionEnum { + ONEOF("oneof"), + ANYOF("anyof"), + ALLOF("allof"); + + private String value; + + UnionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @JsonProperty(value ="seqEnum") + private SeqEnum seqEnum; + + public enum SeqEnum { + MONTH("MONTH"), + YEAR("YEAR"), + HOUR("HOUR"), + MINUTE("MINUTE"), + SECOND("SECOND"), + DAY("DAY"); + + private String value; + + SeqEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @JsonProperty(value ="arraySize") + private Integer arraySize; + + @JsonProperty(value ="multipleOf") + private Integer multipleOf; + + @JsonProperty(value ="mapSize") + private Integer mapSize; + + @JsonProperty(value ="mapTypes") + private List mapTypes = new ArrayList(); + + @JsonProperty(value ="format") + private String format; + + @JsonProperty(value ="generatedFlag") + private Boolean generatedFlag; + + @JsonProperty(value ="maxLength") + private Integer maxLength; + + @JsonProperty(value ="uniqueItems") + private Boolean uniqueItems; + + @JsonProperty(value ="elements") + private Integer elements; + + @JsonProperty(value ="name") + private String name; + + @JsonProperty(value ="regex") + private String regex; + + @JsonProperty(value ="minItems") + private Integer minItems; + + @JsonProperty(value ="values") + private List values = new ArrayList(); + + @JsonProperty(value ="minimum") + private Integer minimum; + + @JsonProperty(value ="numberEnum") + private NumberEnum numberEnum; + + public enum NumberEnum { + FLOAT("float"), + INTEGER("integer"); + + private String value; + + NumberEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @JsonProperty(value ="valueLength") + private Integer valueLength; @Builder @Jacksonized - private FieldDTO(StringFieldDTO stringField, SequenceFieldDTO sequenceField, DateFieldDTO dateField, EnumFieldDTO enumField, BooleanFieldDTO booleanField, ArrayFieldDTO arrayField, NumberFieldDTO numberField, ObjectFieldDTO objectField, MapFieldDTO mapField, UnionFieldDTO unionField) { - this.stringField = stringField; - this.sequenceField = sequenceField; - this.dateField = dateField; - this.enumField = enumField; - this.booleanField = booleanField; - this.arrayField = arrayField; - this.numberField = numberField; - this.objectField = objectField; - this.mapField = mapField; - this.unionField = unionField; + private FieldDTO(Integer precision, List defaultItem, Integer maximum, String type, Integer scale, Integer minLength, Integer increment, String keyType, List requiredValues, Boolean optionalUnion, String initialValue, Boolean flagExclusiveMinimum, Boolean flagExclusiveMaximum, Boolean defaultValue, List enumValues, List properties, List defaultValues, UnionEnum unionEnum, SeqEnum seqEnum, Integer arraySize, Integer multipleOf, Integer mapSize, List mapTypes, String format, Boolean generatedFlag, Integer maxLength, Boolean uniqueItems, Integer elements, String name, String regex, Integer minItems, List values, Integer minimum, NumberEnum numberEnum, Integer valueLength) { + this.precision = precision; + this.defaultItem = defaultItem; + this.maximum = maximum; + this.type = type; + this.scale = scale; + this.minLength = minLength; + this.increment = increment; + this.keyType = keyType; + this.requiredValues = requiredValues; + this.optionalUnion = optionalUnion; + this.initialValue = initialValue; + this.flagExclusiveMinimum = flagExclusiveMinimum; + this.flagExclusiveMaximum = flagExclusiveMaximum; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + this.properties = properties; + this.defaultValues = defaultValues; + this.unionEnum = unionEnum; + this.seqEnum = seqEnum; + this.arraySize = arraySize; + this.multipleOf = multipleOf; + this.mapSize = mapSize; + this.mapTypes = mapTypes; + this.format = format; + this.generatedFlag = generatedFlag; + this.maxLength = maxLength; + this.uniqueItems = uniqueItems; + this.elements = elements; + this.name = name; + this.regex = regex; + this.minItems = minItems; + this.values = values; + this.minimum = minimum; + this.numberEnum = numberEnum; + this.valueLength = valueLength; validatePartialCombinations(); } @@ -62,25 +233,75 @@ private FieldDTO(StringFieldDTO stringField, SequenceFieldDTO sequenceField, Dat private void validatePartialCombinations() { boolean satisfiedCondition = false; - if (Objects.nonNull(this.stringField)) { + if (Objects.nonNull(this.precision)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.defaultItem)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.maximum)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.type)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.scale)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.minLength)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.increment)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.keyType)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.requiredValues)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.optionalUnion)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.initialValue)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.flagExclusiveMinimum)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.flagExclusiveMaximum)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.defaultValue)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.enumValues)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.properties)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.defaultValues)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.unionEnum)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.seqEnum)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.arraySize)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.multipleOf)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.mapSize)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.mapTypes)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.format)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.generatedFlag)) { + satisfiedCondition = true; + } else if (Objects.nonNull(this.maxLength)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.sequenceField)) { + } else if (Objects.nonNull(this.uniqueItems)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.dateField)) { + } else if (Objects.nonNull(this.elements)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.enumField)) { + } else if (Objects.nonNull(this.name)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.booleanField)) { + } else if (Objects.nonNull(this.regex)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.arrayField)) { + } else if (Objects.nonNull(this.minItems)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.numberField)) { + } else if (Objects.nonNull(this.values)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.objectField)) { + } else if (Objects.nonNull(this.minimum)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.mapField)) { + } else if (Objects.nonNull(this.numberEnum)) { satisfiedCondition = true; - } else if (Objects.nonNull(this.unionField)) { + } else if (Objects.nonNull(this.valueLength)) { satisfiedCondition = true; } diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiDateFieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiDateFieldDTO.java index b7462da6..6ccbf119 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiDateFieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiDateFieldDTO.java @@ -134,7 +134,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiEnumFieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiEnumFieldDTO.java index 8ec743a9..7f19eeab 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiEnumFieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiEnumFieldDTO.java @@ -101,7 +101,6 @@ public ApiEnumFieldDTO build() { } } - @Schema(name = "enumValues", required = false) public List getEnumValues() { return enumValues; @@ -110,7 +109,6 @@ public void setEnumValues(List enumValues) { this.enumValues = enumValues; } - @Schema(name = "type", required = false) public String getType() { return type; @@ -119,7 +117,6 @@ public void setType(String type) { this.type = type; } - @Schema(name = "defaultValues", required = false) public List getDefaultValues() { return defaultValues; @@ -128,7 +125,6 @@ public void setDefaultValues(List defaultValues) { this.defaultValues = defaultValues; } - @Schema(name = "name", required = false) public String getName() { return name; @@ -137,7 +133,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "defaultValue", required = false) public String getDefaultValue() { return defaultValue; @@ -176,7 +171,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiMapFieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiMapFieldDTO.java index 2a6d5e34..c3482470 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiMapFieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiMapFieldDTO.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; +import com.sngular.multifileplugin.testcomplexanyof.model.ApiTypeArrayDTO; import java.util.List; import java.util.ArrayList; @@ -111,7 +112,6 @@ public ApiMapFieldDTO build() { } } - @Schema(name = "keyType", required = false) public String getKeyType() { return keyType; @@ -120,7 +120,6 @@ public void setKeyType(String keyType) { this.keyType = keyType; } - @Schema(name = "type", required = false) public String getType() { return type; @@ -129,7 +128,6 @@ public void setType(String type) { this.type = type; } - @Schema(name = "defaultValues", required = false) public List getDefaultValues() { return defaultValues; @@ -138,7 +136,6 @@ public void setDefaultValues(List defaultValues) { this.defaultValues = defaultValues; } - @Schema(name = "name", required = false) public String getName() { return name; @@ -147,7 +144,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "mapSize", required = false) public Integer getMapSize() { return mapSize; @@ -156,7 +152,6 @@ public void setMapSize(Integer mapSize) { this.mapSize = mapSize; } - @Schema(name = "mapTypes", required = false) public List getMapTypes() { return mapTypes; @@ -196,7 +191,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiNumberFieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiNumberFieldDTO.java index 61f489fc..dca13137 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiNumberFieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiNumberFieldDTO.java @@ -183,7 +183,6 @@ public ApiNumberFieldDTO build() { } } - @Schema(name = "precision", required = false) public Integer getPrecision() { return precision; @@ -192,7 +191,6 @@ public void setPrecision(Integer precision) { this.precision = precision; } - @Schema(name = "maximum", required = false) public Integer getMaximum() { return maximum; @@ -201,7 +199,6 @@ public void setMaximum(Integer maximum) { this.maximum = maximum; } - @Schema(name = "type", required = false) public String getType() { return type; @@ -210,7 +207,6 @@ public void setType(String type) { this.type = type; } - @Schema(name = "defaultValues", required = false) public List getDefaultValues() { return defaultValues; @@ -219,7 +215,6 @@ public void setDefaultValues(List defaultValues) { this.defaultValues = defaultValues; } - @Schema(name = "name", required = false) public String getName() { return name; @@ -228,7 +223,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "multipleOf", required = false) public Integer getMultipleOf() { return multipleOf; @@ -237,7 +231,6 @@ public void setMultipleOf(Integer multipleOf) { this.multipleOf = multipleOf; } - @Schema(name = "scale", required = false) public Integer getScale() { return scale; @@ -246,7 +239,6 @@ public void setScale(Integer scale) { this.scale = scale; } - @Schema(name = "minimum", required = false) public Integer getMinimum() { return minimum; @@ -255,7 +247,6 @@ public void setMinimum(Integer minimum) { this.minimum = minimum; } - @Schema(name = "flagExclusiveMinimum", required = false) public Boolean getFlagExclusiveMinimum() { return flagExclusiveMinimum; @@ -264,7 +255,6 @@ public void setFlagExclusiveMinimum(Boolean flagExclusiveMinimum) { this.flagExclusiveMinimum = flagExclusiveMinimum; } - @Schema(name = "flagExclusiveMaximum", required = false) public Boolean getFlagExclusiveMaximum() { return flagExclusiveMaximum; @@ -273,7 +263,6 @@ public void setFlagExclusiveMaximum(Boolean flagExclusiveMaximum) { this.flagExclusiveMaximum = flagExclusiveMaximum; } - @Schema(name = "numberEnum", required = false) public NumberEnum getNumberEnum() { return numberEnum; @@ -282,7 +271,6 @@ public void setNumberEnum(NumberEnum numberEnum) { this.numberEnum = numberEnum; } - @Schema(name = "defaultValue", required = false) public Long getDefaultValue() { return defaultValue; @@ -328,7 +316,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiObjectFieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiObjectFieldDTO.java index f25b7b79..d2f7ea49 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiObjectFieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiObjectFieldDTO.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; +import com.sngular.multifileplugin.testcomplexanyof.model.ApiTypeArrayDTO; import java.util.List; import java.util.ArrayList; @@ -109,7 +110,6 @@ public ApiObjectFieldDTO build() { } } - @Schema(name = "requiredValues", required = false) public List getRequiredValues() { return requiredValues; @@ -118,7 +118,6 @@ public void setRequiredValues(List requiredValues) { this.requiredValues = requiredValues; } - @Schema(name = "type", required = false) public String getType() { return type; @@ -127,7 +126,6 @@ public void setType(String type) { this.type = type; } - @Schema(name = "properties", required = false) public List getProperties() { return properties; @@ -136,7 +134,6 @@ public void setProperties(List properties) { this.properties = properties; } - @Schema(name = "defaultValues", required = false) public List getDefaultValues() { return defaultValues; @@ -145,7 +142,6 @@ public void setDefaultValues(List defaultValues) { this.defaultValues = defaultValues; } - @Schema(name = "name", required = false) public String getName() { return name; @@ -184,7 +180,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiSchemaDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiSchemaDTO.java index 63851fb0..34dc1a06 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiSchemaDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiSchemaDTO.java @@ -120,13 +120,11 @@ public ApiSchemaDTO build() { } } - @Schema(name = "type", required = true) public String getType() { return type; } - @Schema(name = "properties", required = false) public List getProperties() { return properties; @@ -135,25 +133,21 @@ public void setProperties(List properties) { this.properties = properties; } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public String getId() { return id; } - @Schema(name = "subjectName", required = true) public String getSubjectName() { return subjectName; } - @Schema(name = "requiredFields", required = false) public List getRequiredFields() { return requiredFields; @@ -193,7 +187,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiSequenceFieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiSequenceFieldDTO.java index 12c091c8..0841aff1 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiSequenceFieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiSequenceFieldDTO.java @@ -156,7 +156,6 @@ public ApiSequenceFieldDTO build() { } } - @Schema(name = "elements", required = false) public Integer getElements() { return elements; @@ -165,7 +164,6 @@ public void setElements(Integer elements) { this.elements = elements; } - @Schema(name = "type", required = false) public String getType() { return type; @@ -174,7 +172,6 @@ public void setType(String type) { this.type = type; } - @Schema(name = "properties", required = false) public List getProperties() { return properties; @@ -183,7 +180,6 @@ public void setProperties(List properties) { this.properties = properties; } - @Schema(name = "defaultValues", required = false) public List getDefaultValues() { return defaultValues; @@ -192,7 +188,6 @@ public void setDefaultValues(List defaultValues) { this.defaultValues = defaultValues; } - @Schema(name = "seqEnum", required = false) public SeqEnum getSeqEnum() { return seqEnum; @@ -201,7 +196,6 @@ public void setSeqEnum(SeqEnum seqEnum) { this.seqEnum = seqEnum; } - @Schema(name = "name", required = false) public String getName() { return name; @@ -210,7 +204,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "initialValue", required = false) public String getInitialValue() { return initialValue; @@ -219,7 +212,6 @@ public void setInitialValue(String initialValue) { this.initialValue = initialValue; } - @Schema(name = "increment", required = false) public Integer getIncrement() { return increment; @@ -261,7 +253,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiStringFieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiStringFieldDTO.java index 5249555c..2612722d 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiStringFieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiStringFieldDTO.java @@ -141,7 +141,6 @@ public ApiStringFieldDTO build() { } } - @Schema(name = "maxLength", required = false) public Integer getMaxLength() { return maxLength; @@ -150,7 +149,6 @@ public void setMaxLength(Integer maxLength) { this.maxLength = maxLength; } - @Schema(name = "type", required = false) public String getType() { return type; @@ -159,7 +157,6 @@ public void setType(String type) { this.type = type; } - @Schema(name = "properties", required = false) public List getProperties() { return properties; @@ -168,7 +165,6 @@ public void setProperties(List properties) { this.properties = properties; } - @Schema(name = "defaultValues", required = false) public List getDefaultValues() { return defaultValues; @@ -177,7 +173,6 @@ public void setDefaultValues(List defaultValues) { this.defaultValues = defaultValues; } - @Schema(name = "name", required = false) public String getName() { return name; @@ -186,7 +181,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "regex", required = false) public String getRegex() { return regex; @@ -195,7 +189,6 @@ public void setRegex(String regex) { this.regex = regex; } - @Schema(name = "minLength", required = false) public Integer getMinLength() { return minLength; @@ -204,7 +197,6 @@ public void setMinLength(Integer minLength) { this.minLength = minLength; } - @Schema(name = "format", required = false) public Integer getFormat() { return format; @@ -213,7 +205,6 @@ public void setFormat(Integer format) { this.format = format; } - @Schema(name = "valueLength", required = false) public Integer getValueLength() { return valueLength; @@ -256,7 +247,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiTypeArrayDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiTypeArrayDTO.java index 38f83ce0..6d8ebe32 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiTypeArrayDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiTypeArrayDTO.java @@ -499,10 +499,6 @@ public ApiTypeArrayDTO build() { } } - /** - * Get precision - * @return precision - */ @Schema(name = "precision", required = false) public Integer getPrecision() { return precision; @@ -511,10 +507,6 @@ public void setPrecision(Integer precision) { this.precision = precision; } - /** - * Get defaultItem - * @return defaultItem - */ @Schema(name = "defaultItem", required = false) public getDefaultItem() { return defaultItem; @@ -523,10 +515,6 @@ public void setDefaultItem( defaultItem) { this.defaultItem = defaultItem; } - /** - * Get maximum - * @return maximum - */ @Schema(name = "maximum", required = false) public Integer getMaximum() { return maximum; @@ -535,10 +523,6 @@ public void setMaximum(Integer maximum) { this.maximum = maximum; } - /** - * Get type - * @return type - */ @Schema(name = "type", required = false) public String getType() { return type; @@ -547,10 +531,6 @@ public void setType(String type) { this.type = type; } - /** - * Get scale - * @return scale - */ @Schema(name = "scale", required = false) public Integer getScale() { return scale; @@ -559,10 +539,6 @@ public void setScale(Integer scale) { this.scale = scale; } - /** - * Get minLength - * @return minLength - */ @Schema(name = "minLength", required = false) public Integer getMinLength() { return minLength; @@ -571,10 +547,6 @@ public void setMinLength(Integer minLength) { this.minLength = minLength; } - /** - * Get increment - * @return increment - */ @Schema(name = "increment", required = false) public Integer getIncrement() { return increment; @@ -583,10 +555,6 @@ public void setIncrement(Integer increment) { this.increment = increment; } - /** - * Get keyType - * @return keyType - */ @Schema(name = "keyType", required = false) public String getKeyType() { return keyType; @@ -595,10 +563,6 @@ public void setKeyType(String keyType) { this.keyType = keyType; } - /** - * Get requiredValues - * @return requiredValues - */ @Schema(name = "requiredValues", required = false) public List getRequiredValues() { return requiredValues; @@ -607,10 +571,6 @@ public void setRequiredValues(List requiredValues) { this.requiredValues = requiredValues; } - /** - * Get optionalUnion - * @return optionalUnion - */ @Schema(name = "optionalUnion", required = false) public Boolean getOptionalUnion() { return optionalUnion; @@ -619,10 +579,6 @@ public void setOptionalUnion(Boolean optionalUnion) { this.optionalUnion = optionalUnion; } - /** - * Get initialValue - * @return initialValue - */ @Schema(name = "initialValue", required = false) public String getInitialValue() { return initialValue; @@ -631,10 +587,6 @@ public void setInitialValue(String initialValue) { this.initialValue = initialValue; } - /** - * Get flagExclusiveMinimum - * @return flagExclusiveMinimum - */ @Schema(name = "flagExclusiveMinimum", required = false) public Boolean getFlagExclusiveMinimum() { return flagExclusiveMinimum; @@ -643,10 +595,6 @@ public void setFlagExclusiveMinimum(Boolean flagExclusiveMinimum) { this.flagExclusiveMinimum = flagExclusiveMinimum; } - /** - * Get flagExclusiveMaximum - * @return flagExclusiveMaximum - */ @Schema(name = "flagExclusiveMaximum", required = false) public Boolean getFlagExclusiveMaximum() { return flagExclusiveMaximum; @@ -655,10 +603,6 @@ public void setFlagExclusiveMaximum(Boolean flagExclusiveMaximum) { this.flagExclusiveMaximum = flagExclusiveMaximum; } - /** - * Get defaultValue - * @return defaultValue - */ @Schema(name = "defaultValue", required = false) public Boolean getDefaultValue() { return defaultValue; @@ -667,10 +611,6 @@ public void setDefaultValue(Boolean defaultValue) { this.defaultValue = defaultValue; } - /** - * Get enumValues - * @return enumValues - */ @Schema(name = "enumValues", required = false) public List getEnumValues() { return enumValues; @@ -679,10 +619,6 @@ public void setEnumValues(List enumValues) { this.enumValues = enumValues; } - /** - * Get properties - * @return properties - */ @Schema(name = "properties", required = false) public List getProperties() { return properties; @@ -691,10 +627,6 @@ public void setProperties(List properties) { this.properties = properties; } - /** - * Get defaultValues - * @return defaultValues - */ @Schema(name = "defaultValues", required = false) public List getDefaultValues() { return defaultValues; @@ -703,10 +635,6 @@ public void setDefaultValues(List defaultValues) { this.defaultValues = defaultValues; } - /** - * Get unionEnum - * @return unionEnum - */ @Schema(name = "unionEnum", required = false) public UnionEnum getUnionEnum() { return unionEnum; @@ -715,10 +643,6 @@ public void setUnionEnum(UnionEnum unionEnum) { this.unionEnum = unionEnum; } - /** - * Get seqEnum - * @return seqEnum - */ @Schema(name = "seqEnum", required = false) public SeqEnum getSeqEnum() { return seqEnum; @@ -727,10 +651,6 @@ public void setSeqEnum(SeqEnum seqEnum) { this.seqEnum = seqEnum; } - /** - * Get arraySize - * @return arraySize - */ @Schema(name = "arraySize", required = false) public Integer getArraySize() { return arraySize; @@ -739,10 +659,6 @@ public void setArraySize(Integer arraySize) { this.arraySize = arraySize; } - /** - * Get multipleOf - * @return multipleOf - */ @Schema(name = "multipleOf", required = false) public Integer getMultipleOf() { return multipleOf; @@ -751,10 +667,6 @@ public void setMultipleOf(Integer multipleOf) { this.multipleOf = multipleOf; } - /** - * Get mapSize - * @return mapSize - */ @Schema(name = "mapSize", required = false) public Integer getMapSize() { return mapSize; @@ -763,10 +675,6 @@ public void setMapSize(Integer mapSize) { this.mapSize = mapSize; } - /** - * Get mapTypes - * @return mapTypes - */ @Schema(name = "mapTypes", required = false) public List getMapTypes() { return mapTypes; @@ -775,10 +683,6 @@ public void setMapTypes(List mapTypes) { this.mapTypes = mapTypes; } - /** - * Get format - * @return format - */ @Schema(name = "format", required = false) public Integer getFormat() { return format; @@ -787,10 +691,6 @@ public void setFormat(Integer format) { this.format = format; } - /** - * Get generatedFlag - * @return generatedFlag - */ @Schema(name = "generatedFlag", required = false) public Boolean getGeneratedFlag() { return generatedFlag; @@ -799,10 +699,6 @@ public void setGeneratedFlag(Boolean generatedFlag) { this.generatedFlag = generatedFlag; } - /** - * Get maxLength - * @return maxLength - */ @Schema(name = "maxLength", required = false) public Integer getMaxLength() { return maxLength; @@ -811,10 +707,6 @@ public void setMaxLength(Integer maxLength) { this.maxLength = maxLength; } - /** - * Get uniqueItems - * @return uniqueItems - */ @Schema(name = "uniqueItems", required = false) public Boolean getUniqueItems() { return uniqueItems; @@ -823,10 +715,6 @@ public void setUniqueItems(Boolean uniqueItems) { this.uniqueItems = uniqueItems; } - /** - * Get elements - * @return elements - */ @Schema(name = "elements", required = false) public Integer getElements() { return elements; @@ -835,10 +723,6 @@ public void setElements(Integer elements) { this.elements = elements; } - /** - * Get name - * @return name - */ @Schema(name = "name", required = false) public String getName() { return name; @@ -847,10 +731,6 @@ public void setName(String name) { this.name = name; } - /** - * Get regex - * @return regex - */ @Schema(name = "regex", required = false) public String getRegex() { return regex; @@ -859,10 +739,6 @@ public void setRegex(String regex) { this.regex = regex; } - /** - * Get minItems - * @return minItems - */ @Schema(name = "minItems", required = false) public Integer getMinItems() { return minItems; @@ -871,10 +747,6 @@ public void setMinItems(Integer minItems) { this.minItems = minItems; } - /** - * Get values - * @return values - */ @Schema(name = "values", required = false) public List getValues() { return values; @@ -883,10 +755,6 @@ public void setValues(List values) { this.values = values; } - /** - * Get minimum - * @return minimum - */ @Schema(name = "minimum", required = false) public Integer getMinimum() { return minimum; @@ -895,10 +763,6 @@ public void setMinimum(Integer minimum) { this.minimum = minimum; } - /** - * Get numberEnum - * @return numberEnum - */ @Schema(name = "numberEnum", required = false) public NumberEnum getNumberEnum() { return numberEnum; @@ -907,10 +771,6 @@ public void setNumberEnum(NumberEnum numberEnum) { this.numberEnum = numberEnum; } - /** - * Get valueLength - * @return valueLength - */ @Schema(name = "valueLength", required = false) public Integer getValueLength() { return valueLength; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiUnionFieldDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiUnionFieldDTO.java index e381321b..ac13ad9a 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiUnionFieldDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testComplexAnyOf/assets/ApiUnionFieldDTO.java @@ -78,7 +78,7 @@ public static ApiUnionFieldDTO.ApiUnionFieldDTOBuilder builder() { @JsonPOJOBuilder(buildMethodName = "build", withPrefix = "") public static class ApiUnionFieldDTOBuilder { - private ApiDefaultItemDTO defaultItem; + private defaultItem; private Boolean generatedFlag; private String type; private UnionEnum unionEnum; @@ -134,7 +134,6 @@ public ApiUnionFieldDTO build() { } } - @Schema(name = "defaultItem", required = false) public ApiDefaultItemDTO getDefaultItem() { return defaultItem; @@ -143,7 +142,6 @@ public void setDefaultItem(ApiDefaultItemDTO defaultItem) { this.defaultItem = defaultItem; } - @Schema(name = "generatedFlag", required = false) public Boolean getGeneratedFlag() { return generatedFlag; @@ -152,7 +150,6 @@ public void setGeneratedFlag(Boolean generatedFlag) { this.generatedFlag = generatedFlag; } - @Schema(name = "type", required = false) public String getType() { return type; @@ -161,7 +158,6 @@ public void setType(String type) { this.type = type; } - @Schema(name = "unionEnum", required = false) public UnionEnum getUnionEnum() { return unionEnum; @@ -170,7 +166,6 @@ public void setUnionEnum(UnionEnum unionEnum) { this.unionEnum = unionEnum; } - @Schema(name = "name", required = false) public String getName() { return name; @@ -179,7 +174,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "optionalUnion", required = false) public Boolean getOptionalUnion() { return optionalUnion; @@ -188,7 +182,6 @@ public void setOptionalUnion(Boolean optionalUnion) { this.optionalUnion = optionalUnion; } - @Schema(name = "values", required = false) public List getValues() { return values; @@ -229,7 +222,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testExternalRefsGeneration/assets/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testExternalRefsGeneration/assets/ApiTestDTO.java index 66cd8e71..9f23995d 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testExternalRefsGeneration/assets/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testExternalRefsGeneration/assets/ApiTestDTO.java @@ -59,13 +59,11 @@ public ApiTestDTO build() { } } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public Integer getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiErrorDTO.java index fb431228..25de3d29 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiErrorDTO.java @@ -53,7 +53,6 @@ public ApiErrorDTO build() { } } - @Schema(name = "code", required = false) public Integer getCode() { return code; @@ -62,7 +61,6 @@ public void setCode(Integer code) { this.code = code; } - @Schema(name = "message", required = false) public String getMessage() { return message; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestDTO.java index ee5b963c..df87e389 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestDTO.java @@ -120,7 +120,6 @@ public ApiTestDTO build() { } } - @Schema(name = "testProcessor", required = false) public ApiTestProcessorDTO getTestProcessor() { return testProcessor; @@ -129,7 +128,6 @@ public void setTestProcessor(ApiTestProcessorDTO testProcessor) { this.testProcessor = testProcessor; } - @Schema(name = "description", required = false) public String getDescription() { return description; @@ -138,7 +136,6 @@ public void setDescription(String description) { this.description = description; } - @Schema(name = "tags", required = false) public List getTags() { return tags; @@ -147,7 +144,6 @@ public void setTags(List tags) { this.tags = tags; } - @Schema(name = "name", required = false) public String getName() { return name; @@ -156,7 +152,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "testTypeList", required = false) public List getTestTypeList() { return testTypeList; @@ -165,7 +160,6 @@ public void setTestTypeList(List testTypeList) { this.testTypeList = testTypeList; } - @Schema(name = "id", required = false) public Integer getId() { return id; @@ -174,7 +168,6 @@ public void setId(Integer id) { this.id = id; } - @Schema(name = "priority", required = false) public Integer getPriority() { return priority; @@ -215,7 +208,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestProcessorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestProcessorDTO.java index fbc7f084..9c9c7817 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestProcessorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestProcessorDTO.java @@ -53,7 +53,6 @@ public ApiTestProcessorDTO build() { } } - @Schema(name = "name", required = false) public String getName() { return name; @@ -62,7 +61,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "id", required = false) public String getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestTypeDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestTypeDTO.java index dbec85d8..5d623039 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestTypeDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testInlineSchemaCreation/assets/ApiTestTypeDTO.java @@ -53,7 +53,6 @@ public ApiTestTypeDTO build() { } } - @Schema(name = "name", required = false) public String getName() { return name; @@ -62,7 +61,6 @@ public void setName(String name) { this.name = name; } - @Schema(name = "id", required = false) public String getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testMultipleRefGeneration/assets/InlineResponse200CreateGameDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testMultipleRefGeneration/assets/InlineResponse200CreateGameDTO.java index 92baf23d..42d5b287 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testMultipleRefGeneration/assets/InlineResponse200CreateGameDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testMultipleRefGeneration/assets/InlineResponse200CreateGameDTO.java @@ -15,9 +15,9 @@ public class InlineResponse200CreateGameDTO { @JsonProperty(value ="code") private Integer code; @JsonProperty(value ="message") - private MessageDTO message; + private message; - private InlineResponse200CreateGameDTO(String description, Integer code, MessageDTO message) { + private InlineResponse200CreateGameDTO(String description, Integer code, message) { this.description = description; this.code = code; this.message = message; @@ -40,7 +40,7 @@ public static class InlineResponse200CreateGameDTOBuilder { private String description; private Integer code; - private MessageDTO message; + private message; public InlineResponse200CreateGameDTO.InlineResponse200CreateGameDTOBuilder description(String description) { this.description = description; @@ -51,7 +51,7 @@ public InlineResponse200CreateGameDTO.InlineResponse200CreateGameDTOBuilder code this.code = code; return this; } - public InlineResponse200CreateGameDTO.InlineResponse200CreateGameDTOBuilder message(MessageDTO message) { + public InlineResponse200CreateGameDTO.InlineResponse200CreateGameDTOBuilder message( message) { this.message = message; return this; } @@ -62,7 +62,6 @@ public InlineResponse200CreateGameDTO build() { } } - @Schema(name = "description", required = false) public String getDescription() { return description; @@ -71,7 +70,6 @@ public void setDescription(String description) { this.description = description; } - @Schema(name = "code", required = false) public Integer getCode() { return code; @@ -80,12 +78,11 @@ public void setCode(Integer code) { this.code = code; } - @Schema(name = "message", required = false) - public MessageDTO getMessage() { + public getMessage() { return message; } - public void setMessage(MessageDTO message) { + public void setMessage( message) { this.message = message; } @@ -117,7 +114,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testMultipleRefGeneration/assets/MessageDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testMultipleRefGeneration/assets/MessageDTO.java index b3a7619a..56cd8a02 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testMultipleRefGeneration/assets/MessageDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testMultipleRefGeneration/assets/MessageDTO.java @@ -13,9 +13,9 @@ public class MessageDTO { @JsonProperty(value ="description") private String description; @JsonProperty(value ="message") - private MessageDTO message; + private message; - private MessageDTO(String description, MessageDTO message) { + private MessageDTO(String description, message) { this.description = description; this.message = message; @@ -35,13 +35,13 @@ public static MessageDTO.MessageDTOBuilder builder() { public static class MessageDTOBuilder { private String description; - private MessageDTO message; + private message; public MessageDTO.MessageDTOBuilder description(String description) { this.description = description; return this; } - public MessageDTO.MessageDTOBuilder message(MessageDTO message) { + public MessageDTO.MessageDTOBuilder message( message) { this.message = message; return this; } @@ -52,7 +52,6 @@ public MessageDTO build() { } } - @Schema(name = "description", required = false) public String getDescription() { return description; @@ -61,12 +60,11 @@ public void setDescription(String description) { this.description = description; } - @Schema(name = "message", required = false) - public MessageDTO getMessage() { + public getMessage() { return message; } - public void setMessage(MessageDTO message) { + public void setMessage( message) { this.message = message; } @@ -97,7 +95,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testOverWriteModelTrue/assets/ApiTestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testOverWriteModelTrue/assets/ApiTestInfoDTO.java index 2613257d..5c6d30c0 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testOverWriteModelTrue/assets/ApiTestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testOverWriteModelTrue/assets/ApiTestInfoDTO.java @@ -108,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiErrorDTO.java index bbc29859..1d48c23e 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiErrorDTO.java @@ -95,19 +95,16 @@ public ApiErrorDTO build() { } } - @Schema(name = "code", required = true) public Integer getCode() { return code; } - @Schema(name = "message", required = true) public String getMessage() { return message; } - @Schema(name = "test", required = false) public List getTest() { return test; @@ -144,7 +141,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestAllOfDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestAllOfDTO.java index 39aebe6c..b4841f57 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestAllOfDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestAllOfDTO.java @@ -63,7 +63,6 @@ public ApiTestAllOfDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -72,7 +71,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = false) public String getTestName() { return testName; @@ -108,7 +106,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestDTO.java index 8698cb78..9f56b4a1 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestDTO.java @@ -69,13 +69,11 @@ public ApiTestDTO build() { } } - @Schema(name = "testers", required = true) public List getTesters() { return testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -108,7 +106,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestInfoDTO.java index e96573a1..624576cd 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testValidationAnnotations/assets/testApi/ApiTestInfoDTO.java @@ -68,7 +68,6 @@ public ApiTestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiErrorDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiErrorDTO.java index 447f3fac..83bc4b8a 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiErrorDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiErrorDTO.java @@ -59,13 +59,11 @@ public ApiErrorDTO build() { } } - @Schema(name = "code", required = true) public Integer getCode() { return code; } - @Schema(name = "message", required = true) public String getMessage() { return message; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiTestDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiTestDTO.java index 7d01c0a3..be2be746 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiTestDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiTestDTO.java @@ -59,13 +59,11 @@ public ApiTestDTO build() { } } - @Schema(name = "name", required = true) public String getName() { return name; } - @Schema(name = "id", required = true) public Integer getId() { return id; @@ -98,7 +96,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null"; diff --git a/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiTestInfoDTO.java b/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiTestInfoDTO.java index 2f407fa8..2737c575 100644 --- a/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiTestInfoDTO.java +++ b/multiapi-engine/src/test/resources/openapigenerator/testWebClientApiGeneration/assets/ApiTestInfoDTO.java @@ -68,7 +68,6 @@ public ApiTestInfoDTO build() { } } - @Schema(name = "testers", required = false) public List getTesters() { return testers; @@ -77,7 +76,6 @@ public void setTesters(List testers) { this.testers = testers; } - @Schema(name = "testName", required = true) public String getTestName() { return testName; @@ -110,7 +108,6 @@ public String toString() { return sb.toString(); } - private String toIndentedString(Object o) { if (o == null) { return "null";