From 1b3afd79cbbc7f1849dc5ecd3ebbe05ec7947cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Tue, 3 Feb 2026 15:33:28 +0100 Subject: [PATCH 01/17] add support for useBeanValidation in spring http interface --- .github/workflows/samples-jdk17.yaml | 6 ++++++ .../spring-http-interface-bean-validation.yaml | 17 +++++++++++++++++ .../spring-http-interface-noResponseEntity.yaml | 5 ++--- ...http-interface-reactive-bean-validation.yaml | 17 +++++++++++++++++ ...ttp-interface-reactive-noResponseEntity.yaml | 5 ++--- bin/configs/spring-http-interface-reactive.yaml | 6 ++---- bin/configs/spring-http-interface.yaml | 5 ++--- .../codegen/languages/SpringCodegen.java | 14 ++++++++++++-- .../spring-http-interface/api.mustache | 7 ++++++- 9 files changed, 66 insertions(+), 16 deletions(-) create mode 100644 bin/configs/spring-http-interface-bean-validation.yaml create mode 100644 bin/configs/spring-http-interface-reactive-bean-validation.yaml diff --git a/.github/workflows/samples-jdk17.yaml b/.github/workflows/samples-jdk17.yaml index 250520df6d9a..ebce8c2db7ea 100644 --- a/.github/workflows/samples-jdk17.yaml +++ b/.github/workflows/samples-jdk17.yaml @@ -7,6 +7,8 @@ on: - samples/client/petstore/java-helidon-client/v3/mp/** - samples/client/petstore/java-helidon-client/v3/se/** - samples/client/petstore/spring-http-interface-reactive/** + - samples/client/petstore/spring-http-interface-reactive-bean-validation/** + - samples/client/petstore/spring-http-interface-bean-validation/** - samples/client/petstore/spring-http-interface/** - samples/client/petstore/spring-http-interface-reactive-noResponseEntity/** - samples/client/petstore/spring-http-interface-noResponseEntity/** @@ -24,6 +26,8 @@ on: - samples/client/petstore/java-helidon-client/v3/mp/** - samples/client/petstore/java-helidon-client/v3/se/** - samples/client/petstore/spring-http-interface-reactive/** + - samples/client/petstore/spring-http-interface-reactive-bean-validation/** + - samples/client/petstore/spring-http-interface-bean-validation/** - samples/client/petstore/spring-http-interface/** - samples/client/petstore/spring-http-interface-reactive-noResponseEntity/** - samples/client/petstore/spring-http-interface-noResponseEntity/** @@ -47,6 +51,8 @@ jobs: - samples/client/petstore/java-helidon-client/v3/mp/ - samples/client/petstore/java-helidon-client/v3/se - samples/client/petstore/spring-http-interface-reactive + - samples/client/petstore/spring-http-interface-reactive-bean-validation + - samples/client/petstore/spring-http-interface-bean-validation - samples/client/petstore/spring-http-interface - samples/client/petstore/spring-http-interface-reactive-noResponseEntity - samples/client/petstore/spring-http-interface-noResponseEntity diff --git a/bin/configs/spring-http-interface-bean-validation.yaml b/bin/configs/spring-http-interface-bean-validation.yaml new file mode 100644 index 000000000000..10c10a81efc4 --- /dev/null +++ b/bin/configs/spring-http-interface-bean-validation.yaml @@ -0,0 +1,17 @@ +generatorName: spring +library: spring-http-interface +outputDir: samples/client/petstore/spring-http-interface-validation +inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: spring-http-interface + snapshotVersion: "true" + hideGenerationTimestamp: "true" + modelNameSuffix: 'Dto' + generatedConstructorWithRequiredArgs: "false" + # validation should be respected + useBeanValidation: "true" + # documentation provider should be ignored + documentationProvider: "springdoc" + # annotation provider should be ignored + annotationLibrary: "swagger2" diff --git a/bin/configs/spring-http-interface-noResponseEntity.yaml b/bin/configs/spring-http-interface-noResponseEntity.yaml index 86da41551bf8..9fa11406d893 100644 --- a/bin/configs/spring-http-interface-noResponseEntity.yaml +++ b/bin/configs/spring-http-interface-noResponseEntity.yaml @@ -13,7 +13,6 @@ additionalProperties: documentationProvider: "springdoc" # annotation provider should be ignored annotationLibrary: "swagger2" - # validation should be ignored - useBeanValidation: "true" - performBeanValidation: "true" + # useBeanValidation should default to "false" when not specified + # performBeanValidation should default to "false" when not specified useResponseEntity: "false" diff --git a/bin/configs/spring-http-interface-reactive-bean-validation.yaml b/bin/configs/spring-http-interface-reactive-bean-validation.yaml new file mode 100644 index 000000000000..45b2ced1d097 --- /dev/null +++ b/bin/configs/spring-http-interface-reactive-bean-validation.yaml @@ -0,0 +1,17 @@ +generatorName: spring +library: spring-http-interface +outputDir: samples/client/petstore/spring-http-interface-reactive-bean-validation +inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: spring-http-interface-reactive + snapshotVersion: "true" + hideGenerationTimestamp: "true" + reactive: "true" + # validation should be respected + useBeanValidation: "true" + # documentation provider should be ignored + documentationProvider: "springfox" + # annotation provider should be ignored + annotationLibrary: "swagger1" + diff --git a/bin/configs/spring-http-interface-reactive-noResponseEntity.yaml b/bin/configs/spring-http-interface-reactive-noResponseEntity.yaml index f7933733e896..e81c3ff3efc4 100644 --- a/bin/configs/spring-http-interface-reactive-noResponseEntity.yaml +++ b/bin/configs/spring-http-interface-reactive-noResponseEntity.yaml @@ -12,8 +12,7 @@ additionalProperties: documentationProvider: "springfox" # annotation provider should be ignored annotationLibrary: "swagger1" - # validation should be ignored - useBeanValidation: "true" - performBeanValidation: "true" + # useBeanValidation should default to "false" when not specified + # performBeanValidation should default to "false" when not specified useResponseEntity: "false" diff --git a/bin/configs/spring-http-interface-reactive.yaml b/bin/configs/spring-http-interface-reactive.yaml index b671383e90dc..9ba11ecb1fd6 100644 --- a/bin/configs/spring-http-interface-reactive.yaml +++ b/bin/configs/spring-http-interface-reactive.yaml @@ -12,7 +12,5 @@ additionalProperties: documentationProvider: "springfox" # annotation provider should be ignored annotationLibrary: "swagger1" - # validation should be ignored - useBeanValidation: "true" - performBeanValidation: "true" - +# useBeanValidation should default to "false" when not specified +# performBeanValidation should default to "false" when not specified diff --git a/bin/configs/spring-http-interface.yaml b/bin/configs/spring-http-interface.yaml index 983d2ad85ff4..f1e959e24f9d 100644 --- a/bin/configs/spring-http-interface.yaml +++ b/bin/configs/spring-http-interface.yaml @@ -13,6 +13,5 @@ additionalProperties: documentationProvider: "springdoc" # annotation provider should be ignored annotationLibrary: "swagger2" - # validation should be ignored - useBeanValidation: "true" - performBeanValidation: "true" +# useBeanValidation should default to "false" when not specified +# performBeanValidation should default to "false" when not specified diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 1c66659d0db0..d9fdf3786f46 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -384,8 +384,18 @@ public void processOpts() { documentationProvider = DocumentationProvider.NONE; annotationLibrary = AnnotationLibrary.NONE; useJakartaEe = true; - useBeanValidation = false; - performBeanValidation = false; + if(additionalProperties.containsKey(USE_BEANVALIDATION)) { + useBeanValidation = Boolean.parseBoolean(additionalProperties.get(USE_BEANVALIDATION).toString()); + } else { + //default to false if not specified + useBeanValidation = false; + } + if(additionalProperties.containsKey(PERFORM_BEANVALIDATION)) { + performBeanValidation = Boolean.parseBoolean(additionalProperties.get(PERFORM_BEANVALIDATION).toString()); + } else { + //default to false if not specified + performBeanValidation = false; + } additionalProperties.put(USE_JAKARTA_EE, useJakartaEe); additionalProperties.put(USE_BEANVALIDATION, useBeanValidation); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache index debda4a3c8b4..68c3fae791c5 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache @@ -17,6 +17,11 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; {{#reactive}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +{{^useSpringBuiltInValidation}}import org.springframework.validation.annotation.Validated;{{/useSpringBuiltInValidation}} +{{/useBeanValidation}} import org.springframework.http.codec.multipart.Part; import reactor.core.publisher.Flux; @@ -30,7 +35,7 @@ import {{javaxPackage}}.annotation.Generated; {{>generatedAnnotation}} - +{{#useBeanValidation}}{{^useSpringBuiltInValidation}}@Validated{{/useSpringBuiltInValidation}}{{/useBeanValidation}} {{#operations}} public interface {{classname}} { {{#operation}} From e17a7632c4bee71fc368ff319e36a3c0f70ddb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Tue, 3 Feb 2026 15:51:35 +0100 Subject: [PATCH 02/17] generate sample files --- .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 60 ++ .../.openapi-generator/VERSION | 1 + .../README.md | 21 + .../pom.xml | 76 ++ .../org/openapitools/api/AnotherFakeApi.java | 44 + .../java/org/openapitools/api/FakeApi.java | 382 ++++++++ .../api/FakeClassnameTags123Api.java | 44 + .../java/org/openapitools/api/PetApi.java | 229 +++++ .../java/org/openapitools/api/StoreApi.java | 99 +++ .../java/org/openapitools/api/UserApi.java | 175 ++++ .../HttpInterfacesAbstractConfigurator.java | 65 ++ .../model/AdditionalPropertiesAnyType.java | 125 +++ .../model/AdditionalPropertiesArray.java | 126 +++ .../model/AdditionalPropertiesBoolean.java | 125 +++ .../model/AdditionalPropertiesClass.java | 401 +++++++++ .../model/AdditionalPropertiesInteger.java | 125 +++ .../model/AdditionalPropertiesNumber.java | 126 +++ .../model/AdditionalPropertiesObject.java | 126 +++ .../model/AdditionalPropertiesString.java | 125 +++ .../java/org/openapitools/model/Animal.java | 129 +++ .../model/ArrayOfArrayOfNumberOnly.java | 94 ++ .../openapitools/model/ArrayOfNumberOnly.java | 94 ++ .../org/openapitools/model/ArrayTest.java | 158 ++++ .../java/org/openapitools/model/BigCat.java | 154 ++++ .../openapitools/model/Capitalization.java | 196 +++++ .../main/java/org/openapitools/model/Cat.java | 117 +++ .../java/org/openapitools/model/Category.java | 115 +++ .../openapitools/model/ChildWithNullable.java | 112 +++ .../org/openapitools/model/ClassModel.java | 81 ++ .../java/org/openapitools/model/Client.java | 81 ++ .../model/ContainerDefaultValue.java | 214 +++++ .../main/java/org/openapitools/model/Dog.java | 109 +++ .../org/openapitools/model/EnumArrays.java | 187 ++++ .../org/openapitools/model/EnumClass.java | 56 ++ .../java/org/openapitools/model/EnumTest.java | 332 +++++++ .../java/org/openapitools/model/File.java | 81 ++ .../model/FileSchemaTestClass.java | 117 +++ .../org/openapitools/model/FormatTest.java | 414 +++++++++ .../openapitools/model/HasOnlyReadOnly.java | 106 +++ .../java/org/openapitools/model/MapTest.java | 224 +++++ ...ropertiesAndAdditionalPropertiesClass.java | 143 +++ .../openapitools/model/Model200Response.java | 106 +++ .../openapitools/model/ModelApiResponse.java | 129 +++ .../org/openapitools/model/ModelList.java | 83 ++ .../org/openapitools/model/ModelReturn.java | 83 ++ .../java/org/openapitools/model/Name.java | 161 ++++ .../model/NullableMapProperty.java | 106 +++ .../org/openapitools/model/NumberOnly.java | 82 ++ .../java/org/openapitools/model/Order.java | 237 +++++ .../openapitools/model/OuterComposite.java | 128 +++ .../org/openapitools/model/OuterEnum.java | 56 ++ .../model/ParentWithNullable.java | 164 ++++ .../main/java/org/openapitools/model/Pet.java | 280 ++++++ .../org/openapitools/model/ReadOnlyFirst.java | 104 +++ ...ResponseObjectWithDifferentFieldNames.java | 150 ++++ .../openapitools/model/SpecialModelName.java | 83 ++ .../main/java/org/openapitools/model/Tag.java | 104 +++ .../openapitools/model/TypeHolderDefault.java | 201 +++++ .../openapitools/model/TypeHolderExample.java | 225 +++++ .../java/org/openapitools/model/User.java | 242 ++++++ .../java/org/openapitools/model/XmlItem.java | 810 +++++++++++++++++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 60 ++ .../.openapi-generator/VERSION | 1 + .../README.md | 21 + .../spring-http-interface-validation/pom.xml | 76 ++ .../org/openapitools/api/AnotherFakeApi.java | 40 + .../java/org/openapitools/api/FakeApi.java | 378 ++++++++ .../api/FakeClassnameTags123Api.java | 40 + .../java/org/openapitools/api/PetApi.java | 225 +++++ .../java/org/openapitools/api/StoreApi.java | 95 ++ .../java/org/openapitools/api/UserApi.java | 171 ++++ .../HttpInterfacesAbstractConfigurator.java | 65 ++ .../model/AdditionalPropertiesAnyTypeDto.java | 127 +++ .../model/AdditionalPropertiesArrayDto.java | 128 +++ .../model/AdditionalPropertiesBooleanDto.java | 127 +++ .../model/AdditionalPropertiesClassDto.java | 403 +++++++++ .../model/AdditionalPropertiesIntegerDto.java | 127 +++ .../model/AdditionalPropertiesNumberDto.java | 128 +++ .../model/AdditionalPropertiesObjectDto.java | 128 +++ .../model/AdditionalPropertiesStringDto.java | 127 +++ .../org/openapitools/model/AnimalDto.java | 123 +++ .../openapitools/model/ApiResponseDto.java | 129 +++ .../model/ArrayOfArrayOfNumberOnlyDto.java | 96 +++ .../model/ArrayOfNumberOnlyDto.java | 96 +++ .../org/openapitools/model/ArrayTestDto.java | 160 ++++ .../org/openapitools/model/BigCatDto.java | 149 ++++ .../openapitools/model/CapitalizationDto.java | 198 +++++ .../java/org/openapitools/model/CatDto.java | 111 +++ .../org/openapitools/model/CategoryDto.java | 110 +++ .../model/ChildWithNullableDto.java | 114 +++ .../org/openapitools/model/ClassModelDto.java | 83 ++ .../org/openapitools/model/ClientDto.java | 83 ++ .../model/ContainerDefaultValueDto.java | 208 +++++ .../java/org/openapitools/model/DogDto.java | 104 +++ .../org/openapitools/model/EnumArraysDto.java | 189 ++++ .../org/openapitools/model/EnumClassDto.java | 56 ++ .../org/openapitools/model/EnumTestDto.java | 325 +++++++ .../java/org/openapitools/model/FileDto.java | 83 ++ .../model/FileSchemaTestClassDto.java | 119 +++ .../org/openapitools/model/FormatTestDto.java | 404 +++++++++ .../model/HasOnlyReadOnlyDto.java | 106 +++ .../java/org/openapitools/model/ListDto.java | 83 ++ .../org/openapitools/model/MapTestDto.java | 226 +++++ ...ertiesAndAdditionalPropertiesClassDto.java | 145 ++++ .../model/Model200ResponseDto.java | 106 +++ .../java/org/openapitools/model/NameDto.java | 156 ++++ .../model/NullableMapPropertyDto.java | 108 +++ .../org/openapitools/model/NumberOnlyDto.java | 84 ++ .../java/org/openapitools/model/OrderDto.java | 239 ++++++ .../openapitools/model/OuterCompositeDto.java | 130 +++ .../org/openapitools/model/OuterEnumDto.java | 56 ++ .../model/ParentWithNullableDto.java | 165 ++++ .../java/org/openapitools/model/PetDto.java | 274 ++++++ .../openapitools/model/ReadOnlyFirstDto.java | 106 +++ ...ponseObjectWithDifferentFieldNamesDto.java | 152 ++++ .../org/openapitools/model/ReturnDto.java | 83 ++ .../model/SpecialModelNameDto.java | 83 ++ .../java/org/openapitools/model/TagDto.java | 106 +++ .../model/TypeHolderDefaultDto.java | 192 +++++ .../model/TypeHolderExampleDto.java | 215 +++++ .../java/org/openapitools/model/UserDto.java | 244 ++++++ .../org/openapitools/model/XmlItemDto.java | 812 ++++++++++++++++++ 124 files changed, 18647 insertions(+) create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator-ignore create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java create mode 100644 samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java create mode 100644 samples/client/petstore/spring-http-interface-validation/.openapi-generator-ignore create mode 100644 samples/client/petstore/spring-http-interface-validation/.openapi-generator/FILES create mode 100644 samples/client/petstore/spring-http-interface-validation/.openapi-generator/VERSION create mode 100644 samples/client/petstore/spring-http-interface-validation/README.md create mode 100644 samples/client/petstore/spring-http-interface-validation/pom.xml create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AnimalDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ApiResponseDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayTestDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/BigCatDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CapitalizationDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CatDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CategoryDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClassModelDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClientDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/DogDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumArraysDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumClassDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumTestDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FormatTestDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ListDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MapTestDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NameDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OrderDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterEnumDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/PetDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReturnDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TagDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/UserDto.java create mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/XmlItemDto.java diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator-ignore b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES new file mode 100644 index 000000000000..52a5fc801199 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES @@ -0,0 +1,60 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +src/main/java/org/openapitools/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/model/Animal.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayTest.java +src/main/java/org/openapitools/model/BigCat.java +src/main/java/org/openapitools/model/Capitalization.java +src/main/java/org/openapitools/model/Cat.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.java +src/main/java/org/openapitools/model/ClassModel.java +src/main/java/org/openapitools/model/Client.java +src/main/java/org/openapitools/model/ContainerDefaultValue.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/EnumArrays.java +src/main/java/org/openapitools/model/EnumClass.java +src/main/java/org/openapitools/model/EnumTest.java +src/main/java/org/openapitools/model/File.java +src/main/java/org/openapitools/model/FileSchemaTestClass.java +src/main/java/org/openapitools/model/FormatTest.java +src/main/java/org/openapitools/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/model/MapTest.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/model/Model200Response.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/ModelList.java +src/main/java/org/openapitools/model/ModelReturn.java +src/main/java/org/openapitools/model/Name.java +src/main/java/org/openapitools/model/NullableMapProperty.java +src/main/java/org/openapitools/model/NumberOnly.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/OuterComposite.java +src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/ReadOnlyFirst.java +src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +src/main/java/org/openapitools/model/SpecialModelName.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/TypeHolderDefault.java +src/main/java/org/openapitools/model/TypeHolderExample.java +src/main/java/org/openapitools/model/User.java +src/main/java/org/openapitools/model/XmlItem.java diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION new file mode 100644 index 000000000000..193a12d6e891 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.20.0-SNAPSHOT diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md b/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md new file mode 100644 index 000000000000..d947e03a2484 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated API stub + +[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface) + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring application for HTTP integration with other REST services +To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor +```java +@Configuration +public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { + + public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance + super(myWebClient); + } +} +``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml new file mode 100644 index 000000000000..b17a26ec47fe --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml @@ -0,0 +1,76 @@ + + 4.0.0 + org.openapitools + spring-http-interface-reactive + jar + spring-http-interface-reactive + 1.0.0-SNAPSHOT + + 17 + UTF-8 + + + org.springframework.boot + spring-boot-starter-parent + 3.1.3 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + org.springframework.boot + spring-boot-starter-webflux + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + jakarta.validation + jakarta.validation-api + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.8 + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java new file mode 100644 index 000000000000..2787c9d1160d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,44 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import org.springframework.http.codec.multipart.Part; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface AnotherFakeApi { + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param client client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/another-fake/dummy", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> call123testSpecialTags( + @RequestBody Mono client + ); + +} diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java new file mode 100644 index 000000000000..0fefc031ea6d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,382 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; +import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import org.springframework.lang.Nullable; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import org.springframework.http.codec.multipart.Part; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface FakeApi { + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/create_xml_item", + accept = { "application/json" }, + contentType = "application/xml" + ) + Mono> createXmlItem( + @RequestBody Mono xmlItem + ); + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/boolean", + accept = { "*/*" }, + contentType = "application/json" + ) + Mono> fakeOuterBooleanSerialize( + @RequestBody(required = false) Mono body + ); + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param outerComposite Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/composite", + accept = { "*/*" }, + contentType = "application/json" + ) + Mono> fakeOuterCompositeSerialize( + @RequestBody(required = false) Mono outerComposite + ); + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/number", + accept = { "*/*" }, + contentType = "application/json" + ) + Mono> fakeOuterNumberSerialize( + @RequestBody(required = false) Mono body + ); + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/string", + accept = { "*/*" }, + contentType = "application/json" + ) + Mono> fakeOuterStringSerialize( + @RequestBody(required = false) Mono body + ); + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param fileSchemaTestClass (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/body-with-file-schema", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> testBodyWithFileSchema( + @RequestBody Mono fileSchemaTestClass + ); + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param user (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/body-with-query-params", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> testBodyWithQueryParams( + @RequestParam(value = "query", required = true) String query, + @RequestBody Mono user + ); + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param client client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/fake", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> testClientModel( + @RequestBody Mono client + ); + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "POST", + value = "/fake", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + Mono> testEndpointParameters( + @RequestPart(value = "number", required = true) BigDecimal number, + @RequestPart(value = "double", required = true) Double _double, + @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @RequestPart(value = "byte", required = true) byte[] _byte, + @RequestPart(value = "integer", required = false) Integer integer, + @RequestPart(value = "int32", required = false) Integer int32, + @RequestPart(value = "int64", required = false) Long int64, + @RequestPart(value = "float", required = false) Float _float, + @RequestPart(value = "string", required = false) String string, + @RequestPart(value = "binary", required = false) Part binary, + @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @RequestPart(value = "password", required = false) String password, + @RequestPart(value = "callback", required = false) String paramCallback + ); + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/fake", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + Mono> testEnumParameters( + @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray, + @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, + @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, + @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, + @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, + @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @RequestPart(value = "enum_form_string", required = false) String enumFormString + ); + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Something wrong (status code 400) + */ + @HttpExchange( + method = "DELETE", + value = "/fake", + accept = { "application/json" } + ) + Mono> testGroupParameters( + @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, + @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup, + @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group + ); + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * + * @param requestBody request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/inline-additionalProperties", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> testInlineAdditionalProperties( + @RequestBody Mono> requestBody + ); + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/jsonFormData", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + Mono> testJsonFormData( + @RequestPart(value = "param", required = true) String param, + @RequestPart(value = "param2", required = true) String param2 + ); + + + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/nullable", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> testNullable( + @RequestBody Mono childWithNullable + ); + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/test-query-parameters", + accept = { "application/json" } + ) + Mono> testQueryParameterCollectionFormat( + @RequestParam(value = "pipe", required = true) List pipe, + @RequestParam(value = "http", required = true) List http, + @RequestParam(value = "url", required = true) List url, + @RequestParam(value = "context", required = true) List context + ); + + + /** + * GET /fake/response-with-example + * This endpoint defines an example value for its response schema. + * + * @return Success (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/response-with-example", + accept = { "application/json" } + ) + Mono> testWithResultExample( + + ); + +} diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java new file mode 100644 index 000000000000..397cbee69eac --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -0,0 +1,44 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import org.springframework.http.codec.multipart.Part; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface FakeClassnameTags123Api { + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param client client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/fake_classname_test", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> testClassname( + @RequestBody Mono client + ); + +} diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..fd584ea831df --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,229 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.springframework.lang.Nullable; +import org.openapitools.model.Pet; +import org.openapitools.model.ResponseObjectWithDifferentFieldNames; +import java.util.Set; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import org.springframework.http.codec.multipart.Part; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @HttpExchange( + method = "POST", + value = "/pet", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> addPet( + @RequestBody Mono pet + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @HttpExchange( + method = "DELETE", + value = "/pet/{petId}", + accept = { "application/json" } + ) + Mono> deletePet( + @PathVariable("petId") Long petId, + @RequestHeader(value = "api_key", required = false) @Nullable String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @HttpExchange( + method = "GET", + value = "/pet/findByStatus", + accept = { "application/json", "application/xml" } + ) + Mono>> findPetsByStatus( + @RequestParam(value = "status", required = true) List status + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Deprecated + @HttpExchange( + method = "GET", + value = "/pet/findByTags", + accept = { "application/json", "application/xml" } + ) + Mono>> findPetsByTags( + @RequestParam(value = "tags", required = true) Set tags + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/pet/{petId}", + accept = { "application/json", "application/xml" } + ) + Mono> getPetById( + @PathVariable("petId") Long petId + ); + + + /** + * GET /fake/{petId}/response-object-different-names + * + * @param petId ID of pet to update (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/{petId}/response-object-different-names", + accept = { "application/json" } + ) + Mono> responseObjectDifferentNames( + @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @HttpExchange( + method = "PUT", + value = "/pet", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> updatePet( + @RequestBody Mono pet + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @HttpExchange( + method = "POST", + value = "/pet/{petId}", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + Mono> updatePetWithForm( + @PathVariable("petId") Long petId, + @RequestPart(value = "name", required = false) String name, + @RequestPart(value = "status", required = false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/pet/{petId}/uploadImage", + accept = { "application/json" }, + contentType = "multipart/form-data" + ) + Mono> uploadFile( + @PathVariable("petId") Long petId, + @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @RequestPart(value = "file", required = false) Part file + ); + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/{petId}/uploadImageWithRequiredFile", + accept = { "application/json" }, + contentType = "multipart/form-data" + ) + Mono> uploadFileWithRequiredFile( + @PathVariable("petId") Long petId, + @RequestPart(value = "requiredFile", required = true) Part requiredFile, + @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + ); + +} diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..a4c1f16a1ad0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,99 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import org.springframework.http.codec.multipart.Part; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface StoreApi { + + /** + * DELETE /store/order/{order_id} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @HttpExchange( + method = "DELETE", + value = "/store/order/{order_id}", + accept = { "application/json" } + ) + Mono> deleteOrder( + @PathVariable("order_id") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/store/inventory", + accept = { "application/json" } + ) + Mono>> getInventory( + + ); + + + /** + * GET /store/order/{order_id} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/store/order/{order_id}", + accept = { "application/json", "application/xml" } + ) + Mono> getOrderById( + @PathVariable("order_id") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * + * @param order order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @HttpExchange( + method = "POST", + value = "/store/order", + accept = { "application/json", "application/xml" }, + contentType = "application/json" + ) + Mono> placeOrder( + @RequestBody Mono order + ); + +} diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..ab66c7ba9420 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,175 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import org.springframework.http.codec.multipart.Part; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param user Created user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> createUser( + @RequestBody Mono user + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user/createWithArray", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> createUsersWithArrayInput( + @RequestBody Flux user + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user/createWithList", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> createUsersWithListInput( + @RequestBody Flux user + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "DELETE", + value = "/user/{username}", + accept = { "application/json" } + ) + Mono> deleteUser( + @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/user/{username}", + accept = { "application/json", "application/xml" } + ) + Mono> getUserByName( + @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @HttpExchange( + method = "GET", + value = "/user/login", + accept = { "application/json", "application/xml" } + ) + Mono> loginUser( + @RequestParam(value = "username", required = true) String username, + @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/user/logout", + accept = { "application/json" } + ) + Mono> logoutUser( + + ); + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "PUT", + value = "/user/{username}", + accept = { "application/json" }, + contentType = "application/json" + ) + Mono> updateUser( + @PathVariable("username") String username, + @RequestBody Mono user + ); + +} diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java new file mode 100644 index 000000000000..f9e6dca33a9a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -0,0 +1,65 @@ +/* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.configuration; + +import org.openapitools.api.AnotherFakeApi; +import org.openapitools.api.FakeApi; +import org.openapitools.api.FakeClassnameTags123Api; +import org.openapitools.api.PetApi; +import org.openapitools.api.StoreApi; +import org.openapitools.api.UserApi; + +import org.springframework.context.annotation.Bean; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.support.WebClientAdapter; +import org.springframework.web.service.invoker.HttpServiceProxyFactory; + +public abstract class HttpInterfacesAbstractConfigurator { + + private final WebClient webClient; + + public HttpInterfacesAbstractConfigurator(final WebClient webClient) { + this.webClient = webClient; + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") + AnotherFakeApi anotherFakeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(AnotherFakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") + FakeApi fakeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(FakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") + FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(FakeClassnameTags123Api.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") + PetApi petHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(PetApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") + StoreApi storeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(StoreApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") + UserApi userHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(UserApi.class); + } + + +} diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..f36cf911e990 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesAnyType + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesAnyType { + + private @Nullable String name; + + public AdditionalPropertiesAnyType name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + Objects.equals(this.additionalProperties, additionalPropertiesAnyType.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..f83546eedb5b --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -0,0 +1,126 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesArray + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesArray { + + private @Nullable String name; + + public AdditionalPropertiesArray name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public List getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + Objects.equals(this.additionalProperties, additionalPropertiesArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..64226ebea3b0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesBoolean + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesBoolean { + + private @Nullable String name; + + public AdditionalPropertiesBoolean name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Boolean getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + Objects.equals(this.additionalProperties, additionalPropertiesBoolean.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..3ba9be3bbb83 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,401 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * AdditionalPropertiesClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesClass { + + + private Map mapString = new HashMap<>(); + + + private Map mapNumber = new HashMap<>(); + + + private Map mapInteger = new HashMap<>(); + + + private Map mapBoolean = new HashMap<>(); + + + private Map> mapArrayInteger = new HashMap<>(); + + + private Map> mapArrayAnytype = new HashMap<>(); + + + private Map> mapMapString = new HashMap<>(); + + + private Map> mapMapAnytype = new HashMap<>(); + + private @Nullable Object anytype1; + + private JsonNullable anytype2 = JsonNullable.undefined(); + + private @Nullable Object anytype3; + + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + + @JsonProperty("map_string") + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + + @JsonProperty("map_number") + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + + @JsonProperty("map_integer") + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + + @JsonProperty("map_boolean") + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + + @JsonProperty("map_array_integer") + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + + @JsonProperty("map_array_anytype") + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + + @JsonProperty("map_map_string") + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + + @JsonProperty("map_map_anytype") + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClass anytype1(@Nullable Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + + @JsonProperty("anytype_1") + public @Nullable Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(@Nullable Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = JsonNullable.of(anytype2); + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + + @JsonProperty("anytype_2") + public JsonNullable getAnytype2() { + return anytype2; + } + + public void setAnytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClass anytype3(@Nullable Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + + @JsonProperty("anytype_3") + public @Nullable Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(@Nullable Object anytype3) { + this.anytype3 = anytype3; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + equalsNullable(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, hashCodeNullable(anytype2), anytype3); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..37b9ecc68ca1 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesInteger + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesInteger { + + private @Nullable String name; + + public AdditionalPropertiesInteger name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Integer getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + Objects.equals(this.additionalProperties, additionalPropertiesInteger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..7b4ca5f7b309 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -0,0 +1,126 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesNumber + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesNumber { + + private @Nullable String name; + + public AdditionalPropertiesNumber name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public BigDecimal getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + Objects.equals(this.additionalProperties, additionalPropertiesNumber.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..e86c307fa02c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -0,0 +1,126 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Map; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesObject + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesObject { + + private @Nullable String name; + + public AdditionalPropertiesObject name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Map getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + Objects.equals(this.additionalProperties, additionalPropertiesObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..7c4cb11d6d1e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesString + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesString { + + private @Nullable String name; + + public AdditionalPropertiesString name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesString putAdditionalProperty(String key, String value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public String getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + Objects.equals(this.additionalProperties, additionalPropertiesString.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java new file mode 100644 index 000000000000..ed4c6fc0187a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java @@ -0,0 +1,129 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Animal + */ + +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Animal { + + private String className; + + private String color = "red"; + + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @NotNull + @JsonProperty("className") + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + + @JsonProperty("color") + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..5ee52f148448 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,94 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfArrayOfNumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayOfArrayOfNumberOnly { + + + private List> arrayArrayNumber = new ArrayList<>(); + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + + @JsonProperty("ArrayArrayNumber") + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..ae1056217d7b --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,94 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfNumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayOfNumberOnly { + + + private List arrayNumber = new ArrayList<>(); + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + + @JsonProperty("ArrayNumber") + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 000000000000..4f7744ff2853 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,158 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayTest + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayTest { + + + private List arrayOfString = new ArrayList<>(); + + + private List> arrayArrayOfInteger = new ArrayList<>(); + + + private List> arrayArrayOfModel = new ArrayList<>(); + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + + @JsonProperty("array_of_string") + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + + @JsonProperty("array_array_of_integer") + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + + @JsonProperty("array_array_of_model") + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java new file mode 100644 index 000000000000..06ecfea1e482 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,154 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.Cat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * BigCat + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class BigCat extends Cat { + + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private final String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable KindEnum kind; + + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + + public BigCat kind(@Nullable KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + + @JsonProperty("kind") + public @Nullable KindEnum getKind() { + return kind; + } + + public void setKind(@Nullable KindEnum kind) { + this.kind = kind; + } + + + public BigCat declawed(Boolean declawed) { + super.declawed(declawed); + return this; + } + + public BigCat className(String className) { + super.className(className); + return this; + } + + public BigCat color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java new file mode 100644 index 000000000000..ef722261eee6 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,196 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Capitalization + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Capitalization { + + private @Nullable String smallCamel; + + private @Nullable String capitalCamel; + + private @Nullable String smallSnake; + + private @Nullable String capitalSnake; + + private @Nullable String scAETHFlowPoints; + + private @Nullable String ATT_NAME; + + public Capitalization smallCamel(@Nullable String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + + @JsonProperty("smallCamel") + public @Nullable String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(@Nullable String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(@Nullable String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + + @JsonProperty("CapitalCamel") + public @Nullable String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(@Nullable String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(@Nullable String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + + @JsonProperty("small_Snake") + public @Nullable String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(@Nullable String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(@Nullable String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + + @JsonProperty("Capital_Snake") + public @Nullable String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(@Nullable String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(@Nullable String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + + @JsonProperty("SCA_ETH_Flow_Points") + public @Nullable String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(@Nullable String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(@Nullable String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + + @JsonProperty("ATT_NAME") + public @Nullable String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(@Nullable String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java new file mode 100644 index 000000000000..edb831012bce --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,117 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Animal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Cat + */ + +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Cat extends Animal { + + private @Nullable Boolean declawed; + + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + + public Cat declawed(@Nullable Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + + @JsonProperty("declawed") + public @Nullable Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(@Nullable Boolean declawed) { + this.declawed = declawed; + } + + + public Cat className(String className) { + super.className(className); + return this; + } + + public Cat color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..53fb7489b7f3 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Category + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Category { + + private @Nullable Long id; + + private String name = "default-name"; + + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + + public Category id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..5acfc0c669de --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,112 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ChildWithNullable extends ParentWithNullable { + + private @Nullable String otherProperty; + + public ChildWithNullable otherProperty(@Nullable String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @JsonProperty("otherProperty") + public @Nullable String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(@Nullable String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java new file mode 100644 index 000000000000..552806996d29 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,81 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model with \"_class\" property + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ClassModel { + + private @Nullable String propertyClass; + + public ClassModel propertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + + @JsonProperty("_class") + public @Nullable String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java new file mode 100644 index 000000000000..d16d1fc2c791 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,81 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Client + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Client { + + private @Nullable String client; + + public Client client(@Nullable String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + + @JsonProperty("client") + public @Nullable String getClient() { + return client; + } + + public void setClient(@Nullable String client) { + this.client = client; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java new file mode 100644 index 000000000000..f14b9fd203ae --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -0,0 +1,214 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ContainerDefaultValue + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ContainerDefaultValue { + + + private JsonNullable> nullableArray = JsonNullable.>undefined(); + + + private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + + + private List requiredArray = new ArrayList<>(); + + + private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + + public ContainerDefaultValue() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + this.requiredArray = requiredArray; + } + + public ContainerDefaultValue nullableArray(List nullableArray) { + this.nullableArray = JsonNullable.of(nullableArray); + return this; + } + + public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { + if (this.nullableArray == null || !this.nullableArray.isPresent()) { + this.nullableArray = JsonNullable.of(new ArrayList<>()); + } + this.nullableArray.get().add(nullableArrayItem); + return this; + } + + /** + * Get nullableArray + * @return nullableArray + */ + + @JsonProperty("nullable_array") + public JsonNullable> getNullableArray() { + return nullableArray; + } + + public void setNullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; + } + + public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { + this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + return this; + } + + public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); + } + this.nullableRequiredArray.get().add(nullableRequiredArrayItem); + return this; + } + + /** + * Get nullableRequiredArray + * @return nullableRequiredArray + */ + @NotNull + @JsonProperty("nullable_required_array") + public JsonNullable> getNullableRequiredArray() { + return nullableRequiredArray; + } + + public void setNullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; + } + + public ContainerDefaultValue requiredArray(List requiredArray) { + this.requiredArray = requiredArray; + return this; + } + + public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { + if (this.requiredArray == null) { + this.requiredArray = new ArrayList<>(); + } + this.requiredArray.add(requiredArrayItem); + return this; + } + + /** + * Get requiredArray + * @return requiredArray + */ + @NotNull + @JsonProperty("required_array") + public List getRequiredArray() { + return requiredArray; + } + + public void setRequiredArray(List requiredArray) { + this.requiredArray = requiredArray; + } + + public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { + this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + return this; + } + + public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); + } + this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); + return this; + } + + /** + * Get nullableArrayWithDefault + * @return nullableArrayWithDefault + */ + + @JsonProperty("nullable_array_with_default") + public JsonNullable> getNullableArrayWithDefault() { + return nullableArrayWithDefault; + } + + public void setNullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContainerDefaultValue containerDefaultValue = (ContainerDefaultValue) o; + return equalsNullable(this.nullableArray, containerDefaultValue.nullableArray) && + Objects.equals(this.nullableRequiredArray, containerDefaultValue.nullableRequiredArray) && + Objects.equals(this.requiredArray, containerDefaultValue.requiredArray) && + equalsNullable(this.nullableArrayWithDefault, containerDefaultValue.nullableArrayWithDefault); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableArray), nullableRequiredArray, requiredArray, hashCodeNullable(nullableArrayWithDefault)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContainerDefaultValue {\n"); + sb.append(" nullableArray: ").append(toIndentedString(nullableArray)).append("\n"); + sb.append(" nullableRequiredArray: ").append(toIndentedString(nullableRequiredArray)).append("\n"); + sb.append(" requiredArray: ").append(toIndentedString(requiredArray)).append("\n"); + sb.append(" nullableArrayWithDefault: ").append(toIndentedString(nullableArrayWithDefault)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..1a85e6059b37 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,109 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.openapitools.model.Animal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Dog + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Dog extends Animal { + + private @Nullable String breed; + + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + + public Dog breed(@Nullable String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + + @JsonProperty("breed") + public @Nullable String getBreed() { + return breed; + } + + public void setBreed(@Nullable String breed) { + this.breed = breed; + } + + + public Dog className(String className) { + super.className(className); + return this; + } + + public Dog color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 000000000000..7abeac1773bc --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,187 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumArrays + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class EnumArrays { + + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private final String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private final String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + + private List arrayEnum = new ArrayList<>(); + + public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + + @JsonProperty("just_symbol") + public @Nullable JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(@Nullable JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + + @JsonProperty("array_enum") + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java new file mode 100644 index 000000000000..a433c51e2ec9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,56 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private final String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java new file mode 100644 index 000000000000..619533ef590c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,332 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnum; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumTest + */ + +@JsonTypeName("Enum_Test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class EnumTest { + + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private final String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private final String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private final Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private final Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumNumberEnum enumNumber; + + private @Nullable OuterEnum outerEnum; + + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumString(@Nullable EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + + @JsonProperty("enum_string") + public @Nullable EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(@Nullable EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @NotNull + @JsonProperty("enum_string_required") + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(@Nullable EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + + @JsonProperty("enum_integer") + public @Nullable EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(@Nullable EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(@Nullable EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + + @JsonProperty("enum_number") + public @Nullable EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(@Nullable OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + + @JsonProperty("outerEnum") + public @Nullable OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(@Nullable OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java new file mode 100644 index 000000000000..f7bcd095745f --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java @@ -0,0 +1,81 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Must be named `File` for test. + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class File { + + private @Nullable String sourceURI; + + public File sourceURI(@Nullable String sourceURI) { + this.sourceURI = sourceURI; + return this; + } + + /** + * Test capitalization + * @return sourceURI + */ + + @JsonProperty("sourceURI") + public @Nullable String getSourceURI() { + return sourceURI; + } + + public void setSourceURI(@Nullable String sourceURI) { + this.sourceURI = sourceURI; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + File file = (File) o; + return Objects.equals(this.sourceURI, file.sourceURI); + } + + @Override + public int hashCode() { + return Objects.hash(sourceURI); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class File {\n"); + sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..760bb00ffa09 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,117 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FileSchemaTestClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class FileSchemaTestClass { + + private @Nullable File file; + + + private List<@Valid File> files = new ArrayList<>(); + + public FileSchemaTestClass file(@Nullable File file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + + @JsonProperty("file") + public @Nullable File getFile() { + return file; + } + + public void setFile(@Nullable File file) { + this.file = file; + } + + public FileSchemaTestClass files(List<@Valid File> files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + + @JsonProperty("files") + public List<@Valid File> getFiles() { + return files; + } + + public void setFiles(List<@Valid File> files) { + this.files = files; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java new file mode 100644 index 000000000000..491933f48763 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,414 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FormatTest + */ + +@JsonTypeName("format_test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class FormatTest { + + private @Nullable Integer integer; + + private @Nullable Integer int32; + + private @Nullable Long int64; + + private BigDecimal number; + + private @Nullable Float _float; + + private @Nullable Double _double; + + private @Nullable String string; + + private byte[] _byte; + + private @Nullable org.springframework.core.io.Resource binary; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime dateTime; + + private @Nullable UUID uuid; + + private String password; + + private @Nullable BigDecimal bigDecimal; + + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + + public FormatTest integer(@Nullable Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + + @JsonProperty("integer") + public @Nullable Integer getInteger() { + return integer; + } + + public void setInteger(@Nullable Integer integer) { + this.integer = integer; + } + + public FormatTest int32(@Nullable Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + + @JsonProperty("int32") + public @Nullable Integer getInt32() { + return int32; + } + + public void setInt32(@Nullable Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(@Nullable Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + + @JsonProperty("int64") + public @Nullable Long getInt64() { + return int64; + } + + public void setInt64(@Nullable Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @NotNull + @JsonProperty("number") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(@Nullable Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + + @JsonProperty("float") + public @Nullable Float getFloat() { + return _float; + } + + public void setFloat(@Nullable Float _float) { + this._float = _float; + } + + public FormatTest _double(@Nullable Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + + @JsonProperty("double") + public @Nullable Double getDouble() { + return _double; + } + + public void setDouble(@Nullable Double _double) { + this._double = _double; + } + + public FormatTest string(@Nullable String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + + @JsonProperty("string") + public @Nullable String getString() { + return string; + } + + public void setString(@Nullable String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @NotNull + @JsonProperty("byte") + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(@Nullable org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + + @JsonProperty("binary") + public @Nullable org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(@Nullable org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @NotNull + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(@Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + public void setUuid(@Nullable UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @NotNull + @JsonProperty("password") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(@Nullable BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + + @JsonProperty("BigDecimal") + public @Nullable BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(@Nullable BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append("*").append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..9482574e9688 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * HasOnlyReadOnly + */ + +@JsonTypeName("hasOnlyReadOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class HasOnlyReadOnly { + + private @Nullable String bar; + + private @Nullable String foo; + + public HasOnlyReadOnly bar(@Nullable String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + + @JsonProperty("bar") + public @Nullable String getBar() { + return bar; + } + + public void setBar(@Nullable String bar) { + this.bar = bar; + } + + public HasOnlyReadOnly foo(@Nullable String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + + @JsonProperty("foo") + public @Nullable String getFoo() { + return foo; + } + + public void setFoo(@Nullable String foo) { + this.foo = foo; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java new file mode 100644 index 000000000000..d67614fbc5e8 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,224 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MapTest + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class MapTest { + + + private Map> mapMapOfString = new HashMap<>(); + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private final String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + + private Map mapOfEnumString = new HashMap<>(); + + + private Map directMap = new HashMap<>(); + + + private Map indirectMap = new HashMap<>(); + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + + @JsonProperty("map_map_of_string") + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + + @JsonProperty("map_of_enum_string") + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + + @JsonProperty("direct_map") + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + + @JsonProperty("indirect_map") + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..d4bfb4ffc75f --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,143 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class MixedPropertiesAndAdditionalPropertiesClass { + + private @Nullable UUID uuid; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime dateTime; + + + private Map map = new HashMap<>(); + + public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + public void setUuid(@Nullable UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + + @JsonProperty("map") + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java new file mode 100644 index 000000000000..a834ef58b62b --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model name starting with number + */ + +@JsonTypeName("200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Model200Response { + + private @Nullable Integer name; + + private @Nullable String propertyClass; + + public Model200Response name(@Nullable Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable Integer getName() { + return name; + } + + public void setName(@Nullable Integer name) { + this.name = name; + } + + public Model200Response propertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + + @JsonProperty("class") + public @Nullable String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..4bd243655b17 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,129 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ModelApiResponse + */ + +@JsonTypeName("ApiResponse") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ModelApiResponse { + + private @Nullable Integer code; + + private @Nullable String type; + + private @Nullable String message; + + public ModelApiResponse code(@Nullable Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @JsonProperty("code") + public @Nullable Integer getCode() { + return code; + } + + public void setCode(@Nullable Integer code) { + this.code = code; + } + + public ModelApiResponse type(@Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public @Nullable String getType() { + return type; + } + + public void setType(@Nullable String type) { + this.type = type; + } + + public ModelApiResponse message(@Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @JsonProperty("message") + public @Nullable String getMessage() { + return message; + } + + public void setMessage(@Nullable String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java new file mode 100644 index 000000000000..38a1aab89c36 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ModelList + */ + +@JsonTypeName("List") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ModelList { + + private @Nullable String _123list; + + public ModelList _123list(@Nullable String _123list) { + this._123list = _123list; + return this; + } + + /** + * Get _123list + * @return _123list + */ + + @JsonProperty("123-list") + public @Nullable String get123list() { + return _123list; + } + + public void set123list(@Nullable String _123list) { + this._123list = _123list; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelList _list = (ModelList) o; + return Objects.equals(this._123list, _list._123list); + } + + @Override + public int hashCode() { + return Objects.hash(_123list); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelList {\n"); + sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java new file mode 100644 index 000000000000..dd32e7bbe7b9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing reserved words + */ + +@JsonTypeName("Return") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ModelReturn { + + private @Nullable Integer _return; + + public ModelReturn _return(@Nullable Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + + @JsonProperty("return") + public @Nullable Integer getReturn() { + return _return; + } + + public void setReturn(@Nullable Integer _return) { + this._return = _return; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java new file mode 100644 index 000000000000..adbc57077902 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,161 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model name same as property name + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Name { + + private Integer name; + + private @Nullable Integer snakeCase; + + private @Nullable String property; + + private @Nullable Integer _123number; + + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Name snakeCase(@Nullable Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + + @JsonProperty("snake_case") + public @Nullable Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(@Nullable Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public Name property(@Nullable String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + + @JsonProperty("property") + public @Nullable String getProperty() { + return property; + } + + public void setProperty(@Nullable String property) { + this.property = property; + } + + public Name _123number(@Nullable Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + + @JsonProperty("123Number") + public @Nullable Integer get123number() { + return _123number; + } + + public void set123number(@Nullable Integer _123number) { + this._123number = _123number; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java new file mode 100644 index 000000000000..0e9d13ac1ed1 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NullableMapProperty + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class NullableMapProperty { + + + private JsonNullable> languageValues = JsonNullable.>undefined(); + + public NullableMapProperty languageValues(Map languageValues) { + this.languageValues = JsonNullable.of(languageValues); + return this; + } + + public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { + if (this.languageValues == null || !this.languageValues.isPresent()) { + this.languageValues = JsonNullable.of(new HashMap<>()); + } + this.languageValues.get().put(key, languageValuesItem); + return this; + } + + /** + * Get languageValues + * @return languageValues + */ + + @JsonProperty("languageValues") + public JsonNullable> getLanguageValues() { + return languageValues; + } + + public void setLanguageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableMapProperty nullableMapProperty = (NullableMapProperty) o; + return equalsNullable(this.languageValues, nullableMapProperty.languageValues); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(languageValues)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableMapProperty {\n"); + sb.append(" languageValues: ").append(toIndentedString(languageValues)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java new file mode 100644 index 000000000000..255e950f4e52 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java @@ -0,0 +1,82 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class NumberOnly { + + private @Nullable BigDecimal justNumber; + + public NumberOnly justNumber(@Nullable BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + + @JsonProperty("JustNumber") + public @Nullable BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(@Nullable BigDecimal justNumber) { + this.justNumber = justNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..c43687dc4193 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,237 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Order + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Order { + + private @Nullable Long id; + + private @Nullable Long petId; + + private @Nullable Integer quantity; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable StatusEnum status; + + private Boolean complete = false; + + public Order id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public Order petId(@Nullable Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + + @JsonProperty("petId") + public @Nullable Long getPetId() { + return petId; + } + + public void setPetId(@Nullable Long petId) { + this.petId = petId; + } + + public Order quantity(@Nullable Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + + @JsonProperty("quantity") + public @Nullable Integer getQuantity() { + return quantity; + } + + public void setQuantity(@Nullable Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(@Nullable OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + + @JsonProperty("shipDate") + public @Nullable OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(@Nullable OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + + @JsonProperty("status") + public @Nullable StatusEnum getStatus() { + return status; + } + + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + + @JsonProperty("complete") + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 000000000000..621f6beadf16 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OuterComposite + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class OuterComposite { + + private @Nullable BigDecimal myNumber; + + private @Nullable String myString; + + private @Nullable Boolean myBoolean; + + public OuterComposite myNumber(@Nullable BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + + @JsonProperty("my_number") + public @Nullable BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(@Nullable BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(@Nullable String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + + @JsonProperty("my_string") + public @Nullable String getMyString() { + return myString; + } + + public void setMyString(@Nullable String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(@Nullable Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + + @JsonProperty("my_boolean") + public @Nullable Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(@Nullable Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 000000000000..d917ddaa49a3 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,56 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private final String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..270596b5eaac --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,164 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILD_WITH_NULLABLE("ChildWithNullable"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(@Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public @Nullable TypeEnum getType() { + return type; + } + + public void setType(@Nullable TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..e58c60a29885 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,280 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Pet + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Pet { + + private @Nullable Long id; + + private @Nullable Category category; + + private String name; + + + private Set photoUrls = new LinkedHashSet<>(); + + + private List<@Valid Tag> tags = new ArrayList<>(); + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @Deprecated + private @Nullable StatusEnum status; + + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + + public Pet id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public Pet category(@Nullable Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + + @JsonProperty("category") + public @Nullable Category getCategory() { + return category; + } + + public void setCategory(@Nullable Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @NotNull + @JsonProperty("photoUrls") + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List<@Valid Tag> tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + + @JsonProperty("tags") + public List<@Valid Tag> getTags() { + return tags; + } + + public void setTags(List<@Valid Tag> tags) { + this.tags = tags; + } + + public Pet status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + */ + + @JsonProperty("status") + @Deprecated + public @Nullable StatusEnum getStatus() { + return status; + } + + /** + * @deprecated + */ + @Deprecated + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..eab5e405ee44 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,104 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ReadOnlyFirst + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ReadOnlyFirst { + + private @Nullable String bar; + + private @Nullable String baz; + + public ReadOnlyFirst bar(@Nullable String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + + @JsonProperty("bar") + public @Nullable String getBar() { + return bar; + } + + public void setBar(@Nullable String bar) { + this.bar = bar; + } + + public ReadOnlyFirst baz(@Nullable String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + + @JsonProperty("baz") + public @Nullable String getBaz() { + return baz; + } + + public void setBaz(@Nullable String baz) { + this.baz = baz; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java new file mode 100644 index 000000000000..f0019e991124 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -0,0 +1,150 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ResponseObjectWithDifferentFieldNames + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ResponseObjectWithDifferentFieldNames { + + private @Nullable String normalPropertyName; + + private @Nullable String UPPER_CASE_PROPERTY_SNAKE; + + private @Nullable String lowerCasePropertyDashes; + + private @Nullable String propertyNameWithSpaces; + + public ResponseObjectWithDifferentFieldNames normalPropertyName(@Nullable String normalPropertyName) { + this.normalPropertyName = normalPropertyName; + return this; + } + + /** + * Get normalPropertyName + * @return normalPropertyName + */ + + @JsonProperty("normalPropertyName") + public @Nullable String getNormalPropertyName() { + return normalPropertyName; + } + + public void setNormalPropertyName(@Nullable String normalPropertyName) { + this.normalPropertyName = normalPropertyName; + } + + public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + return this; + } + + /** + * Get UPPER_CASE_PROPERTY_SNAKE + * @return UPPER_CASE_PROPERTY_SNAKE + */ + + @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") + public @Nullable String getUPPERCASEPROPERTYSNAKE() { + return UPPER_CASE_PROPERTY_SNAKE; + } + + public void setUPPERCASEPROPERTYSNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + } + + public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + return this; + } + + /** + * Get lowerCasePropertyDashes + * @return lowerCasePropertyDashes + */ + + @JsonProperty("lower-case-property-dashes") + public @Nullable String getLowerCasePropertyDashes() { + return lowerCasePropertyDashes; + } + + public void setLowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + } + + public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; + return this; + } + + /** + * Get propertyNameWithSpaces + * @return propertyNameWithSpaces + */ + + @JsonProperty("property name with spaces") + public @Nullable String getPropertyNameWithSpaces() { + return propertyNameWithSpaces; + } + + public void setPropertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseObjectWithDifferentFieldNames responseObjectWithDifferentFieldNames = (ResponseObjectWithDifferentFieldNames) o; + return Objects.equals(this.normalPropertyName, responseObjectWithDifferentFieldNames.normalPropertyName) && + Objects.equals(this.UPPER_CASE_PROPERTY_SNAKE, responseObjectWithDifferentFieldNames.UPPER_CASE_PROPERTY_SNAKE) && + Objects.equals(this.lowerCasePropertyDashes, responseObjectWithDifferentFieldNames.lowerCasePropertyDashes) && + Objects.equals(this.propertyNameWithSpaces, responseObjectWithDifferentFieldNames.propertyNameWithSpaces); + } + + @Override + public int hashCode() { + return Objects.hash(normalPropertyName, UPPER_CASE_PROPERTY_SNAKE, lowerCasePropertyDashes, propertyNameWithSpaces); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseObjectWithDifferentFieldNames {\n"); + sb.append(" normalPropertyName: ").append(toIndentedString(normalPropertyName)).append("\n"); + sb.append(" UPPER_CASE_PROPERTY_SNAKE: ").append(toIndentedString(UPPER_CASE_PROPERTY_SNAKE)).append("\n"); + sb.append(" lowerCasePropertyDashes: ").append(toIndentedString(lowerCasePropertyDashes)).append("\n"); + sb.append(" propertyNameWithSpaces: ").append(toIndentedString(propertyNameWithSpaces)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 000000000000..a5f5abec28e7 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * SpecialModelName + */ + +@JsonTypeName("_special_model.name_") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class SpecialModelName { + + private @Nullable Long $specialPropertyName; + + public SpecialModelName $specialPropertyName(@Nullable Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + + @JsonProperty("$special[property.name]") + public @Nullable Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(@Nullable Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..c4b2d58c31d5 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,104 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Tag + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Tag { + + private @Nullable Long id; + + private @Nullable String name; + + public Tag id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public Tag name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java new file mode 100644 index 000000000000..ad4e6005aba4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,201 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderDefault + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class TypeHolderDefault { + + private String stringItem = "what"; + + private BigDecimal numberItem = new BigDecimal("1.234"); + + private Integer integerItem = -2; + + private Boolean boolItem = true; + + + private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @NotNull + @JsonProperty("string_item") + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @NotNull + @JsonProperty("integer_item") + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @NotNull + @JsonProperty("bool_item") + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @NotNull + @JsonProperty("array_item") + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java new file mode 100644 index 000000000000..c8359398e143 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,225 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderExample + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class TypeHolderExample { + + private String stringItem; + + private BigDecimal numberItem; + + private Float floatItem; + + private Integer integerItem; + + private Boolean boolItem; + + + private List arrayItem = new ArrayList<>(); + + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @NotNull + @JsonProperty("string_item") + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @NotNull + @JsonProperty("float_item") + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @NotNull + @JsonProperty("integer_item") + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @NotNull + @JsonProperty("bool_item") + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList<>(); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @NotNull + @JsonProperty("array_item") + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..6fcad88f6b92 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,242 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * User + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class User { + + private @Nullable Long id; + + private @Nullable String username; + + private @Nullable String firstName; + + private @Nullable String lastName; + + private @Nullable String email; + + private @Nullable String password; + + private @Nullable String phone; + + private @Nullable Integer userStatus; + + public User id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public User username(@Nullable String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + + @JsonProperty("username") + public @Nullable String getUsername() { + return username; + } + + public void setUsername(@Nullable String username) { + this.username = username; + } + + public User firstName(@Nullable String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + + @JsonProperty("firstName") + public @Nullable String getFirstName() { + return firstName; + } + + public void setFirstName(@Nullable String firstName) { + this.firstName = firstName; + } + + public User lastName(@Nullable String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + + @JsonProperty("lastName") + public @Nullable String getLastName() { + return lastName; + } + + public void setLastName(@Nullable String lastName) { + this.lastName = lastName; + } + + public User email(@Nullable String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + + @JsonProperty("email") + public @Nullable String getEmail() { + return email; + } + + public void setEmail(@Nullable String email) { + this.email = email; + } + + public User password(@Nullable String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + + @JsonProperty("password") + public @Nullable String getPassword() { + return password; + } + + public void setPassword(@Nullable String password) { + this.password = password; + } + + public User phone(@Nullable String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + + @JsonProperty("phone") + public @Nullable String getPhone() { + return phone; + } + + public void setPhone(@Nullable String phone) { + this.phone = phone; + } + + public User userStatus(@Nullable Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + + @JsonProperty("userStatus") + public @Nullable Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(@Nullable Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java new file mode 100644 index 000000000000..73c145612341 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,810 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * XmlItem + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class XmlItem { + + private @Nullable String attributeString; + + private @Nullable BigDecimal attributeNumber; + + private @Nullable Integer attributeInteger; + + private @Nullable Boolean attributeBoolean; + + + private List wrappedArray = new ArrayList<>(); + + private @Nullable String nameString; + + private @Nullable BigDecimal nameNumber; + + private @Nullable Integer nameInteger; + + private @Nullable Boolean nameBoolean; + + + private List nameArray = new ArrayList<>(); + + + private List nameWrappedArray = new ArrayList<>(); + + private @Nullable String prefixString; + + private @Nullable BigDecimal prefixNumber; + + private @Nullable Integer prefixInteger; + + private @Nullable Boolean prefixBoolean; + + + private List prefixArray = new ArrayList<>(); + + + private List prefixWrappedArray = new ArrayList<>(); + + private @Nullable String namespaceString; + + private @Nullable BigDecimal namespaceNumber; + + private @Nullable Integer namespaceInteger; + + private @Nullable Boolean namespaceBoolean; + + + private List namespaceArray = new ArrayList<>(); + + + private List namespaceWrappedArray = new ArrayList<>(); + + private @Nullable String prefixNsString; + + private @Nullable BigDecimal prefixNsNumber; + + private @Nullable Integer prefixNsInteger; + + private @Nullable Boolean prefixNsBoolean; + + + private List prefixNsArray = new ArrayList<>(); + + + private List prefixNsWrappedArray = new ArrayList<>(); + + public XmlItem attributeString(@Nullable String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + + @JsonProperty("attribute_string") + public @Nullable String getAttributeString() { + return attributeString; + } + + public void setAttributeString(@Nullable String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(@Nullable BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + + @JsonProperty("attribute_number") + public @Nullable BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(@Nullable BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(@Nullable Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + + @JsonProperty("attribute_integer") + public @Nullable Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(@Nullable Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(@Nullable Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + + @JsonProperty("attribute_boolean") + public @Nullable Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(@Nullable Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + + @JsonProperty("wrapped_array") + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(@Nullable String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + + @JsonProperty("name_string") + public @Nullable String getNameString() { + return nameString; + } + + public void setNameString(@Nullable String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(@Nullable BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + + @JsonProperty("name_number") + public @Nullable BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(@Nullable BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(@Nullable Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + + @JsonProperty("name_integer") + public @Nullable Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(@Nullable Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(@Nullable Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + + @JsonProperty("name_boolean") + public @Nullable Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(@Nullable Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + + @JsonProperty("name_array") + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + + @JsonProperty("name_wrapped_array") + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(@Nullable String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + + @JsonProperty("prefix_string") + public @Nullable String getPrefixString() { + return prefixString; + } + + public void setPrefixString(@Nullable String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(@Nullable BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + + @JsonProperty("prefix_number") + public @Nullable BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(@Nullable BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(@Nullable Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + + @JsonProperty("prefix_integer") + public @Nullable Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(@Nullable Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(@Nullable Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + + @JsonProperty("prefix_boolean") + public @Nullable Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(@Nullable Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + + @JsonProperty("prefix_array") + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + + @JsonProperty("prefix_wrapped_array") + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(@Nullable String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + + @JsonProperty("namespace_string") + public @Nullable String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(@Nullable String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(@Nullable BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + + @JsonProperty("namespace_number") + public @Nullable BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(@Nullable BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(@Nullable Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + + @JsonProperty("namespace_integer") + public @Nullable Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(@Nullable Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(@Nullable Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + + @JsonProperty("namespace_boolean") + public @Nullable Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(@Nullable Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + + @JsonProperty("namespace_array") + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + + @JsonProperty("namespace_wrapped_array") + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(@Nullable String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + + @JsonProperty("prefix_ns_string") + public @Nullable String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(@Nullable String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + + @JsonProperty("prefix_ns_number") + public @Nullable BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(@Nullable BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(@Nullable Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + + @JsonProperty("prefix_ns_integer") + public @Nullable Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(@Nullable Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(@Nullable Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + + @JsonProperty("prefix_ns_boolean") + public @Nullable Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(@Nullable Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + + @JsonProperty("prefix_ns_array") + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + + @JsonProperty("prefix_ns_wrapped_array") + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/.openapi-generator-ignore b/samples/client/petstore/spring-http-interface-validation/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/spring-http-interface-validation/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-validation/.openapi-generator/FILES new file mode 100644 index 000000000000..c1c311163fa2 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/.openapi-generator/FILES @@ -0,0 +1,60 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +src/main/java/org/openapitools/model/AnimalDto.java +src/main/java/org/openapitools/model/ApiResponseDto.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +src/main/java/org/openapitools/model/ArrayTestDto.java +src/main/java/org/openapitools/model/BigCatDto.java +src/main/java/org/openapitools/model/CapitalizationDto.java +src/main/java/org/openapitools/model/CatDto.java +src/main/java/org/openapitools/model/CategoryDto.java +src/main/java/org/openapitools/model/ChildWithNullableDto.java +src/main/java/org/openapitools/model/ClassModelDto.java +src/main/java/org/openapitools/model/ClientDto.java +src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +src/main/java/org/openapitools/model/DogDto.java +src/main/java/org/openapitools/model/EnumArraysDto.java +src/main/java/org/openapitools/model/EnumClassDto.java +src/main/java/org/openapitools/model/EnumTestDto.java +src/main/java/org/openapitools/model/FileDto.java +src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +src/main/java/org/openapitools/model/FormatTestDto.java +src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +src/main/java/org/openapitools/model/ListDto.java +src/main/java/org/openapitools/model/MapTestDto.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +src/main/java/org/openapitools/model/Model200ResponseDto.java +src/main/java/org/openapitools/model/NameDto.java +src/main/java/org/openapitools/model/NullableMapPropertyDto.java +src/main/java/org/openapitools/model/NumberOnlyDto.java +src/main/java/org/openapitools/model/OrderDto.java +src/main/java/org/openapitools/model/OuterCompositeDto.java +src/main/java/org/openapitools/model/OuterEnumDto.java +src/main/java/org/openapitools/model/ParentWithNullableDto.java +src/main/java/org/openapitools/model/PetDto.java +src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +src/main/java/org/openapitools/model/ReturnDto.java +src/main/java/org/openapitools/model/SpecialModelNameDto.java +src/main/java/org/openapitools/model/TagDto.java +src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +src/main/java/org/openapitools/model/TypeHolderExampleDto.java +src/main/java/org/openapitools/model/UserDto.java +src/main/java/org/openapitools/model/XmlItemDto.java diff --git a/samples/client/petstore/spring-http-interface-validation/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-validation/.openapi-generator/VERSION new file mode 100644 index 000000000000..193a12d6e891 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.20.0-SNAPSHOT diff --git a/samples/client/petstore/spring-http-interface-validation/README.md b/samples/client/petstore/spring-http-interface-validation/README.md new file mode 100644 index 000000000000..d947e03a2484 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated API stub + +[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface) + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring application for HTTP integration with other REST services +To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor +```java +@Configuration +public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { + + public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance + super(myWebClient); + } +} +``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-validation/pom.xml b/samples/client/petstore/spring-http-interface-validation/pom.xml new file mode 100644 index 000000000000..6d581f4de4fb --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/pom.xml @@ -0,0 +1,76 @@ + + 4.0.0 + org.openapitools + spring-http-interface + jar + spring-http-interface + 1.0.0-SNAPSHOT + + 17 + UTF-8 + + + org.springframework.boot + spring-boot-starter-parent + 3.1.3 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + org.springframework.boot + spring-boot-starter-webflux + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + jakarta.validation + jakarta.validation-api + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.8 + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java new file mode 100644 index 000000000000..01d1324ff23b --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,40 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ClientDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface AnotherFakeApi { + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param clientDto client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/another-fake/dummy", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity call123testSpecialTags( + @RequestBody ClientDto clientDto + ); + +} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeApi.java new file mode 100644 index 000000000000..fc8aa14fdf11 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,378 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullableDto; +import org.openapitools.model.ClientDto; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.model.FileSchemaTestClassDto; +import java.time.LocalDate; +import java.util.Map; +import org.springframework.lang.Nullable; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterCompositeDto; +import org.openapitools.model.UserDto; +import org.openapitools.model.XmlItemDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface FakeApi { + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItemDto XmlItem Body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/create_xml_item", + accept = { "application/json" }, + contentType = "application/xml" + ) + ResponseEntity createXmlItem( + @RequestBody XmlItemDto xmlItemDto + ); + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/boolean", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterBooleanSerialize( + @RequestBody(required = false) @Nullable Boolean body + ); + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param outerCompositeDto Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/composite", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterCompositeSerialize( + @RequestBody(required = false) @Nullable OuterCompositeDto outerCompositeDto + ); + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/number", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterNumberSerialize( + @RequestBody(required = false) @Nullable BigDecimal body + ); + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/string", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterStringSerialize( + @RequestBody(required = false) @Nullable String body + ); + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param fileSchemaTestClassDto (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/body-with-file-schema", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testBodyWithFileSchema( + @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto + ); + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param userDto (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/body-with-query-params", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testBodyWithQueryParams( + @RequestParam(value = "query", required = true) String query, + @RequestBody UserDto userDto + ); + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param clientDto client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/fake", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testClientModel( + @RequestBody ClientDto clientDto + ); + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "POST", + value = "/fake", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testEndpointParameters( + @RequestParam(value = "number", required = true) BigDecimal number, + @RequestParam(value = "double", required = true) Double _double, + @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @RequestParam(value = "byte", required = true) byte[] _byte, + @RequestParam(value = "integer", required = false) Integer integer, + @RequestParam(value = "int32", required = false) Integer int32, + @RequestParam(value = "int64", required = false) Long int64, + @RequestParam(value = "float", required = false) Float _float, + @RequestParam(value = "string", required = false) String string, + @RequestPart(value = "binary", required = false) MultipartFile binary, + @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @RequestParam(value = "password", required = false) String password, + @RequestParam(value = "callback", required = false) String paramCallback + ); + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/fake", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testEnumParameters( + @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray, + @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, + @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, + @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, + @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, + @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @RequestParam(value = "enum_form_string", required = false) String enumFormString + ); + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Something wrong (status code 400) + */ + @HttpExchange( + method = "DELETE", + value = "/fake", + accept = { "application/json" } + ) + ResponseEntity testGroupParameters( + @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, + @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup, + @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group + ); + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * + * @param requestBody request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/inline-additionalProperties", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testInlineAdditionalProperties( + @RequestBody Map requestBody + ); + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/jsonFormData", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testJsonFormData( + @RequestParam(value = "param", required = true) String param, + @RequestParam(value = "param2", required = true) String param2 + ); + + + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullableDto request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/nullable", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testNullable( + @RequestBody ChildWithNullableDto childWithNullableDto + ); + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/test-query-parameters", + accept = { "application/json" } + ) + ResponseEntity testQueryParameterCollectionFormat( + @RequestParam(value = "pipe", required = true) List pipe, + @RequestParam(value = "http", required = true) List http, + @RequestParam(value = "url", required = true) List url, + @RequestParam(value = "context", required = true) List context + ); + + + /** + * GET /fake/response-with-example + * This endpoint defines an example value for its response schema. + * + * @return Success (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/response-with-example", + accept = { "application/json" } + ) + ResponseEntity testWithResultExample( + + ); + +} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java new file mode 100644 index 000000000000..733c3da6a214 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -0,0 +1,40 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ClientDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface FakeClassnameTags123Api { + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param clientDto client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/fake_classname_test", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testClassname( + @RequestBody ClientDto clientDto + ); + +} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..1e123cf725a0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,225 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ApiResponseDto; +import org.springframework.lang.Nullable; +import org.openapitools.model.PetDto; +import org.openapitools.model.ResponseObjectWithDifferentFieldNamesDto; +import java.util.Set; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * + * @param petDto Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @HttpExchange( + method = "POST", + value = "/pet", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity addPet( + @RequestBody PetDto petDto + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @HttpExchange( + method = "DELETE", + value = "/pet/{petId}", + accept = { "application/json" } + ) + ResponseEntity deletePet( + @PathVariable("petId") Long petId, + @RequestHeader(value = "api_key", required = false) @Nullable String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @HttpExchange( + method = "GET", + value = "/pet/findByStatus", + accept = { "application/json", "application/xml" } + ) + ResponseEntity> findPetsByStatus( + @RequestParam(value = "status", required = true) List status + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Deprecated + @HttpExchange( + method = "GET", + value = "/pet/findByTags", + accept = { "application/json", "application/xml" } + ) + ResponseEntity> findPetsByTags( + @RequestParam(value = "tags", required = true) Set tags + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/pet/{petId}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getPetById( + @PathVariable("petId") Long petId + ); + + + /** + * GET /fake/{petId}/response-object-different-names + * + * @param petId ID of pet to update (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/{petId}/response-object-different-names", + accept = { "application/json" } + ) + ResponseEntity responseObjectDifferentNames( + @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * + * @param petDto Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @HttpExchange( + method = "PUT", + value = "/pet", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity updatePet( + @RequestBody PetDto petDto + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @HttpExchange( + method = "POST", + value = "/pet/{petId}", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity updatePetWithForm( + @PathVariable("petId") Long petId, + @RequestParam(value = "name", required = false) String name, + @RequestParam(value = "status", required = false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/pet/{petId}/uploadImage", + accept = { "application/json" }, + contentType = "multipart/form-data" + ) + ResponseEntity uploadFile( + @PathVariable("petId") Long petId, + @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @RequestPart(value = "file", required = false) MultipartFile file + ); + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/{petId}/uploadImageWithRequiredFile", + accept = { "application/json" }, + contentType = "multipart/form-data" + ) + ResponseEntity uploadFileWithRequiredFile( + @PathVariable("petId") Long petId, + @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + ); + +} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..6bcb815d5b5a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,95 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.OrderDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface StoreApi { + + /** + * DELETE /store/order/{order_id} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @HttpExchange( + method = "DELETE", + value = "/store/order/{order_id}", + accept = { "application/json" } + ) + ResponseEntity deleteOrder( + @PathVariable("order_id") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/store/inventory", + accept = { "application/json" } + ) + ResponseEntity> getInventory( + + ); + + + /** + * GET /store/order/{order_id} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/store/order/{order_id}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getOrderById( + @PathVariable("order_id") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * + * @param orderDto order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @HttpExchange( + method = "POST", + value = "/store/order", + accept = { "application/json", "application/xml" }, + contentType = "application/json" + ) + ResponseEntity placeOrder( + @RequestBody OrderDto orderDto + ); + +} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..bc3d07ca6f54 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,171 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.time.OffsetDateTime; +import org.openapitools.model.UserDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param userDto Created user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUser( + @RequestBody UserDto userDto + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * + * @param userDto List of user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user/createWithArray", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUsersWithArrayInput( + @RequestBody List<@Valid UserDto> userDto + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * + * @param userDto List of user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user/createWithList", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUsersWithListInput( + @RequestBody List<@Valid UserDto> userDto + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "DELETE", + value = "/user/{username}", + accept = { "application/json" } + ) + ResponseEntity deleteUser( + @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/user/{username}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getUserByName( + @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @HttpExchange( + method = "GET", + value = "/user/login", + accept = { "application/json", "application/xml" } + ) + ResponseEntity loginUser( + @RequestParam(value = "username", required = true) String username, + @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/user/logout", + accept = { "application/json" } + ) + ResponseEntity logoutUser( + + ); + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param userDto Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "PUT", + value = "/user/{username}", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity updateUser( + @PathVariable("username") String username, + @RequestBody UserDto userDto + ); + +} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java new file mode 100644 index 000000000000..f9e6dca33a9a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -0,0 +1,65 @@ +/* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.configuration; + +import org.openapitools.api.AnotherFakeApi; +import org.openapitools.api.FakeApi; +import org.openapitools.api.FakeClassnameTags123Api; +import org.openapitools.api.PetApi; +import org.openapitools.api.StoreApi; +import org.openapitools.api.UserApi; + +import org.springframework.context.annotation.Bean; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.support.WebClientAdapter; +import org.springframework.web.service.invoker.HttpServiceProxyFactory; + +public abstract class HttpInterfacesAbstractConfigurator { + + private final WebClient webClient; + + public HttpInterfacesAbstractConfigurator(final WebClient webClient) { + this.webClient = webClient; + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") + AnotherFakeApi anotherFakeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(AnotherFakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") + FakeApi fakeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(FakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") + FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(FakeClassnameTags123Api.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") + PetApi petHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(PetApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") + StoreApi storeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(StoreApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") + UserApi userHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(UserApi.class); + } + + +} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java new file mode 100644 index 000000000000..3e02dfb50ca5 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesAnyTypeDto + */ + +@JsonTypeName("AdditionalPropertiesAnyType") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesAnyTypeDto { + + private @Nullable String name; + + public AdditionalPropertiesAnyTypeDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesAnyTypeDto putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesAnyTypeDto additionalPropertiesAnyType = (AdditionalPropertiesAnyTypeDto) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + Objects.equals(this.additionalProperties, additionalPropertiesAnyType.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyTypeDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java new file mode 100644 index 000000000000..497bd9eb1285 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesArrayDto + */ + +@JsonTypeName("AdditionalPropertiesArray") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesArrayDto { + + private @Nullable String name; + + public AdditionalPropertiesArrayDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesArrayDto putAdditionalProperty(String key, List value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public List getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesArrayDto additionalPropertiesArray = (AdditionalPropertiesArrayDto) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + Objects.equals(this.additionalProperties, additionalPropertiesArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArrayDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java new file mode 100644 index 000000000000..60a45b5ed9cc --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesBooleanDto + */ + +@JsonTypeName("AdditionalPropertiesBoolean") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesBooleanDto { + + private @Nullable String name; + + public AdditionalPropertiesBooleanDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesBooleanDto putAdditionalProperty(String key, Boolean value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Boolean getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesBooleanDto additionalPropertiesBoolean = (AdditionalPropertiesBooleanDto) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + Objects.equals(this.additionalProperties, additionalPropertiesBoolean.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBooleanDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java new file mode 100644 index 000000000000..629426ed1bcf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -0,0 +1,403 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * AdditionalPropertiesClassDto + */ + +@JsonTypeName("AdditionalPropertiesClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesClassDto { + + + private Map mapString = new HashMap<>(); + + + private Map mapNumber = new HashMap<>(); + + + private Map mapInteger = new HashMap<>(); + + + private Map mapBoolean = new HashMap<>(); + + + private Map> mapArrayInteger = new HashMap<>(); + + + private Map> mapArrayAnytype = new HashMap<>(); + + + private Map> mapMapString = new HashMap<>(); + + + private Map> mapMapAnytype = new HashMap<>(); + + private @Nullable Object anytype1; + + private JsonNullable anytype2 = JsonNullable.undefined(); + + private @Nullable Object anytype3; + + public AdditionalPropertiesClassDto mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClassDto putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + + @JsonProperty("map_string") + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClassDto mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClassDto putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + + @JsonProperty("map_number") + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClassDto mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClassDto putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + + @JsonProperty("map_integer") + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClassDto mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClassDto putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + + @JsonProperty("map_boolean") + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClassDto mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClassDto putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + + @JsonProperty("map_array_integer") + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClassDto mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClassDto putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + + @JsonProperty("map_array_anytype") + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClassDto mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClassDto putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + + @JsonProperty("map_map_string") + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClassDto mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClassDto putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + + @JsonProperty("map_map_anytype") + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClassDto anytype1(@Nullable Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + + @JsonProperty("anytype_1") + public @Nullable Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(@Nullable Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClassDto anytype2(Object anytype2) { + this.anytype2 = JsonNullable.of(anytype2); + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + + @JsonProperty("anytype_2") + public JsonNullable getAnytype2() { + return anytype2; + } + + public void setAnytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClassDto anytype3(@Nullable Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + + @JsonProperty("anytype_3") + public @Nullable Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(@Nullable Object anytype3) { + this.anytype3 = anytype3; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClassDto additionalPropertiesClass = (AdditionalPropertiesClassDto) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + equalsNullable(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, hashCodeNullable(anytype2), anytype3); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClassDto {\n"); + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java new file mode 100644 index 000000000000..c566ab2481fc --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesIntegerDto + */ + +@JsonTypeName("AdditionalPropertiesInteger") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesIntegerDto { + + private @Nullable String name; + + public AdditionalPropertiesIntegerDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesIntegerDto putAdditionalProperty(String key, Integer value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Integer getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesIntegerDto additionalPropertiesInteger = (AdditionalPropertiesIntegerDto) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + Objects.equals(this.additionalProperties, additionalPropertiesInteger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesIntegerDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java new file mode 100644 index 000000000000..75eda796c3eb --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesNumberDto + */ + +@JsonTypeName("AdditionalPropertiesNumber") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesNumberDto { + + private @Nullable String name; + + public AdditionalPropertiesNumberDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesNumberDto putAdditionalProperty(String key, BigDecimal value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public BigDecimal getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesNumberDto additionalPropertiesNumber = (AdditionalPropertiesNumberDto) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + Objects.equals(this.additionalProperties, additionalPropertiesNumber.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumberDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java new file mode 100644 index 000000000000..1949afe4c581 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesObjectDto + */ + +@JsonTypeName("AdditionalPropertiesObject") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesObjectDto { + + private @Nullable String name; + + public AdditionalPropertiesObjectDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesObjectDto putAdditionalProperty(String key, Map value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Map getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesObjectDto additionalPropertiesObject = (AdditionalPropertiesObjectDto) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + Objects.equals(this.additionalProperties, additionalPropertiesObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObjectDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java new file mode 100644 index 000000000000..945ba5bfdddf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesStringDto + */ + +@JsonTypeName("AdditionalPropertiesString") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesStringDto { + + private @Nullable String name; + + public AdditionalPropertiesStringDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesStringDto putAdditionalProperty(String key, String value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public String getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesStringDto additionalPropertiesString = (AdditionalPropertiesStringDto) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + Objects.equals(this.additionalProperties, additionalPropertiesString.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesStringDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AnimalDto.java new file mode 100644 index 000000000000..44585b4222f0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AnimalDto.java @@ -0,0 +1,123 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * AnimalDto + */ + +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat"), + @JsonSubTypes.Type(value = CatDto.class, name = "Cat"), + @JsonSubTypes.Type(value = DogDto.class, name = "Dog") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AnimalDto { + + private String className; + + private String color = "red"; + + public AnimalDto() { + super(); + } + + public AnimalDto className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @NotNull + @JsonProperty("className") + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public AnimalDto color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + + @JsonProperty("color") + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnimalDto animal = (AnimalDto) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnimalDto {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ApiResponseDto.java new file mode 100644 index 000000000000..937c1814095c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -0,0 +1,129 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ApiResponseDto + */ + +@JsonTypeName("ApiResponse") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ApiResponseDto { + + private @Nullable Integer code; + + private @Nullable String type; + + private @Nullable String message; + + public ApiResponseDto code(@Nullable Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @JsonProperty("code") + public @Nullable Integer getCode() { + return code; + } + + public void setCode(@Nullable Integer code) { + this.code = code; + } + + public ApiResponseDto type(@Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public @Nullable String getType() { + return type; + } + + public void setType(@Nullable String type) { + this.type = type; + } + + public ApiResponseDto message(@Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @JsonProperty("message") + public @Nullable String getMessage() { + return message; + } + + public void setMessage(@Nullable String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiResponseDto _apiResponse = (ApiResponseDto) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiResponseDto {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java new file mode 100644 index 000000000000..9153e5dac5c9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfArrayOfNumberOnlyDto + */ + +@JsonTypeName("ArrayOfArrayOfNumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayOfArrayOfNumberOnlyDto { + + + private List> arrayArrayNumber = new ArrayList<>(); + + public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnlyDto addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + + @JsonProperty("ArrayArrayNumber") + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnlyDto arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnlyDto) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnlyDto {\n"); + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java new file mode 100644 index 000000000000..98ed15a0b184 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfNumberOnlyDto + */ + +@JsonTypeName("ArrayOfNumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayOfNumberOnlyDto { + + + private List arrayNumber = new ArrayList<>(); + + public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnlyDto addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + + @JsonProperty("ArrayNumber") + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnlyDto arrayOfNumberOnly = (ArrayOfNumberOnlyDto) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnlyDto {\n"); + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayTestDto.java new file mode 100644 index 000000000000..1436e93daaf2 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -0,0 +1,160 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.ReadOnlyFirstDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayTestDto + */ + +@JsonTypeName("ArrayTest") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayTestDto { + + + private List arrayOfString = new ArrayList<>(); + + + private List> arrayArrayOfInteger = new ArrayList<>(); + + + private List> arrayArrayOfModel = new ArrayList<>(); + + public ArrayTestDto arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTestDto addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + + @JsonProperty("array_of_string") + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTestDto arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTestDto addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + + @JsonProperty("array_array_of_integer") + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + + @JsonProperty("array_array_of_model") + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTestDto arrayTest = (ArrayTestDto) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTestDto {\n"); + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/BigCatDto.java new file mode 100644 index 000000000000..f8685bbe513c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/BigCatDto.java @@ -0,0 +1,149 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.CatDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * BigCatDto + */ + + +@JsonTypeName("BigCat") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class BigCatDto extends CatDto { + + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private final String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable KindEnum kind; + + public BigCatDto() { + super(); + } + + public BigCatDto kind(@Nullable KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + + @JsonProperty("kind") + public @Nullable KindEnum getKind() { + return kind; + } + + public void setKind(@Nullable KindEnum kind) { + this.kind = kind; + } + + + public BigCatDto declawed(Boolean declawed) { + super.declawed(declawed); + return this; + } + + public BigCatDto className(String className) { + super.className(className); + return this; + } + + public BigCatDto color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatDto bigCat = (BigCatDto) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CapitalizationDto.java new file mode 100644 index 000000000000..1c7a8b98ae3e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -0,0 +1,198 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CapitalizationDto + */ + +@JsonTypeName("Capitalization") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class CapitalizationDto { + + private @Nullable String smallCamel; + + private @Nullable String capitalCamel; + + private @Nullable String smallSnake; + + private @Nullable String capitalSnake; + + private @Nullable String scAETHFlowPoints; + + private @Nullable String ATT_NAME; + + public CapitalizationDto smallCamel(@Nullable String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + + @JsonProperty("smallCamel") + public @Nullable String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(@Nullable String smallCamel) { + this.smallCamel = smallCamel; + } + + public CapitalizationDto capitalCamel(@Nullable String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + + @JsonProperty("CapitalCamel") + public @Nullable String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(@Nullable String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public CapitalizationDto smallSnake(@Nullable String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + + @JsonProperty("small_Snake") + public @Nullable String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(@Nullable String smallSnake) { + this.smallSnake = smallSnake; + } + + public CapitalizationDto capitalSnake(@Nullable String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + + @JsonProperty("Capital_Snake") + public @Nullable String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(@Nullable String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public CapitalizationDto scAETHFlowPoints(@Nullable String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + + @JsonProperty("SCA_ETH_Flow_Points") + public @Nullable String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(@Nullable String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public CapitalizationDto ATT_NAME(@Nullable String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + + @JsonProperty("ATT_NAME") + public @Nullable String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(@Nullable String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CapitalizationDto capitalization = (CapitalizationDto) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CapitalizationDto {\n"); + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CatDto.java new file mode 100644 index 000000000000..051efd518e0e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CatDto.java @@ -0,0 +1,111 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.model.AnimalDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CatDto + */ + +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class CatDto extends AnimalDto { + + private @Nullable Boolean declawed; + + public CatDto() { + super(); + } + + public CatDto declawed(@Nullable Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + + @JsonProperty("declawed") + public @Nullable Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(@Nullable Boolean declawed) { + this.declawed = declawed; + } + + + public CatDto className(String className) { + super.className(className); + return this; + } + + public CatDto color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatDto cat = (CatDto) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CategoryDto.java new file mode 100644 index 000000000000..fba08710dadf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CategoryDto.java @@ -0,0 +1,110 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CategoryDto + */ + +@JsonTypeName("Category") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class CategoryDto { + + private @Nullable Long id; + + private String name = "default-name"; + + public CategoryDto() { + super(); + } + + public CategoryDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public CategoryDto name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CategoryDto category = (CategoryDto) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CategoryDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java new file mode 100644 index 000000000000..2da557bac29d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -0,0 +1,114 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullableDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ChildWithNullableDto + */ + + +@JsonTypeName("ChildWithNullable") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ChildWithNullableDto extends ParentWithNullableDto { + + private @Nullable String otherProperty; + + public ChildWithNullableDto otherProperty(@Nullable String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @JsonProperty("otherProperty") + public @Nullable String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(@Nullable String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullableDto type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullableDto nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullableDto childWithNullable = (ChildWithNullableDto) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullableDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClassModelDto.java new file mode 100644 index 000000000000..f0531a128c3d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClassModelDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model with \"_class\" property + */ + +@JsonTypeName("ClassModel") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ClassModelDto { + + private @Nullable String propertyClass; + + public ClassModelDto propertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + + @JsonProperty("_class") + public @Nullable String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModelDto classModel = (ClassModelDto) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModelDto {\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClientDto.java new file mode 100644 index 000000000000..a199fc8203ad --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClientDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ClientDto + */ + +@JsonTypeName("Client") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ClientDto { + + private @Nullable String client; + + public ClientDto client(@Nullable String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + + @JsonProperty("client") + public @Nullable String getClient() { + return client; + } + + public void setClient(@Nullable String client) { + this.client = client; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClientDto client = (ClientDto) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClientDto {\n"); + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java new file mode 100644 index 000000000000..863248d301de --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -0,0 +1,208 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ContainerDefaultValueDto + */ + +@JsonTypeName("ContainerDefaultValue") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ContainerDefaultValueDto { + + + private JsonNullable> nullableArray = JsonNullable.>undefined(); + + + private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + + + private List requiredArray = new ArrayList<>(); + + + private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + + public ContainerDefaultValueDto() { + super(); + } + + public ContainerDefaultValueDto nullableArray(List nullableArray) { + this.nullableArray = JsonNullable.of(nullableArray); + return this; + } + + public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { + if (this.nullableArray == null || !this.nullableArray.isPresent()) { + this.nullableArray = JsonNullable.of(new ArrayList<>()); + } + this.nullableArray.get().add(nullableArrayItem); + return this; + } + + /** + * Get nullableArray + * @return nullableArray + */ + + @JsonProperty("nullable_array") + public JsonNullable> getNullableArray() { + return nullableArray; + } + + public void setNullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; + } + + public ContainerDefaultValueDto nullableRequiredArray(List nullableRequiredArray) { + this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + return this; + } + + public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequiredArrayItem) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); + } + this.nullableRequiredArray.get().add(nullableRequiredArrayItem); + return this; + } + + /** + * Get nullableRequiredArray + * @return nullableRequiredArray + */ + @NotNull + @JsonProperty("nullable_required_array") + public JsonNullable> getNullableRequiredArray() { + return nullableRequiredArray; + } + + public void setNullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; + } + + public ContainerDefaultValueDto requiredArray(List requiredArray) { + this.requiredArray = requiredArray; + return this; + } + + public ContainerDefaultValueDto addRequiredArrayItem(String requiredArrayItem) { + if (this.requiredArray == null) { + this.requiredArray = new ArrayList<>(); + } + this.requiredArray.add(requiredArrayItem); + return this; + } + + /** + * Get requiredArray + * @return requiredArray + */ + @NotNull + @JsonProperty("required_array") + public List getRequiredArray() { + return requiredArray; + } + + public void setRequiredArray(List requiredArray) { + this.requiredArray = requiredArray; + } + + public ContainerDefaultValueDto nullableArrayWithDefault(List nullableArrayWithDefault) { + this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + return this; + } + + public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); + } + this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); + return this; + } + + /** + * Get nullableArrayWithDefault + * @return nullableArrayWithDefault + */ + + @JsonProperty("nullable_array_with_default") + public JsonNullable> getNullableArrayWithDefault() { + return nullableArrayWithDefault; + } + + public void setNullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContainerDefaultValueDto containerDefaultValue = (ContainerDefaultValueDto) o; + return equalsNullable(this.nullableArray, containerDefaultValue.nullableArray) && + Objects.equals(this.nullableRequiredArray, containerDefaultValue.nullableRequiredArray) && + Objects.equals(this.requiredArray, containerDefaultValue.requiredArray) && + equalsNullable(this.nullableArrayWithDefault, containerDefaultValue.nullableArrayWithDefault); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableArray), nullableRequiredArray, requiredArray, hashCodeNullable(nullableArrayWithDefault)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContainerDefaultValueDto {\n"); + sb.append(" nullableArray: ").append(toIndentedString(nullableArray)).append("\n"); + sb.append(" nullableRequiredArray: ").append(toIndentedString(nullableRequiredArray)).append("\n"); + sb.append(" requiredArray: ").append(toIndentedString(requiredArray)).append("\n"); + sb.append(" nullableArrayWithDefault: ").append(toIndentedString(nullableArrayWithDefault)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/DogDto.java new file mode 100644 index 000000000000..e66b8b730481 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/DogDto.java @@ -0,0 +1,104 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.model.AnimalDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * DogDto + */ + + +@JsonTypeName("Dog") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class DogDto extends AnimalDto { + + private @Nullable String breed; + + public DogDto() { + super(); + } + + public DogDto breed(@Nullable String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + + @JsonProperty("breed") + public @Nullable String getBreed() { + return breed; + } + + public void setBreed(@Nullable String breed) { + this.breed = breed; + } + + + public DogDto className(String className) { + super.className(className); + return this; + } + + public DogDto color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogDto dog = (DogDto) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumArraysDto.java new file mode 100644 index 000000000000..d638aa2e39ca --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -0,0 +1,189 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumArraysDto + */ + +@JsonTypeName("EnumArrays") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class EnumArraysDto { + + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private final String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private final String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + + private List arrayEnum = new ArrayList<>(); + + public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + + @JsonProperty("just_symbol") + public @Nullable JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(@Nullable JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArraysDto arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArraysDto addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + + @JsonProperty("array_enum") + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArraysDto enumArrays = (EnumArraysDto) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArraysDto {\n"); + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumClassDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumClassDto.java new file mode 100644 index 000000000000..766783743ebe --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumClassDto.java @@ -0,0 +1,56 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public enum EnumClassDto { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private final String value; + + EnumClassDto(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClassDto fromValue(String value) { + for (EnumClassDto b : EnumClassDto.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumTestDto.java new file mode 100644 index 000000000000..f22f967bbd04 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumTestDto.java @@ -0,0 +1,325 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnumDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumTestDto + */ + +@JsonTypeName("Enum_Test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class EnumTestDto { + + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private final String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private final String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private final Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private final Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumNumberEnum enumNumber; + + private @Nullable OuterEnumDto outerEnum; + + public EnumTestDto() { + super(); + } + + public EnumTestDto enumString(@Nullable EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + + @JsonProperty("enum_string") + public @Nullable EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(@Nullable EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTestDto enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @NotNull + @JsonProperty("enum_string_required") + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTestDto enumInteger(@Nullable EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + + @JsonProperty("enum_integer") + public @Nullable EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(@Nullable EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTestDto enumNumber(@Nullable EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + + @JsonProperty("enum_number") + public @Nullable EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTestDto outerEnum(@Nullable OuterEnumDto outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + + @JsonProperty("outerEnum") + public @Nullable OuterEnumDto getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(@Nullable OuterEnumDto outerEnum) { + this.outerEnum = outerEnum; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTestDto enumTest = (EnumTestDto) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTestDto {\n"); + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileDto.java new file mode 100644 index 000000000000..1b4e72e7de4e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Must be named `File` for test. + */ + +@JsonTypeName("File") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class FileDto { + + private @Nullable String sourceURI; + + public FileDto sourceURI(@Nullable String sourceURI) { + this.sourceURI = sourceURI; + return this; + } + + /** + * Test capitalization + * @return sourceURI + */ + + @JsonProperty("sourceURI") + public @Nullable String getSourceURI() { + return sourceURI; + } + + public void setSourceURI(@Nullable String sourceURI) { + this.sourceURI = sourceURI; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileDto file = (FileDto) o; + return Objects.equals(this.sourceURI, file.sourceURI); + } + + @Override + public int hashCode() { + return Objects.hash(sourceURI); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileDto {\n"); + sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java new file mode 100644 index 000000000000..d7867a37d1b9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -0,0 +1,119 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.FileDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FileSchemaTestClassDto + */ + +@JsonTypeName("FileSchemaTestClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class FileSchemaTestClassDto { + + private @Nullable FileDto file; + + + private List<@Valid FileDto> files = new ArrayList<>(); + + public FileSchemaTestClassDto file(@Nullable FileDto file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + + @JsonProperty("file") + public @Nullable FileDto getFile() { + return file; + } + + public void setFile(@Nullable FileDto file) { + this.file = file; + } + + public FileSchemaTestClassDto files(List<@Valid FileDto> files) { + this.files = files; + return this; + } + + public FileSchemaTestClassDto addFilesItem(FileDto filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + + @JsonProperty("files") + public List<@Valid FileDto> getFiles() { + return files; + } + + public void setFiles(List<@Valid FileDto> files) { + this.files = files; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClassDto fileSchemaTestClass = (FileSchemaTestClassDto) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClassDto {\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FormatTestDto.java new file mode 100644 index 000000000000..c00c48deed87 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FormatTestDto.java @@ -0,0 +1,404 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FormatTestDto + */ + +@JsonTypeName("format_test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class FormatTestDto { + + private @Nullable Integer integer; + + private @Nullable Integer int32; + + private @Nullable Long int64; + + private BigDecimal number; + + private @Nullable Float _float; + + private @Nullable Double _double; + + private @Nullable String string; + + private byte[] _byte; + + private @Nullable org.springframework.core.io.Resource binary; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime dateTime; + + private @Nullable UUID uuid; + + private String password; + + private @Nullable BigDecimal bigDecimal; + + public FormatTestDto() { + super(); + } + + public FormatTestDto integer(@Nullable Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + + @JsonProperty("integer") + public @Nullable Integer getInteger() { + return integer; + } + + public void setInteger(@Nullable Integer integer) { + this.integer = integer; + } + + public FormatTestDto int32(@Nullable Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + + @JsonProperty("int32") + public @Nullable Integer getInt32() { + return int32; + } + + public void setInt32(@Nullable Integer int32) { + this.int32 = int32; + } + + public FormatTestDto int64(@Nullable Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + + @JsonProperty("int64") + public @Nullable Long getInt64() { + return int64; + } + + public void setInt64(@Nullable Long int64) { + this.int64 = int64; + } + + public FormatTestDto number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @NotNull + @JsonProperty("number") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTestDto _float(@Nullable Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + + @JsonProperty("float") + public @Nullable Float getFloat() { + return _float; + } + + public void setFloat(@Nullable Float _float) { + this._float = _float; + } + + public FormatTestDto _double(@Nullable Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + + @JsonProperty("double") + public @Nullable Double getDouble() { + return _double; + } + + public void setDouble(@Nullable Double _double) { + this._double = _double; + } + + public FormatTestDto string(@Nullable String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + + @JsonProperty("string") + public @Nullable String getString() { + return string; + } + + public void setString(@Nullable String string) { + this.string = string; + } + + public FormatTestDto _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @NotNull + @JsonProperty("byte") + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTestDto binary(@Nullable org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + + @JsonProperty("binary") + public @Nullable org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(@Nullable org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTestDto date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @NotNull + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTestDto uuid(@Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + public void setUuid(@Nullable UUID uuid) { + this.uuid = uuid; + } + + public FormatTestDto password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @NotNull + @JsonProperty("password") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTestDto bigDecimal(@Nullable BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + + @JsonProperty("BigDecimal") + public @Nullable BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(@Nullable BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTestDto formatTest = (FormatTestDto) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTestDto {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append("*").append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java new file mode 100644 index 000000000000..f70bfcfb3b3a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * HasOnlyReadOnlyDto + */ + +@JsonTypeName("hasOnlyReadOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class HasOnlyReadOnlyDto { + + private @Nullable String bar; + + private @Nullable String foo; + + public HasOnlyReadOnlyDto bar(@Nullable String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + + @JsonProperty("bar") + public @Nullable String getBar() { + return bar; + } + + public void setBar(@Nullable String bar) { + this.bar = bar; + } + + public HasOnlyReadOnlyDto foo(@Nullable String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + + @JsonProperty("foo") + public @Nullable String getFoo() { + return foo; + } + + public void setFoo(@Nullable String foo) { + this.foo = foo; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnlyDto hasOnlyReadOnly = (HasOnlyReadOnlyDto) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnlyDto {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ListDto.java new file mode 100644 index 000000000000..c155a45c0b6c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ListDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ListDto + */ + +@JsonTypeName("List") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ListDto { + + private @Nullable String _123list; + + public ListDto _123list(@Nullable String _123list) { + this._123list = _123list; + return this; + } + + /** + * Get _123list + * @return _123list + */ + + @JsonProperty("123-list") + public @Nullable String get123list() { + return _123list; + } + + public void set123list(@Nullable String _123list) { + this._123list = _123list; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDto _list = (ListDto) o; + return Objects.equals(this._123list, _list._123list); + } + + @Override + public int hashCode() { + return Objects.hash(_123list); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListDto {\n"); + sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MapTestDto.java new file mode 100644 index 000000000000..d585aaf5cb7e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MapTestDto.java @@ -0,0 +1,226 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MapTestDto + */ + +@JsonTypeName("MapTest") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class MapTestDto { + + + private Map> mapMapOfString = new HashMap<>(); + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private final String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + + private Map mapOfEnumString = new HashMap<>(); + + + private Map directMap = new HashMap<>(); + + + private Map indirectMap = new HashMap<>(); + + public MapTestDto mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTestDto putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + + @JsonProperty("map_map_of_string") + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTestDto mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTestDto putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + + @JsonProperty("map_of_enum_string") + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTestDto directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTestDto putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + + @JsonProperty("direct_map") + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTestDto indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTestDto putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + + @JsonProperty("indirect_map") + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTestDto mapTest = (MapTestDto) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTestDto {\n"); + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java new file mode 100644 index 000000000000..69a49c3b06ea --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -0,0 +1,145 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.AnimalDto; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MixedPropertiesAndAdditionalPropertiesClassDto + */ + +@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class MixedPropertiesAndAdditionalPropertiesClassDto { + + private @Nullable UUID uuid; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime dateTime; + + + private Map map = new HashMap<>(); + + public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + public void setUuid(@Nullable UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClassDto dateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClassDto map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClassDto putMapItem(String key, AnimalDto mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + + @JsonProperty("map") + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClassDto mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClassDto) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClassDto {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java new file mode 100644 index 000000000000..eac1d092c452 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model name starting with number + */ + +@JsonTypeName("200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Model200ResponseDto { + + private @Nullable Integer name; + + private @Nullable String propertyClass; + + public Model200ResponseDto name(@Nullable Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable Integer getName() { + return name; + } + + public void setName(@Nullable Integer name) { + this.name = name; + } + + public Model200ResponseDto propertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + + @JsonProperty("class") + public @Nullable String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200ResponseDto _200response = (Model200ResponseDto) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200ResponseDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NameDto.java new file mode 100644 index 000000000000..7b04969f2043 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NameDto.java @@ -0,0 +1,156 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model name same as property name + */ + +@JsonTypeName("Name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class NameDto { + + private Integer name; + + private @Nullable Integer snakeCase; + + private @Nullable String property; + + private @Nullable Integer _123number; + + public NameDto() { + super(); + } + + public NameDto name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public NameDto snakeCase(@Nullable Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + + @JsonProperty("snake_case") + public @Nullable Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(@Nullable Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public NameDto property(@Nullable String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + + @JsonProperty("property") + public @Nullable String getProperty() { + return property; + } + + public void setProperty(@Nullable String property) { + this.property = property; + } + + public NameDto _123number(@Nullable Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + + @JsonProperty("123Number") + public @Nullable Integer get123number() { + return _123number; + } + + public void set123number(@Nullable Integer _123number) { + this._123number = _123number; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NameDto name = (NameDto) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NameDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java new file mode 100644 index 000000000000..13c83d77e9d6 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NullableMapPropertyDto + */ + +@JsonTypeName("NullableMapProperty") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class NullableMapPropertyDto { + + + private JsonNullable> languageValues = JsonNullable.>undefined(); + + public NullableMapPropertyDto languageValues(Map languageValues) { + this.languageValues = JsonNullable.of(languageValues); + return this; + } + + public NullableMapPropertyDto putLanguageValuesItem(String key, String languageValuesItem) { + if (this.languageValues == null || !this.languageValues.isPresent()) { + this.languageValues = JsonNullable.of(new HashMap<>()); + } + this.languageValues.get().put(key, languageValuesItem); + return this; + } + + /** + * Get languageValues + * @return languageValues + */ + + @JsonProperty("languageValues") + public JsonNullable> getLanguageValues() { + return languageValues; + } + + public void setLanguageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableMapPropertyDto nullableMapProperty = (NullableMapPropertyDto) o; + return equalsNullable(this.languageValues, nullableMapProperty.languageValues); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(languageValues)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableMapPropertyDto {\n"); + sb.append(" languageValues: ").append(toIndentedString(languageValues)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java new file mode 100644 index 000000000000..ee1c0fe4d347 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NumberOnlyDto + */ + +@JsonTypeName("NumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class NumberOnlyDto { + + private @Nullable BigDecimal justNumber; + + public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + + @JsonProperty("JustNumber") + public @Nullable BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(@Nullable BigDecimal justNumber) { + this.justNumber = justNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnlyDto numberOnly = (NumberOnlyDto) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnlyDto {\n"); + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OrderDto.java new file mode 100644 index 000000000000..3d3c83438af5 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OrderDto.java @@ -0,0 +1,239 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OrderDto + */ + +@JsonTypeName("Order") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class OrderDto { + + private @Nullable Long id; + + private @Nullable Long petId; + + private @Nullable Integer quantity; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable StatusEnum status; + + private Boolean complete = false; + + public OrderDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public OrderDto petId(@Nullable Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + + @JsonProperty("petId") + public @Nullable Long getPetId() { + return petId; + } + + public void setPetId(@Nullable Long petId) { + this.petId = petId; + } + + public OrderDto quantity(@Nullable Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + + @JsonProperty("quantity") + public @Nullable Integer getQuantity() { + return quantity; + } + + public void setQuantity(@Nullable Integer quantity) { + this.quantity = quantity; + } + + public OrderDto shipDate(@Nullable OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + + @JsonProperty("shipDate") + public @Nullable OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(@Nullable OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public OrderDto status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + + @JsonProperty("status") + public @Nullable StatusEnum getStatus() { + return status; + } + + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + public OrderDto complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + + @JsonProperty("complete") + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDto order = (OrderDto) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java new file mode 100644 index 000000000000..91acbd9a1f35 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -0,0 +1,130 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OuterCompositeDto + */ + +@JsonTypeName("OuterComposite") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class OuterCompositeDto { + + private @Nullable BigDecimal myNumber; + + private @Nullable String myString; + + private @Nullable Boolean myBoolean; + + public OuterCompositeDto myNumber(@Nullable BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + + @JsonProperty("my_number") + public @Nullable BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(@Nullable BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterCompositeDto myString(@Nullable String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + + @JsonProperty("my_string") + public @Nullable String getMyString() { + return myString; + } + + public void setMyString(@Nullable String myString) { + this.myString = myString; + } + + public OuterCompositeDto myBoolean(@Nullable Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + + @JsonProperty("my_boolean") + public @Nullable Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(@Nullable Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterCompositeDto outerComposite = (OuterCompositeDto) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterCompositeDto {\n"); + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterEnumDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterEnumDto.java new file mode 100644 index 000000000000..38a8d0eb9b4c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterEnumDto.java @@ -0,0 +1,56 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public enum OuterEnumDto { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private final String value; + + OuterEnumDto(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDto fromValue(String value) { + for (OuterEnumDto b : OuterEnumDto.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java new file mode 100644 index 000000000000..0f2e46a1229e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -0,0 +1,165 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ParentWithNullableDto + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullableDto.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ParentWithNullableDto { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILD_WITH_NULLABLE("ChildWithNullable"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullableDto type(@Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public @Nullable TypeEnum getType() { + return type; + } + + public void setType(@Nullable TypeEnum type) { + this.type = type; + } + + public ParentWithNullableDto nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullableDto parentWithNullable = (ParentWithNullableDto) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullableDto {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/PetDto.java new file mode 100644 index 000000000000..362ad2b5ae16 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/PetDto.java @@ -0,0 +1,274 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.CategoryDto; +import org.openapitools.model.TagDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * PetDto + */ + +@JsonTypeName("Pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class PetDto { + + private @Nullable Long id; + + private @Nullable CategoryDto category; + + private String name; + + + private Set photoUrls = new LinkedHashSet<>(); + + + private List<@Valid TagDto> tags = new ArrayList<>(); + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @Deprecated + private @Nullable StatusEnum status; + + public PetDto() { + super(); + } + + public PetDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public PetDto category(@Nullable CategoryDto category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + + @JsonProperty("category") + public @Nullable CategoryDto getCategory() { + return category; + } + + public void setCategory(@Nullable CategoryDto category) { + this.category = category; + } + + public PetDto name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PetDto photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public PetDto addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @NotNull + @JsonProperty("photoUrls") + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public PetDto tags(List<@Valid TagDto> tags) { + this.tags = tags; + return this; + } + + public PetDto addTagsItem(TagDto tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + + @JsonProperty("tags") + public List<@Valid TagDto> getTags() { + return tags; + } + + public void setTags(List<@Valid TagDto> tags) { + this.tags = tags; + } + + public PetDto status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + */ + + @JsonProperty("status") + @Deprecated + public @Nullable StatusEnum getStatus() { + return status; + } + + /** + * @deprecated + */ + @Deprecated + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PetDto pet = (PetDto) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PetDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java new file mode 100644 index 000000000000..53e133b88860 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ReadOnlyFirstDto + */ + +@JsonTypeName("ReadOnlyFirst") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ReadOnlyFirstDto { + + private @Nullable String bar; + + private @Nullable String baz; + + public ReadOnlyFirstDto bar(@Nullable String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + + @JsonProperty("bar") + public @Nullable String getBar() { + return bar; + } + + public void setBar(@Nullable String bar) { + this.bar = bar; + } + + public ReadOnlyFirstDto baz(@Nullable String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + + @JsonProperty("baz") + public @Nullable String getBaz() { + return baz; + } + + public void setBaz(@Nullable String baz) { + this.baz = baz; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirstDto readOnlyFirst = (ReadOnlyFirstDto) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirstDto {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java new file mode 100644 index 000000000000..3c9c502a23c9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -0,0 +1,152 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ResponseObjectWithDifferentFieldNamesDto + */ + +@JsonTypeName("ResponseObjectWithDifferentFieldNames") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ResponseObjectWithDifferentFieldNamesDto { + + private @Nullable String normalPropertyName; + + private @Nullable String UPPER_CASE_PROPERTY_SNAKE; + + private @Nullable String lowerCasePropertyDashes; + + private @Nullable String propertyNameWithSpaces; + + public ResponseObjectWithDifferentFieldNamesDto normalPropertyName(@Nullable String normalPropertyName) { + this.normalPropertyName = normalPropertyName; + return this; + } + + /** + * Get normalPropertyName + * @return normalPropertyName + */ + + @JsonProperty("normalPropertyName") + public @Nullable String getNormalPropertyName() { + return normalPropertyName; + } + + public void setNormalPropertyName(@Nullable String normalPropertyName) { + this.normalPropertyName = normalPropertyName; + } + + public ResponseObjectWithDifferentFieldNamesDto UPPER_CASE_PROPERTY_SNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + return this; + } + + /** + * Get UPPER_CASE_PROPERTY_SNAKE + * @return UPPER_CASE_PROPERTY_SNAKE + */ + + @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") + public @Nullable String getUPPERCASEPROPERTYSNAKE() { + return UPPER_CASE_PROPERTY_SNAKE; + } + + public void setUPPERCASEPROPERTYSNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + } + + public ResponseObjectWithDifferentFieldNamesDto lowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + return this; + } + + /** + * Get lowerCasePropertyDashes + * @return lowerCasePropertyDashes + */ + + @JsonProperty("lower-case-property-dashes") + public @Nullable String getLowerCasePropertyDashes() { + return lowerCasePropertyDashes; + } + + public void setLowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + } + + public ResponseObjectWithDifferentFieldNamesDto propertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; + return this; + } + + /** + * Get propertyNameWithSpaces + * @return propertyNameWithSpaces + */ + + @JsonProperty("property name with spaces") + public @Nullable String getPropertyNameWithSpaces() { + return propertyNameWithSpaces; + } + + public void setPropertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseObjectWithDifferentFieldNamesDto responseObjectWithDifferentFieldNames = (ResponseObjectWithDifferentFieldNamesDto) o; + return Objects.equals(this.normalPropertyName, responseObjectWithDifferentFieldNames.normalPropertyName) && + Objects.equals(this.UPPER_CASE_PROPERTY_SNAKE, responseObjectWithDifferentFieldNames.UPPER_CASE_PROPERTY_SNAKE) && + Objects.equals(this.lowerCasePropertyDashes, responseObjectWithDifferentFieldNames.lowerCasePropertyDashes) && + Objects.equals(this.propertyNameWithSpaces, responseObjectWithDifferentFieldNames.propertyNameWithSpaces); + } + + @Override + public int hashCode() { + return Objects.hash(normalPropertyName, UPPER_CASE_PROPERTY_SNAKE, lowerCasePropertyDashes, propertyNameWithSpaces); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseObjectWithDifferentFieldNamesDto {\n"); + sb.append(" normalPropertyName: ").append(toIndentedString(normalPropertyName)).append("\n"); + sb.append(" UPPER_CASE_PROPERTY_SNAKE: ").append(toIndentedString(UPPER_CASE_PROPERTY_SNAKE)).append("\n"); + sb.append(" lowerCasePropertyDashes: ").append(toIndentedString(lowerCasePropertyDashes)).append("\n"); + sb.append(" propertyNameWithSpaces: ").append(toIndentedString(propertyNameWithSpaces)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReturnDto.java new file mode 100644 index 000000000000..68ff365e5acd --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReturnDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing reserved words + */ + +@JsonTypeName("Return") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ReturnDto { + + private @Nullable Integer _return; + + public ReturnDto _return(@Nullable Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + + @JsonProperty("return") + public @Nullable Integer getReturn() { + return _return; + } + + public void setReturn(@Nullable Integer _return) { + this._return = _return; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnDto _return = (ReturnDto) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnDto {\n"); + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java new file mode 100644 index 000000000000..ee5527e5c733 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * SpecialModelNameDto + */ + +@JsonTypeName("_special_model.name_") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class SpecialModelNameDto { + + private @Nullable Long $specialPropertyName; + + public SpecialModelNameDto $specialPropertyName(@Nullable Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + + @JsonProperty("$special[property.name]") + public @Nullable Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(@Nullable Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelNameDto specialModelName = (SpecialModelNameDto) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelNameDto {\n"); + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TagDto.java new file mode 100644 index 000000000000..0de958ebee42 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TagDto.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TagDto + */ + +@JsonTypeName("Tag") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class TagDto { + + private @Nullable Long id; + + private @Nullable String name; + + public TagDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public TagDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagDto tag = (TagDto) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java new file mode 100644 index 000000000000..e874605be925 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -0,0 +1,192 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderDefaultDto + */ + +@JsonTypeName("TypeHolderDefault") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class TypeHolderDefaultDto { + + private String stringItem = "what"; + + private BigDecimal numberItem = new BigDecimal("1.234"); + + private Integer integerItem = -2; + + private Boolean boolItem = true; + + + private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + + public TypeHolderDefaultDto() { + super(); + } + + public TypeHolderDefaultDto stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @NotNull + @JsonProperty("string_item") + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefaultDto numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefaultDto integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @NotNull + @JsonProperty("integer_item") + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefaultDto boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @NotNull + @JsonProperty("bool_item") + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefaultDto arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefaultDto addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @NotNull + @JsonProperty("array_item") + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefaultDto typeHolderDefault = (TypeHolderDefaultDto) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefaultDto {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java new file mode 100644 index 000000000000..917bff15c1da --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -0,0 +1,215 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderExampleDto + */ + +@JsonTypeName("TypeHolderExample") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class TypeHolderExampleDto { + + private String stringItem; + + private BigDecimal numberItem; + + private Float floatItem; + + private Integer integerItem; + + private Boolean boolItem; + + + private List arrayItem = new ArrayList<>(); + + public TypeHolderExampleDto() { + super(); + } + + public TypeHolderExampleDto stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @NotNull + @JsonProperty("string_item") + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExampleDto numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExampleDto floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @NotNull + @JsonProperty("float_item") + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExampleDto integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @NotNull + @JsonProperty("integer_item") + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExampleDto boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @NotNull + @JsonProperty("bool_item") + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExampleDto arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExampleDto addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList<>(); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @NotNull + @JsonProperty("array_item") + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExampleDto typeHolderExample = (TypeHolderExampleDto) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExampleDto {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/UserDto.java new file mode 100644 index 000000000000..b367afd46957 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/UserDto.java @@ -0,0 +1,244 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * UserDto + */ + +@JsonTypeName("User") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class UserDto { + + private @Nullable Long id; + + private @Nullable String username; + + private @Nullable String firstName; + + private @Nullable String lastName; + + private @Nullable String email; + + private @Nullable String password; + + private @Nullable String phone; + + private @Nullable Integer userStatus; + + public UserDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public UserDto username(@Nullable String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + + @JsonProperty("username") + public @Nullable String getUsername() { + return username; + } + + public void setUsername(@Nullable String username) { + this.username = username; + } + + public UserDto firstName(@Nullable String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + + @JsonProperty("firstName") + public @Nullable String getFirstName() { + return firstName; + } + + public void setFirstName(@Nullable String firstName) { + this.firstName = firstName; + } + + public UserDto lastName(@Nullable String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + + @JsonProperty("lastName") + public @Nullable String getLastName() { + return lastName; + } + + public void setLastName(@Nullable String lastName) { + this.lastName = lastName; + } + + public UserDto email(@Nullable String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + + @JsonProperty("email") + public @Nullable String getEmail() { + return email; + } + + public void setEmail(@Nullable String email) { + this.email = email; + } + + public UserDto password(@Nullable String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + + @JsonProperty("password") + public @Nullable String getPassword() { + return password; + } + + public void setPassword(@Nullable String password) { + this.password = password; + } + + public UserDto phone(@Nullable String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + + @JsonProperty("phone") + public @Nullable String getPhone() { + return phone; + } + + public void setPhone(@Nullable String phone) { + this.phone = phone; + } + + public UserDto userStatus(@Nullable Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + + @JsonProperty("userStatus") + public @Nullable Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(@Nullable Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserDto user = (UserDto) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/XmlItemDto.java new file mode 100644 index 000000000000..9f2473a6f2f2 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/XmlItemDto.java @@ -0,0 +1,812 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * XmlItemDto + */ + +@JsonTypeName("XmlItem") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class XmlItemDto { + + private @Nullable String attributeString; + + private @Nullable BigDecimal attributeNumber; + + private @Nullable Integer attributeInteger; + + private @Nullable Boolean attributeBoolean; + + + private List wrappedArray = new ArrayList<>(); + + private @Nullable String nameString; + + private @Nullable BigDecimal nameNumber; + + private @Nullable Integer nameInteger; + + private @Nullable Boolean nameBoolean; + + + private List nameArray = new ArrayList<>(); + + + private List nameWrappedArray = new ArrayList<>(); + + private @Nullable String prefixString; + + private @Nullable BigDecimal prefixNumber; + + private @Nullable Integer prefixInteger; + + private @Nullable Boolean prefixBoolean; + + + private List prefixArray = new ArrayList<>(); + + + private List prefixWrappedArray = new ArrayList<>(); + + private @Nullable String namespaceString; + + private @Nullable BigDecimal namespaceNumber; + + private @Nullable Integer namespaceInteger; + + private @Nullable Boolean namespaceBoolean; + + + private List namespaceArray = new ArrayList<>(); + + + private List namespaceWrappedArray = new ArrayList<>(); + + private @Nullable String prefixNsString; + + private @Nullable BigDecimal prefixNsNumber; + + private @Nullable Integer prefixNsInteger; + + private @Nullable Boolean prefixNsBoolean; + + + private List prefixNsArray = new ArrayList<>(); + + + private List prefixNsWrappedArray = new ArrayList<>(); + + public XmlItemDto attributeString(@Nullable String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + + @JsonProperty("attribute_string") + public @Nullable String getAttributeString() { + return attributeString; + } + + public void setAttributeString(@Nullable String attributeString) { + this.attributeString = attributeString; + } + + public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + + @JsonProperty("attribute_number") + public @Nullable BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(@Nullable BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItemDto attributeInteger(@Nullable Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + + @JsonProperty("attribute_integer") + public @Nullable Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(@Nullable Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItemDto attributeBoolean(@Nullable Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + + @JsonProperty("attribute_boolean") + public @Nullable Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(@Nullable Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItemDto wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItemDto addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + + @JsonProperty("wrapped_array") + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItemDto nameString(@Nullable String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + + @JsonProperty("name_string") + public @Nullable String getNameString() { + return nameString; + } + + public void setNameString(@Nullable String nameString) { + this.nameString = nameString; + } + + public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + + @JsonProperty("name_number") + public @Nullable BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(@Nullable BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItemDto nameInteger(@Nullable Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + + @JsonProperty("name_integer") + public @Nullable Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(@Nullable Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItemDto nameBoolean(@Nullable Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + + @JsonProperty("name_boolean") + public @Nullable Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(@Nullable Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItemDto nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItemDto addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + + @JsonProperty("name_array") + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItemDto nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItemDto addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + + @JsonProperty("name_wrapped_array") + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItemDto prefixString(@Nullable String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + + @JsonProperty("prefix_string") + public @Nullable String getPrefixString() { + return prefixString; + } + + public void setPrefixString(@Nullable String prefixString) { + this.prefixString = prefixString; + } + + public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + + @JsonProperty("prefix_number") + public @Nullable BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(@Nullable BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItemDto prefixInteger(@Nullable Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + + @JsonProperty("prefix_integer") + public @Nullable Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(@Nullable Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItemDto prefixBoolean(@Nullable Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + + @JsonProperty("prefix_boolean") + public @Nullable Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(@Nullable Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItemDto prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItemDto addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + + @JsonProperty("prefix_array") + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItemDto prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItemDto addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + + @JsonProperty("prefix_wrapped_array") + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItemDto namespaceString(@Nullable String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + + @JsonProperty("namespace_string") + public @Nullable String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(@Nullable String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + + @JsonProperty("namespace_number") + public @Nullable BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(@Nullable BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItemDto namespaceInteger(@Nullable Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + + @JsonProperty("namespace_integer") + public @Nullable Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(@Nullable Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItemDto namespaceBoolean(@Nullable Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + + @JsonProperty("namespace_boolean") + public @Nullable Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(@Nullable Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItemDto namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItemDto addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + + @JsonProperty("namespace_array") + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItemDto namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItemDto addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + + @JsonProperty("namespace_wrapped_array") + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItemDto prefixNsString(@Nullable String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + + @JsonProperty("prefix_ns_string") + public @Nullable String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(@Nullable String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItemDto prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + + @JsonProperty("prefix_ns_number") + public @Nullable BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(@Nullable BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItemDto prefixNsInteger(@Nullable Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + + @JsonProperty("prefix_ns_integer") + public @Nullable Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(@Nullable Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItemDto prefixNsBoolean(@Nullable Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + + @JsonProperty("prefix_ns_boolean") + public @Nullable Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(@Nullable Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItemDto prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItemDto addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + + @JsonProperty("prefix_ns_array") + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItemDto prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItemDto addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + + @JsonProperty("prefix_ns_wrapped_array") + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItemDto xmlItem = (XmlItemDto) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItemDto {\n"); + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + From f3834006d564d0767c37db6a54945df1213fb5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Tue, 3 Feb 2026 16:23:22 +0100 Subject: [PATCH 03/17] generate sample files --- .../.openapi-generator/FILES | 1 - .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../main/java/org/openapitools/model/Pet.java | 8 +- .../.openapi-generator-ignore | 23 - .../.openapi-generator/FILES | 60 -- .../.openapi-generator/VERSION | 1 - .../README.md | 21 - .../spring-http-interface-validation/pom.xml | 76 -- .../org/openapitools/api/AnotherFakeApi.java | 40 - .../java/org/openapitools/api/FakeApi.java | 378 -------- .../api/FakeClassnameTags123Api.java | 40 - .../java/org/openapitools/api/PetApi.java | 225 ----- .../java/org/openapitools/api/StoreApi.java | 95 -- .../java/org/openapitools/api/UserApi.java | 171 ---- .../HttpInterfacesAbstractConfigurator.java | 65 -- .../model/AdditionalPropertiesAnyTypeDto.java | 127 --- .../model/AdditionalPropertiesArrayDto.java | 128 --- .../model/AdditionalPropertiesBooleanDto.java | 127 --- .../model/AdditionalPropertiesClassDto.java | 403 --------- .../model/AdditionalPropertiesIntegerDto.java | 127 --- .../model/AdditionalPropertiesNumberDto.java | 128 --- .../model/AdditionalPropertiesObjectDto.java | 128 --- .../model/AdditionalPropertiesStringDto.java | 127 --- .../org/openapitools/model/AnimalDto.java | 123 --- .../openapitools/model/ApiResponseDto.java | 129 --- .../model/ArrayOfArrayOfNumberOnlyDto.java | 96 --- .../model/ArrayOfNumberOnlyDto.java | 96 --- .../org/openapitools/model/ArrayTestDto.java | 160 ---- .../org/openapitools/model/BigCatDto.java | 149 ---- .../openapitools/model/CapitalizationDto.java | 198 ----- .../java/org/openapitools/model/CatDto.java | 111 --- .../org/openapitools/model/CategoryDto.java | 110 --- .../model/ChildWithNullableDto.java | 114 --- .../org/openapitools/model/ClassModelDto.java | 83 -- .../org/openapitools/model/ClientDto.java | 83 -- .../model/ContainerDefaultValueDto.java | 208 ----- .../java/org/openapitools/model/DogDto.java | 104 --- .../org/openapitools/model/EnumArraysDto.java | 189 ---- .../org/openapitools/model/EnumClassDto.java | 56 -- .../org/openapitools/model/EnumTestDto.java | 325 ------- .../java/org/openapitools/model/FileDto.java | 83 -- .../model/FileSchemaTestClassDto.java | 119 --- .../org/openapitools/model/FormatTestDto.java | 404 --------- .../model/HasOnlyReadOnlyDto.java | 106 --- .../java/org/openapitools/model/ListDto.java | 83 -- .../org/openapitools/model/MapTestDto.java | 226 ----- ...ertiesAndAdditionalPropertiesClassDto.java | 145 ---- .../model/Model200ResponseDto.java | 106 --- .../java/org/openapitools/model/NameDto.java | 156 ---- .../model/NullableMapPropertyDto.java | 108 --- .../org/openapitools/model/NumberOnlyDto.java | 84 -- .../java/org/openapitools/model/OrderDto.java | 239 ------ .../openapitools/model/OuterCompositeDto.java | 130 --- .../org/openapitools/model/OuterEnumDto.java | 56 -- .../model/ParentWithNullableDto.java | 165 ---- .../java/org/openapitools/model/PetDto.java | 274 ------ .../openapitools/model/ReadOnlyFirstDto.java | 106 --- ...ponseObjectWithDifferentFieldNamesDto.java | 152 ---- .../org/openapitools/model/ReturnDto.java | 83 -- .../model/SpecialModelNameDto.java | 83 -- .../java/org/openapitools/model/TagDto.java | 106 --- .../model/TypeHolderDefaultDto.java | 192 ----- .../model/TypeHolderExampleDto.java | 215 ----- .../java/org/openapitools/model/UserDto.java | 244 ------ .../org/openapitools/model/XmlItemDto.java | 812 ------------------ 66 files changed, 13 insertions(+), 9315 deletions(-) delete mode 100644 samples/client/petstore/spring-http-interface-validation/.openapi-generator-ignore delete mode 100644 samples/client/petstore/spring-http-interface-validation/.openapi-generator/FILES delete mode 100644 samples/client/petstore/spring-http-interface-validation/.openapi-generator/VERSION delete mode 100644 samples/client/petstore/spring-http-interface-validation/README.md delete mode 100644 samples/client/petstore/spring-http-interface-validation/pom.xml delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeApi.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/PetApi.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/StoreApi.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/UserApi.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AnimalDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ApiResponseDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayTestDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/BigCatDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CapitalizationDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CatDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CategoryDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClassModelDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClientDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/DogDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumArraysDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumClassDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumTestDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FormatTestDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ListDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MapTestDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NameDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OrderDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterEnumDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/PetDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReturnDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TagDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/UserDto.java delete mode 100644 samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/XmlItemDto.java diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES index 52a5fc801199..f91496ca5b57 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/api/AnotherFakeApi.java diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java index 4f7744ff2853..22c12d58e889 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java @@ -31,7 +31,7 @@ public class ArrayTest { private List> arrayArrayOfInteger = new ArrayList<>(); - private List> arrayArrayOfModel = new ArrayList<>(); + private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -87,12 +87,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -106,11 +106,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO */ @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 760bb00ffa09..6305f0a7aab0 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -27,7 +27,7 @@ public class FileSchemaTestClass { private @Nullable File file; - private List<@Valid File> files = new ArrayList<>(); + private List files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { this.file = file; @@ -48,7 +48,7 @@ public void setFile(@Nullable File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -67,11 +67,11 @@ public FileSchemaTestClass addFilesItem(File filesItem) { */ @JsonProperty("files") - public List<@Valid File> getFiles() { + public List getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java index e58c60a29885..ca016e033b07 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java @@ -39,7 +39,7 @@ public class Pet { private Set photoUrls = new LinkedHashSet<>(); - private List<@Valid Tag> tags = new ArrayList<>(); + private List tags = new ArrayList<>(); /** * pet status in the store @@ -178,7 +178,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,11 +197,11 @@ public Pet addTagsItem(Tag tagsItem) { */ @JsonProperty("tags") - public List<@Valid Tag> getTags() { + public List getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } diff --git a/samples/client/petstore/spring-http-interface-validation/.openapi-generator-ignore b/samples/client/petstore/spring-http-interface-validation/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/spring-http-interface-validation/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-validation/.openapi-generator/FILES deleted file mode 100644 index c1c311163fa2..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/.openapi-generator/FILES +++ /dev/null @@ -1,60 +0,0 @@ -.openapi-generator-ignore -README.md -pom.xml -src/main/java/org/openapitools/api/AnotherFakeApi.java -src/main/java/org/openapitools/api/FakeApi.java -src/main/java/org/openapitools/api/FakeClassnameTags123Api.java -src/main/java/org/openapitools/api/PetApi.java -src/main/java/org/openapitools/api/StoreApi.java -src/main/java/org/openapitools/api/UserApi.java -src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java -src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java -src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java -src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java -src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java -src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java -src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java -src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java -src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java -src/main/java/org/openapitools/model/AnimalDto.java -src/main/java/org/openapitools/model/ApiResponseDto.java -src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java -src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java -src/main/java/org/openapitools/model/ArrayTestDto.java -src/main/java/org/openapitools/model/BigCatDto.java -src/main/java/org/openapitools/model/CapitalizationDto.java -src/main/java/org/openapitools/model/CatDto.java -src/main/java/org/openapitools/model/CategoryDto.java -src/main/java/org/openapitools/model/ChildWithNullableDto.java -src/main/java/org/openapitools/model/ClassModelDto.java -src/main/java/org/openapitools/model/ClientDto.java -src/main/java/org/openapitools/model/ContainerDefaultValueDto.java -src/main/java/org/openapitools/model/DogDto.java -src/main/java/org/openapitools/model/EnumArraysDto.java -src/main/java/org/openapitools/model/EnumClassDto.java -src/main/java/org/openapitools/model/EnumTestDto.java -src/main/java/org/openapitools/model/FileDto.java -src/main/java/org/openapitools/model/FileSchemaTestClassDto.java -src/main/java/org/openapitools/model/FormatTestDto.java -src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java -src/main/java/org/openapitools/model/ListDto.java -src/main/java/org/openapitools/model/MapTestDto.java -src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java -src/main/java/org/openapitools/model/Model200ResponseDto.java -src/main/java/org/openapitools/model/NameDto.java -src/main/java/org/openapitools/model/NullableMapPropertyDto.java -src/main/java/org/openapitools/model/NumberOnlyDto.java -src/main/java/org/openapitools/model/OrderDto.java -src/main/java/org/openapitools/model/OuterCompositeDto.java -src/main/java/org/openapitools/model/OuterEnumDto.java -src/main/java/org/openapitools/model/ParentWithNullableDto.java -src/main/java/org/openapitools/model/PetDto.java -src/main/java/org/openapitools/model/ReadOnlyFirstDto.java -src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java -src/main/java/org/openapitools/model/ReturnDto.java -src/main/java/org/openapitools/model/SpecialModelNameDto.java -src/main/java/org/openapitools/model/TagDto.java -src/main/java/org/openapitools/model/TypeHolderDefaultDto.java -src/main/java/org/openapitools/model/TypeHolderExampleDto.java -src/main/java/org/openapitools/model/UserDto.java -src/main/java/org/openapitools/model/XmlItemDto.java diff --git a/samples/client/petstore/spring-http-interface-validation/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-validation/.openapi-generator/VERSION deleted file mode 100644 index 193a12d6e891..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.20.0-SNAPSHOT diff --git a/samples/client/petstore/spring-http-interface-validation/README.md b/samples/client/petstore/spring-http-interface-validation/README.md deleted file mode 100644 index d947e03a2484..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# OpenAPI generated API stub - -[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface) - - -## Overview -This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. -By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. -This is an example of building API stub interfaces in Java using the Spring framework. - -The stubs generated can be used in your existing Spring application for HTTP integration with other REST services -To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor -```java -@Configuration -public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { - - public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance - super(myWebClient); - } -} -``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-validation/pom.xml b/samples/client/petstore/spring-http-interface-validation/pom.xml deleted file mode 100644 index 6d581f4de4fb..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - 4.0.0 - org.openapitools - spring-http-interface - jar - spring-http-interface - 1.0.0-SNAPSHOT - - 17 - UTF-8 - - - org.springframework.boot - spring-boot-starter-parent - 3.1.3 - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - ${java.version} - ${java.version} - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar-no-fork - - - - - - - - - - org.springframework.boot - spring-boot-starter-webflux - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - jakarta.validation - jakarta.validation-api - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - - - org.openapitools - jackson-databind-nullable - 0.2.8 - - - org.springframework.boot - spring-boot-starter-test - test - - - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java deleted file mode 100644 index 01d1324ff23b..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import org.openapitools.model.ClientDto; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.service.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import jakarta.annotation.Generated; - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public interface AnotherFakeApi { - - /** - * PATCH /another-fake/dummy : To test special tags - * To test special tags and operation ID starting with number - * - * @param clientDto client model (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "PATCH", - value = "/another-fake/dummy", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity call123testSpecialTags( - @RequestBody ClientDto clientDto - ); - -} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeApi.java deleted file mode 100644 index fc8aa14fdf11..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeApi.java +++ /dev/null @@ -1,378 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import java.math.BigDecimal; -import org.openapitools.model.ChildWithNullableDto; -import org.openapitools.model.ClientDto; -import org.springframework.format.annotation.DateTimeFormat; -import org.openapitools.model.FileSchemaTestClassDto; -import java.time.LocalDate; -import java.util.Map; -import org.springframework.lang.Nullable; -import java.time.OffsetDateTime; -import org.openapitools.model.OuterCompositeDto; -import org.openapitools.model.UserDto; -import org.openapitools.model.XmlItemDto; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.service.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import jakarta.annotation.Generated; - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public interface FakeApi { - - /** - * POST /fake/create_xml_item : creates an XmlItem - * this route creates an XmlItem - * - * @param xmlItemDto XmlItem Body (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/fake/create_xml_item", - accept = { "application/json" }, - contentType = "application/xml" - ) - ResponseEntity createXmlItem( - @RequestBody XmlItemDto xmlItemDto - ); - - - /** - * POST /fake/outer/boolean - * Test serialization of outer boolean types - * - * @param body Input boolean as post body (optional) - * @return Output boolean (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/fake/outer/boolean", - accept = { "*/*" }, - contentType = "application/json" - ) - ResponseEntity fakeOuterBooleanSerialize( - @RequestBody(required = false) @Nullable Boolean body - ); - - - /** - * POST /fake/outer/composite - * Test serialization of object with outer number type - * - * @param outerCompositeDto Input composite as post body (optional) - * @return Output composite (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/fake/outer/composite", - accept = { "*/*" }, - contentType = "application/json" - ) - ResponseEntity fakeOuterCompositeSerialize( - @RequestBody(required = false) @Nullable OuterCompositeDto outerCompositeDto - ); - - - /** - * POST /fake/outer/number - * Test serialization of outer number types - * - * @param body Input number as post body (optional) - * @return Output number (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/fake/outer/number", - accept = { "*/*" }, - contentType = "application/json" - ) - ResponseEntity fakeOuterNumberSerialize( - @RequestBody(required = false) @Nullable BigDecimal body - ); - - - /** - * POST /fake/outer/string - * Test serialization of outer string types - * - * @param body Input string as post body (optional) - * @return Output string (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/fake/outer/string", - accept = { "*/*" }, - contentType = "application/json" - ) - ResponseEntity fakeOuterStringSerialize( - @RequestBody(required = false) @Nullable String body - ); - - - /** - * PUT /fake/body-with-file-schema - * For this test, the body for this request much reference a schema named `File`. - * - * @param fileSchemaTestClassDto (required) - * @return Success (status code 200) - */ - @HttpExchange( - method = "PUT", - value = "/fake/body-with-file-schema", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity testBodyWithFileSchema( - @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto - ); - - - /** - * PUT /fake/body-with-query-params - * - * @param query (required) - * @param userDto (required) - * @return Success (status code 200) - */ - @HttpExchange( - method = "PUT", - value = "/fake/body-with-query-params", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity testBodyWithQueryParams( - @RequestParam(value = "query", required = true) String query, - @RequestBody UserDto userDto - ); - - - /** - * PATCH /fake : To test \"client\" model - * To test \"client\" model - * - * @param clientDto client model (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "PATCH", - value = "/fake", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity testClientModel( - @RequestBody ClientDto clientDto - ); - - - /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * @param number None (required) - * @param _double None (required) - * @param patternWithoutDelimiter None (required) - * @param _byte None (required) - * @param integer None (optional) - * @param int32 None (optional) - * @param int64 None (optional) - * @param _float None (optional) - * @param string None (optional) - * @param binary None (optional) - * @param date None (optional) - * @param dateTime None (optional) - * @param password None (optional) - * @param paramCallback None (optional) - * @return Invalid username supplied (status code 400) - * or User not found (status code 404) - */ - @HttpExchange( - method = "POST", - value = "/fake", - accept = { "application/json" }, - contentType = "application/x-www-form-urlencoded" - ) - ResponseEntity testEndpointParameters( - @RequestParam(value = "number", required = true) BigDecimal number, - @RequestParam(value = "double", required = true) Double _double, - @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @RequestParam(value = "byte", required = true) byte[] _byte, - @RequestParam(value = "integer", required = false) Integer integer, - @RequestParam(value = "int32", required = false) Integer int32, - @RequestParam(value = "int64", required = false) Long int64, - @RequestParam(value = "float", required = false) Float _float, - @RequestParam(value = "string", required = false) String string, - @RequestPart(value = "binary", required = false) MultipartFile binary, - @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @RequestParam(value = "password", required = false) String password, - @RequestParam(value = "callback", required = false) String paramCallback - ); - - - /** - * GET /fake : To test enum parameters - * To test enum parameters - * - * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) - * @param enumQueryInteger Query parameter enum test (double) (optional) - * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) - * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @return Invalid request (status code 400) - * or Not found (status code 404) - */ - @HttpExchange( - method = "GET", - value = "/fake", - accept = { "application/json" }, - contentType = "application/x-www-form-urlencoded" - ) - ResponseEntity testEnumParameters( - @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray, - @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, - @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, - @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, - @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @RequestParam(value = "enum_form_string", required = false) String enumFormString - ); - - - /** - * DELETE /fake : Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @return Something wrong (status code 400) - */ - @HttpExchange( - method = "DELETE", - value = "/fake", - accept = { "application/json" } - ) - ResponseEntity testGroupParameters( - @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, - @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup, - @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group - ); - - - /** - * POST /fake/inline-additionalProperties : test inline additionalProperties - * - * - * @param requestBody request body (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/fake/inline-additionalProperties", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity testInlineAdditionalProperties( - @RequestBody Map requestBody - ); - - - /** - * GET /fake/jsonFormData : test json serialization of form data - * - * - * @param param field1 (required) - * @param param2 field2 (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "GET", - value = "/fake/jsonFormData", - accept = { "application/json" }, - contentType = "application/x-www-form-urlencoded" - ) - ResponseEntity testJsonFormData( - @RequestParam(value = "param", required = true) String param, - @RequestParam(value = "param2", required = true) String param2 - ); - - - /** - * POST /fake/nullable : test nullable parent property - * - * - * @param childWithNullableDto request body (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/fake/nullable", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity testNullable( - @RequestBody ChildWithNullableDto childWithNullableDto - ); - - - /** - * PUT /fake/test-query-parameters - * To test the collection format in query parameters - * - * @param pipe (required) - * @param http (required) - * @param url (required) - * @param context (required) - * @return Success (status code 200) - */ - @HttpExchange( - method = "PUT", - value = "/fake/test-query-parameters", - accept = { "application/json" } - ) - ResponseEntity testQueryParameterCollectionFormat( - @RequestParam(value = "pipe", required = true) List pipe, - @RequestParam(value = "http", required = true) List http, - @RequestParam(value = "url", required = true) List url, - @RequestParam(value = "context", required = true) List context - ); - - - /** - * GET /fake/response-with-example - * This endpoint defines an example value for its response schema. - * - * @return Success (status code 200) - */ - @HttpExchange( - method = "GET", - value = "/fake/response-with-example", - accept = { "application/json" } - ) - ResponseEntity testWithResultExample( - - ); - -} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java deleted file mode 100644 index 733c3da6a214..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import org.openapitools.model.ClientDto; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.service.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import jakarta.annotation.Generated; - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public interface FakeClassnameTags123Api { - - /** - * PATCH /fake_classname_test : To test class name in snake case - * To test class name in snake case - * - * @param clientDto client model (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "PATCH", - value = "/fake_classname_test", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity testClassname( - @RequestBody ClientDto clientDto - ); - -} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/PetApi.java deleted file mode 100644 index 1e123cf725a0..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/PetApi.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import org.openapitools.model.ApiResponseDto; -import org.springframework.lang.Nullable; -import org.openapitools.model.PetDto; -import org.openapitools.model.ResponseObjectWithDifferentFieldNamesDto; -import java.util.Set; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.service.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import jakarta.annotation.Generated; - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public interface PetApi { - - /** - * POST /pet : Add a new pet to the store - * - * - * @param petDto Pet object that needs to be added to the store (required) - * @return successful operation (status code 200) - * or Invalid input (status code 405) - */ - @HttpExchange( - method = "POST", - value = "/pet", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity addPet( - @RequestBody PetDto petDto - ); - - - /** - * DELETE /pet/{petId} : Deletes a pet - * - * - * @param petId Pet id to delete (required) - * @param apiKey (optional) - * @return successful operation (status code 200) - * or Invalid pet value (status code 400) - */ - @HttpExchange( - method = "DELETE", - value = "/pet/{petId}", - accept = { "application/json" } - ) - ResponseEntity deletePet( - @PathVariable("petId") Long petId, - @RequestHeader(value = "api_key", required = false) @Nullable String apiKey - ); - - - /** - * GET /pet/findByStatus : Finds Pets by status - * Multiple status values can be provided with comma separated strings - * - * @param status Status values that need to be considered for filter (required) - * @return successful operation (status code 200) - * or Invalid status value (status code 400) - */ - @HttpExchange( - method = "GET", - value = "/pet/findByStatus", - accept = { "application/json", "application/xml" } - ) - ResponseEntity> findPetsByStatus( - @RequestParam(value = "status", required = true) List status - ); - - - /** - * GET /pet/findByTags : Finds Pets by tags - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * @param tags Tags to filter by (required) - * @return successful operation (status code 200) - * or Invalid tag value (status code 400) - * @deprecated - */ - @Deprecated - @HttpExchange( - method = "GET", - value = "/pet/findByTags", - accept = { "application/json", "application/xml" } - ) - ResponseEntity> findPetsByTags( - @RequestParam(value = "tags", required = true) Set tags - ); - - - /** - * GET /pet/{petId} : Find pet by ID - * Returns a single pet - * - * @param petId ID of pet to return (required) - * @return successful operation (status code 200) - * or Invalid ID supplied (status code 400) - * or Pet not found (status code 404) - */ - @HttpExchange( - method = "GET", - value = "/pet/{petId}", - accept = { "application/json", "application/xml" } - ) - ResponseEntity getPetById( - @PathVariable("petId") Long petId - ); - - - /** - * GET /fake/{petId}/response-object-different-names - * - * @param petId ID of pet to update (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "GET", - value = "/fake/{petId}/response-object-different-names", - accept = { "application/json" } - ) - ResponseEntity responseObjectDifferentNames( - @PathVariable("petId") Long petId - ); - - - /** - * PUT /pet : Update an existing pet - * - * - * @param petDto Pet object that needs to be added to the store (required) - * @return successful operation (status code 200) - * or Invalid ID supplied (status code 400) - * or Pet not found (status code 404) - * or Validation exception (status code 405) - */ - @HttpExchange( - method = "PUT", - value = "/pet", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity updatePet( - @RequestBody PetDto petDto - ); - - - /** - * POST /pet/{petId} : Updates a pet in the store with form data - * - * - * @param petId ID of pet that needs to be updated (required) - * @param name Updated name of the pet (optional) - * @param status Updated status of the pet (optional) - * @return Invalid input (status code 405) - */ - @HttpExchange( - method = "POST", - value = "/pet/{petId}", - accept = { "application/json" }, - contentType = "application/x-www-form-urlencoded" - ) - ResponseEntity updatePetWithForm( - @PathVariable("petId") Long petId, - @RequestParam(value = "name", required = false) String name, - @RequestParam(value = "status", required = false) String status - ); - - - /** - * POST /pet/{petId}/uploadImage : uploads an image - * - * - * @param petId ID of pet to update (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param file file to upload (optional) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/pet/{petId}/uploadImage", - accept = { "application/json" }, - contentType = "multipart/form-data" - ) - ResponseEntity uploadFile( - @PathVariable("petId") Long petId, - @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, - @RequestPart(value = "file", required = false) MultipartFile file - ); - - - /** - * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) - * - * - * @param petId ID of pet to update (required) - * @param requiredFile file to upload (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/fake/{petId}/uploadImageWithRequiredFile", - accept = { "application/json" }, - contentType = "multipart/form-data" - ) - ResponseEntity uploadFileWithRequiredFile( - @PathVariable("petId") Long petId, - @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata - ); - -} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/StoreApi.java deleted file mode 100644 index 6bcb815d5b5a..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/StoreApi.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import java.util.Map; -import org.openapitools.model.OrderDto; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.service.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import jakarta.annotation.Generated; - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public interface StoreApi { - - /** - * DELETE /store/order/{order_id} : Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * @param orderId ID of the order that needs to be deleted (required) - * @return Invalid ID supplied (status code 400) - * or Order not found (status code 404) - */ - @HttpExchange( - method = "DELETE", - value = "/store/order/{order_id}", - accept = { "application/json" } - ) - ResponseEntity deleteOrder( - @PathVariable("order_id") String orderId - ); - - - /** - * GET /store/inventory : Returns pet inventories by status - * Returns a map of status codes to quantities - * - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "GET", - value = "/store/inventory", - accept = { "application/json" } - ) - ResponseEntity> getInventory( - - ); - - - /** - * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - * - * @param orderId ID of pet that needs to be fetched (required) - * @return successful operation (status code 200) - * or Invalid ID supplied (status code 400) - * or Order not found (status code 404) - */ - @HttpExchange( - method = "GET", - value = "/store/order/{order_id}", - accept = { "application/json", "application/xml" } - ) - ResponseEntity getOrderById( - @PathVariable("order_id") Long orderId - ); - - - /** - * POST /store/order : Place an order for a pet - * - * - * @param orderDto order placed for purchasing the pet (required) - * @return successful operation (status code 200) - * or Invalid Order (status code 400) - */ - @HttpExchange( - method = "POST", - value = "/store/order", - accept = { "application/json", "application/xml" }, - contentType = "application/json" - ) - ResponseEntity placeOrder( - @RequestBody OrderDto orderDto - ); - -} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/UserApi.java deleted file mode 100644 index bc3d07ca6f54..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/api/UserApi.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import java.time.OffsetDateTime; -import org.openapitools.model.UserDto; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.service.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import jakarta.annotation.Generated; - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public interface UserApi { - - /** - * POST /user : Create user - * This can only be done by the logged in user. - * - * @param userDto Created user object (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/user", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity createUser( - @RequestBody UserDto userDto - ); - - - /** - * POST /user/createWithArray : Creates list of users with given input array - * - * - * @param userDto List of user object (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/user/createWithArray", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity createUsersWithArrayInput( - @RequestBody List<@Valid UserDto> userDto - ); - - - /** - * POST /user/createWithList : Creates list of users with given input array - * - * - * @param userDto List of user object (required) - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "POST", - value = "/user/createWithList", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity createUsersWithListInput( - @RequestBody List<@Valid UserDto> userDto - ); - - - /** - * DELETE /user/{username} : Delete user - * This can only be done by the logged in user. - * - * @param username The name that needs to be deleted (required) - * @return Invalid username supplied (status code 400) - * or User not found (status code 404) - */ - @HttpExchange( - method = "DELETE", - value = "/user/{username}", - accept = { "application/json" } - ) - ResponseEntity deleteUser( - @PathVariable("username") String username - ); - - - /** - * GET /user/{username} : Get user by user name - * - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return successful operation (status code 200) - * or Invalid username supplied (status code 400) - * or User not found (status code 404) - */ - @HttpExchange( - method = "GET", - value = "/user/{username}", - accept = { "application/json", "application/xml" } - ) - ResponseEntity getUserByName( - @PathVariable("username") String username - ); - - - /** - * GET /user/login : Logs user into the system - * - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @return successful operation (status code 200) - * or Invalid username/password supplied (status code 400) - */ - @HttpExchange( - method = "GET", - value = "/user/login", - accept = { "application/json", "application/xml" } - ) - ResponseEntity loginUser( - @RequestParam(value = "username", required = true) String username, - @RequestParam(value = "password", required = true) String password - ); - - - /** - * GET /user/logout : Logs out current logged in user session - * - * - * @return successful operation (status code 200) - */ - @HttpExchange( - method = "GET", - value = "/user/logout", - accept = { "application/json" } - ) - ResponseEntity logoutUser( - - ); - - - /** - * PUT /user/{username} : Updated user - * This can only be done by the logged in user. - * - * @param username name that need to be deleted (required) - * @param userDto Updated user object (required) - * @return Invalid user supplied (status code 400) - * or User not found (status code 404) - */ - @HttpExchange( - method = "PUT", - value = "/user/{username}", - accept = { "application/json" }, - contentType = "application/json" - ) - ResponseEntity updateUser( - @PathVariable("username") String username, - @RequestBody UserDto userDto - ); - -} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java deleted file mode 100644 index f9e6dca33a9a..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ /dev/null @@ -1,65 +0,0 @@ -/* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ -package org.openapitools.configuration; - -import org.openapitools.api.AnotherFakeApi; -import org.openapitools.api.FakeApi; -import org.openapitools.api.FakeClassnameTags123Api; -import org.openapitools.api.PetApi; -import org.openapitools.api.StoreApi; -import org.openapitools.api.UserApi; - -import org.springframework.context.annotation.Bean; -import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.web.reactive.function.client.support.WebClientAdapter; -import org.springframework.web.service.invoker.HttpServiceProxyFactory; - -public abstract class HttpInterfacesAbstractConfigurator { - - private final WebClient webClient; - - public HttpInterfacesAbstractConfigurator(final WebClient webClient) { - this.webClient = webClient; - } - - @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") - AnotherFakeApi anotherFakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); - return factory.createClient(AnotherFakeApi.class); - } - - @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") - FakeApi fakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); - return factory.createClient(FakeApi.class); - } - - @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") - FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); - return factory.createClient(FakeClassnameTags123Api.class); - } - - @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") - PetApi petHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); - return factory.createClient(PetApi.class); - } - - @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") - StoreApi storeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); - return factory.createClient(StoreApi.class); - } - - @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") - UserApi userHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); - return factory.createClient(UserApi.class); - } - - -} diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java deleted file mode 100644 index 3e02dfb50ca5..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -/** - * AdditionalPropertiesAnyTypeDto - */ - -@JsonTypeName("AdditionalPropertiesAnyType") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AdditionalPropertiesAnyTypeDto { - - private @Nullable String name; - - public AdditionalPropertiesAnyTypeDto name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - @JsonAnySetter - public AdditionalPropertiesAnyTypeDto putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyTypeDto additionalPropertiesAnyType = (AdditionalPropertiesAnyTypeDto) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - Objects.equals(this.additionalProperties, additionalPropertiesAnyType.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesAnyTypeDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java deleted file mode 100644 index 497bd9eb1285..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -/** - * AdditionalPropertiesArrayDto - */ - -@JsonTypeName("AdditionalPropertiesArray") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AdditionalPropertiesArrayDto { - - private @Nullable String name; - - public AdditionalPropertiesArrayDto name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - @JsonAnySetter - public AdditionalPropertiesArrayDto putAdditionalProperty(String key, List value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public List getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArrayDto additionalPropertiesArray = (AdditionalPropertiesArrayDto) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - Objects.equals(this.additionalProperties, additionalPropertiesArray.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesArrayDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java deleted file mode 100644 index 60a45b5ed9cc..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -/** - * AdditionalPropertiesBooleanDto - */ - -@JsonTypeName("AdditionalPropertiesBoolean") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AdditionalPropertiesBooleanDto { - - private @Nullable String name; - - public AdditionalPropertiesBooleanDto name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - @JsonAnySetter - public AdditionalPropertiesBooleanDto putAdditionalProperty(String key, Boolean value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Boolean getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBooleanDto additionalPropertiesBoolean = (AdditionalPropertiesBooleanDto) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - Objects.equals(this.additionalProperties, additionalPropertiesBoolean.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesBooleanDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java deleted file mode 100644 index 629426ed1bcf..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ /dev/null @@ -1,403 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import org.springframework.lang.Nullable; -import java.util.NoSuchElementException; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * AdditionalPropertiesClassDto - */ - -@JsonTypeName("AdditionalPropertiesClass") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AdditionalPropertiesClassDto { - - - private Map mapString = new HashMap<>(); - - - private Map mapNumber = new HashMap<>(); - - - private Map mapInteger = new HashMap<>(); - - - private Map mapBoolean = new HashMap<>(); - - - private Map> mapArrayInteger = new HashMap<>(); - - - private Map> mapArrayAnytype = new HashMap<>(); - - - private Map> mapMapString = new HashMap<>(); - - - private Map> mapMapAnytype = new HashMap<>(); - - private @Nullable Object anytype1; - - private JsonNullable anytype2 = JsonNullable.undefined(); - - private @Nullable Object anytype3; - - public AdditionalPropertiesClassDto mapString(Map mapString) { - this.mapString = mapString; - return this; - } - - public AdditionalPropertiesClassDto putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); - } - this.mapString.put(key, mapStringItem); - return this; - } - - /** - * Get mapString - * @return mapString - */ - - @JsonProperty("map_string") - public Map getMapString() { - return mapString; - } - - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - public AdditionalPropertiesClassDto mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - return this; - } - - public AdditionalPropertiesClassDto putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); - } - this.mapNumber.put(key, mapNumberItem); - return this; - } - - /** - * Get mapNumber - * @return mapNumber - */ - - @JsonProperty("map_number") - public Map getMapNumber() { - return mapNumber; - } - - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - public AdditionalPropertiesClassDto mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClassDto putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - */ - - @JsonProperty("map_integer") - public Map getMapInteger() { - return mapInteger; - } - - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - public AdditionalPropertiesClassDto mapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClassDto putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - */ - - @JsonProperty("map_boolean") - public Map getMapBoolean() { - return mapBoolean; - } - - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - public AdditionalPropertiesClassDto mapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClassDto putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - */ - - @JsonProperty("map_array_integer") - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - public AdditionalPropertiesClassDto mapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClassDto putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - */ - - @JsonProperty("map_array_anytype") - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - public AdditionalPropertiesClassDto mapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClassDto putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - */ - - @JsonProperty("map_map_string") - public Map> getMapMapString() { - return mapMapString; - } - - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - public AdditionalPropertiesClassDto mapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClassDto putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - */ - - @JsonProperty("map_map_anytype") - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - public AdditionalPropertiesClassDto anytype1(@Nullable Object anytype1) { - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - */ - - @JsonProperty("anytype_1") - public @Nullable Object getAnytype1() { - return anytype1; - } - - public void setAnytype1(@Nullable Object anytype1) { - this.anytype1 = anytype1; - } - - public AdditionalPropertiesClassDto anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); - return this; - } - - /** - * Get anytype2 - * @return anytype2 - */ - - @JsonProperty("anytype_2") - public JsonNullable getAnytype2() { - return anytype2; - } - - public void setAnytype2(JsonNullable anytype2) { - this.anytype2 = anytype2; - } - - public AdditionalPropertiesClassDto anytype3(@Nullable Object anytype3) { - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - */ - - @JsonProperty("anytype_3") - public @Nullable Object getAnytype3() { - return anytype3; - } - - public void setAnytype3(@Nullable Object anytype3) { - this.anytype3 = anytype3; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClassDto additionalPropertiesClass = (AdditionalPropertiesClassDto) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - equalsNullable(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, hashCodeNullable(anytype2), anytype3); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesClassDto {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java deleted file mode 100644 index c566ab2481fc..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -/** - * AdditionalPropertiesIntegerDto - */ - -@JsonTypeName("AdditionalPropertiesInteger") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AdditionalPropertiesIntegerDto { - - private @Nullable String name; - - public AdditionalPropertiesIntegerDto name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - @JsonAnySetter - public AdditionalPropertiesIntegerDto putAdditionalProperty(String key, Integer value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Integer getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesIntegerDto additionalPropertiesInteger = (AdditionalPropertiesIntegerDto) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - Objects.equals(this.additionalProperties, additionalPropertiesInteger.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesIntegerDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java deleted file mode 100644 index 75eda796c3eb..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -/** - * AdditionalPropertiesNumberDto - */ - -@JsonTypeName("AdditionalPropertiesNumber") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AdditionalPropertiesNumberDto { - - private @Nullable String name; - - public AdditionalPropertiesNumberDto name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - @JsonAnySetter - public AdditionalPropertiesNumberDto putAdditionalProperty(String key, BigDecimal value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public BigDecimal getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesNumberDto additionalPropertiesNumber = (AdditionalPropertiesNumberDto) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - Objects.equals(this.additionalProperties, additionalPropertiesNumber.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesNumberDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java deleted file mode 100644 index 1949afe4c581..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -/** - * AdditionalPropertiesObjectDto - */ - -@JsonTypeName("AdditionalPropertiesObject") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AdditionalPropertiesObjectDto { - - private @Nullable String name; - - public AdditionalPropertiesObjectDto name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - @JsonAnySetter - public AdditionalPropertiesObjectDto putAdditionalProperty(String key, Map value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Map getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesObjectDto additionalPropertiesObject = (AdditionalPropertiesObjectDto) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - Objects.equals(this.additionalProperties, additionalPropertiesObject.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesObjectDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java deleted file mode 100644 index 945ba5bfdddf..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -/** - * AdditionalPropertiesStringDto - */ - -@JsonTypeName("AdditionalPropertiesString") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AdditionalPropertiesStringDto { - - private @Nullable String name; - - public AdditionalPropertiesStringDto name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - @JsonAnySetter - public AdditionalPropertiesStringDto putAdditionalProperty(String key, String value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public String getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesStringDto additionalPropertiesString = (AdditionalPropertiesStringDto) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - Objects.equals(this.additionalProperties, additionalPropertiesString.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesStringDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AnimalDto.java deleted file mode 100644 index 44585b4222f0..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/AnimalDto.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * AnimalDto - */ - -@JsonIgnoreProperties( - value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the className to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat"), - @JsonSubTypes.Type(value = CatDto.class, name = "Cat"), - @JsonSubTypes.Type(value = DogDto.class, name = "Dog") -}) - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class AnimalDto { - - private String className; - - private String color = "red"; - - public AnimalDto() { - super(); - } - - public AnimalDto className(String className) { - this.className = className; - return this; - } - - /** - * Get className - * @return className - */ - @NotNull - @JsonProperty("className") - public String getClassName() { - return className; - } - - public void setClassName(String className) { - this.className = className; - } - - public AnimalDto color(String color) { - this.color = color; - return this; - } - - /** - * Get color - * @return color - */ - - @JsonProperty("color") - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnimalDto animal = (AnimalDto) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalDto {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ApiResponseDto.java deleted file mode 100644 index 937c1814095c..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ApiResponseDto.java +++ /dev/null @@ -1,129 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ApiResponseDto - */ - -@JsonTypeName("ApiResponse") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ApiResponseDto { - - private @Nullable Integer code; - - private @Nullable String type; - - private @Nullable String message; - - public ApiResponseDto code(@Nullable Integer code) { - this.code = code; - return this; - } - - /** - * Get code - * @return code - */ - - @JsonProperty("code") - public @Nullable Integer getCode() { - return code; - } - - public void setCode(@Nullable Integer code) { - this.code = code; - } - - public ApiResponseDto type(@Nullable String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - - @JsonProperty("type") - public @Nullable String getType() { - return type; - } - - public void setType(@Nullable String type) { - this.type = type; - } - - public ApiResponseDto message(@Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @JsonProperty("message") - public @Nullable String getMessage() { - return message; - } - - public void setMessage(@Nullable String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiResponseDto _apiResponse = (ApiResponseDto) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiResponseDto {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java deleted file mode 100644 index 9153e5dac5c9..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ArrayOfArrayOfNumberOnlyDto - */ - -@JsonTypeName("ArrayOfArrayOfNumberOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ArrayOfArrayOfNumberOnlyDto { - - - private List> arrayArrayNumber = new ArrayList<>(); - - public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - public ArrayOfArrayOfNumberOnlyDto addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList<>(); - } - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - /** - * Get arrayArrayNumber - * @return arrayArrayNumber - */ - - @JsonProperty("ArrayArrayNumber") - public List> getArrayArrayNumber() { - return arrayArrayNumber; - } - - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnlyDto arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnlyDto) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnlyDto {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java deleted file mode 100644 index 98ed15a0b184..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ArrayOfNumberOnlyDto - */ - -@JsonTypeName("ArrayOfNumberOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ArrayOfNumberOnlyDto { - - - private List arrayNumber = new ArrayList<>(); - - public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - return this; - } - - public ArrayOfNumberOnlyDto addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList<>(); - } - this.arrayNumber.add(arrayNumberItem); - return this; - } - - /** - * Get arrayNumber - * @return arrayNumber - */ - - @JsonProperty("ArrayNumber") - public List getArrayNumber() { - return arrayNumber; - } - - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnlyDto arrayOfNumberOnly = (ArrayOfNumberOnlyDto) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnlyDto {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayTestDto.java deleted file mode 100644 index 1436e93daaf2..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ArrayTestDto.java +++ /dev/null @@ -1,160 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.model.ReadOnlyFirstDto; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ArrayTestDto - */ - -@JsonTypeName("ArrayTest") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ArrayTestDto { - - - private List arrayOfString = new ArrayList<>(); - - - private List> arrayArrayOfInteger = new ArrayList<>(); - - - private List> arrayArrayOfModel = new ArrayList<>(); - - public ArrayTestDto arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - return this; - } - - public ArrayTestDto addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList<>(); - } - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - /** - * Get arrayOfString - * @return arrayOfString - */ - - @JsonProperty("array_of_string") - public List getArrayOfString() { - return arrayOfString; - } - - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - public ArrayTestDto arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - public ArrayTestDto addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList<>(); - } - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger - */ - - @JsonProperty("array_array_of_integer") - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList<>(); - } - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel - */ - - @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTestDto arrayTest = (ArrayTestDto) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTestDto {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/BigCatDto.java deleted file mode 100644 index f8685bbe513c..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/BigCatDto.java +++ /dev/null @@ -1,149 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.model.CatDto; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * BigCatDto - */ - - -@JsonTypeName("BigCat") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class BigCatDto extends CatDto { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private final String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable KindEnum kind; - - public BigCatDto() { - super(); - } - - public BigCatDto kind(@Nullable KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @JsonProperty("kind") - public @Nullable KindEnum getKind() { - return kind; - } - - public void setKind(@Nullable KindEnum kind) { - this.kind = kind; - } - - - public BigCatDto declawed(Boolean declawed) { - super.declawed(declawed); - return this; - } - - public BigCatDto className(String className) { - super.className(className); - return this; - } - - public BigCatDto color(String color) { - super.color(color); - return this; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatDto bigCat = (BigCatDto) o; - return Objects.equals(this.kind, bigCat.kind) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(kind, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatDto {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CapitalizationDto.java deleted file mode 100644 index 1c7a8b98ae3e..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CapitalizationDto.java +++ /dev/null @@ -1,198 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * CapitalizationDto - */ - -@JsonTypeName("Capitalization") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class CapitalizationDto { - - private @Nullable String smallCamel; - - private @Nullable String capitalCamel; - - private @Nullable String smallSnake; - - private @Nullable String capitalSnake; - - private @Nullable String scAETHFlowPoints; - - private @Nullable String ATT_NAME; - - public CapitalizationDto smallCamel(@Nullable String smallCamel) { - this.smallCamel = smallCamel; - return this; - } - - /** - * Get smallCamel - * @return smallCamel - */ - - @JsonProperty("smallCamel") - public @Nullable String getSmallCamel() { - return smallCamel; - } - - public void setSmallCamel(@Nullable String smallCamel) { - this.smallCamel = smallCamel; - } - - public CapitalizationDto capitalCamel(@Nullable String capitalCamel) { - this.capitalCamel = capitalCamel; - return this; - } - - /** - * Get capitalCamel - * @return capitalCamel - */ - - @JsonProperty("CapitalCamel") - public @Nullable String getCapitalCamel() { - return capitalCamel; - } - - public void setCapitalCamel(@Nullable String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - public CapitalizationDto smallSnake(@Nullable String smallSnake) { - this.smallSnake = smallSnake; - return this; - } - - /** - * Get smallSnake - * @return smallSnake - */ - - @JsonProperty("small_Snake") - public @Nullable String getSmallSnake() { - return smallSnake; - } - - public void setSmallSnake(@Nullable String smallSnake) { - this.smallSnake = smallSnake; - } - - public CapitalizationDto capitalSnake(@Nullable String capitalSnake) { - this.capitalSnake = capitalSnake; - return this; - } - - /** - * Get capitalSnake - * @return capitalSnake - */ - - @JsonProperty("Capital_Snake") - public @Nullable String getCapitalSnake() { - return capitalSnake; - } - - public void setCapitalSnake(@Nullable String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - public CapitalizationDto scAETHFlowPoints(@Nullable String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints - */ - - @JsonProperty("SCA_ETH_Flow_Points") - public @Nullable String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - public void setScAETHFlowPoints(@Nullable String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - public CapitalizationDto ATT_NAME(@Nullable String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - return this; - } - - /** - * Name of the pet - * @return ATT_NAME - */ - - @JsonProperty("ATT_NAME") - public @Nullable String getATTNAME() { - return ATT_NAME; - } - - public void setATTNAME(@Nullable String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapitalizationDto capitalization = (CapitalizationDto) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapitalizationDto {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CatDto.java deleted file mode 100644 index 051efd518e0e..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CatDto.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.model.AnimalDto; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * CatDto - */ - -@JsonIgnoreProperties( - value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the className to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") -}) - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class CatDto extends AnimalDto { - - private @Nullable Boolean declawed; - - public CatDto() { - super(); - } - - public CatDto declawed(@Nullable Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @JsonProperty("declawed") - public @Nullable Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(@Nullable Boolean declawed) { - this.declawed = declawed; - } - - - public CatDto className(String className) { - super.className(className); - return this; - } - - public CatDto color(String color) { - super.color(color); - return this; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatDto cat = (CatDto) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatDto {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CategoryDto.java deleted file mode 100644 index fba08710dadf..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/CategoryDto.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * CategoryDto - */ - -@JsonTypeName("Category") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class CategoryDto { - - private @Nullable Long id; - - private String name = "default-name"; - - public CategoryDto() { - super(); - } - - public CategoryDto id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public CategoryDto name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @NotNull - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CategoryDto category = (CategoryDto) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CategoryDto {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java deleted file mode 100644 index 2da557bac29d..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; -import org.openapitools.model.ParentWithNullableDto; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ChildWithNullableDto - */ - - -@JsonTypeName("ChildWithNullable") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ChildWithNullableDto extends ParentWithNullableDto { - - private @Nullable String otherProperty; - - public ChildWithNullableDto otherProperty(@Nullable String otherProperty) { - this.otherProperty = otherProperty; - return this; - } - - /** - * Get otherProperty - * @return otherProperty - */ - - @JsonProperty("otherProperty") - public @Nullable String getOtherProperty() { - return otherProperty; - } - - public void setOtherProperty(@Nullable String otherProperty) { - this.otherProperty = otherProperty; - } - - - public ChildWithNullableDto type(TypeEnum type) { - super.type(type); - return this; - } - - public ChildWithNullableDto nullableProperty(String nullableProperty) { - super.nullableProperty(nullableProperty); - return this; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildWithNullableDto childWithNullable = (ChildWithNullableDto) o; - return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && - super.equals(o); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(otherProperty, super.hashCode()); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChildWithNullableDto {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClassModelDto.java deleted file mode 100644 index f0531a128c3d..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClassModelDto.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * Model for testing model with \"_class\" property - */ - -@JsonTypeName("ClassModel") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ClassModelDto { - - private @Nullable String propertyClass; - - public ClassModelDto propertyClass(@Nullable String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - */ - - @JsonProperty("_class") - public @Nullable String getPropertyClass() { - return propertyClass; - } - - public void setPropertyClass(@Nullable String propertyClass) { - this.propertyClass = propertyClass; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModelDto classModel = (ClassModelDto) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModelDto {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClientDto.java deleted file mode 100644 index a199fc8203ad..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ClientDto.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ClientDto - */ - -@JsonTypeName("Client") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ClientDto { - - private @Nullable String client; - - public ClientDto client(@Nullable String client) { - this.client = client; - return this; - } - - /** - * Get client - * @return client - */ - - @JsonProperty("client") - public @Nullable String getClient() { - return client; - } - - public void setClient(@Nullable String client) { - this.client = client; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClientDto client = (ClientDto) o; - return Objects.equals(this.client, client.client); - } - - @Override - public int hashCode() { - return Objects.hash(client); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClientDto {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java deleted file mode 100644 index 863248d301de..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ /dev/null @@ -1,208 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import org.springframework.lang.Nullable; -import java.util.NoSuchElementException; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ContainerDefaultValueDto - */ - -@JsonTypeName("ContainerDefaultValue") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ContainerDefaultValueDto { - - - private JsonNullable> nullableArray = JsonNullable.>undefined(); - - - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - - - private List requiredArray = new ArrayList<>(); - - - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); - - public ContainerDefaultValueDto() { - super(); - } - - public ContainerDefaultValueDto nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); - return this; - } - - public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { - this.nullableArray = JsonNullable.of(new ArrayList<>()); - } - this.nullableArray.get().add(nullableArrayItem); - return this; - } - - /** - * Get nullableArray - * @return nullableArray - */ - - @JsonProperty("nullable_array") - public JsonNullable> getNullableArray() { - return nullableArray; - } - - public void setNullableArray(JsonNullable> nullableArray) { - this.nullableArray = nullableArray; - } - - public ContainerDefaultValueDto nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); - return this; - } - - public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { - this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); - } - this.nullableRequiredArray.get().add(nullableRequiredArrayItem); - return this; - } - - /** - * Get nullableRequiredArray - * @return nullableRequiredArray - */ - @NotNull - @JsonProperty("nullable_required_array") - public JsonNullable> getNullableRequiredArray() { - return nullableRequiredArray; - } - - public void setNullableRequiredArray(JsonNullable> nullableRequiredArray) { - this.nullableRequiredArray = nullableRequiredArray; - } - - public ContainerDefaultValueDto requiredArray(List requiredArray) { - this.requiredArray = requiredArray; - return this; - } - - public ContainerDefaultValueDto addRequiredArrayItem(String requiredArrayItem) { - if (this.requiredArray == null) { - this.requiredArray = new ArrayList<>(); - } - this.requiredArray.add(requiredArrayItem); - return this; - } - - /** - * Get requiredArray - * @return requiredArray - */ - @NotNull - @JsonProperty("required_array") - public List getRequiredArray() { - return requiredArray; - } - - public void setRequiredArray(List requiredArray) { - this.requiredArray = requiredArray; - } - - public ContainerDefaultValueDto nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); - return this; - } - - public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { - this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); - } - this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); - return this; - } - - /** - * Get nullableArrayWithDefault - * @return nullableArrayWithDefault - */ - - @JsonProperty("nullable_array_with_default") - public JsonNullable> getNullableArrayWithDefault() { - return nullableArrayWithDefault; - } - - public void setNullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { - this.nullableArrayWithDefault = nullableArrayWithDefault; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ContainerDefaultValueDto containerDefaultValue = (ContainerDefaultValueDto) o; - return equalsNullable(this.nullableArray, containerDefaultValue.nullableArray) && - Objects.equals(this.nullableRequiredArray, containerDefaultValue.nullableRequiredArray) && - Objects.equals(this.requiredArray, containerDefaultValue.requiredArray) && - equalsNullable(this.nullableArrayWithDefault, containerDefaultValue.nullableArrayWithDefault); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(hashCodeNullable(nullableArray), nullableRequiredArray, requiredArray, hashCodeNullable(nullableArrayWithDefault)); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ContainerDefaultValueDto {\n"); - sb.append(" nullableArray: ").append(toIndentedString(nullableArray)).append("\n"); - sb.append(" nullableRequiredArray: ").append(toIndentedString(nullableRequiredArray)).append("\n"); - sb.append(" requiredArray: ").append(toIndentedString(requiredArray)).append("\n"); - sb.append(" nullableArrayWithDefault: ").append(toIndentedString(nullableArrayWithDefault)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/DogDto.java deleted file mode 100644 index e66b8b730481..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/DogDto.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.model.AnimalDto; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * DogDto - */ - - -@JsonTypeName("Dog") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class DogDto extends AnimalDto { - - private @Nullable String breed; - - public DogDto() { - super(); - } - - public DogDto breed(@Nullable String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @JsonProperty("breed") - public @Nullable String getBreed() { - return breed; - } - - public void setBreed(@Nullable String breed) { - this.breed = breed; - } - - - public DogDto className(String className) { - super.className(className); - return this; - } - - public DogDto color(String color) { - super.color(color); - return this; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogDto dog = (DogDto) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogDto {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumArraysDto.java deleted file mode 100644 index d638aa2e39ca..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumArraysDto.java +++ /dev/null @@ -1,189 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * EnumArraysDto - */ - -@JsonTypeName("EnumArrays") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class EnumArraysDto { - - /** - * Gets or Sets justSymbol - */ - public enum JustSymbolEnum { - GREATER_THAN_OR_EQUAL_TO(">="), - - DOLLAR("$"); - - private final String value; - - JustSymbolEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable JustSymbolEnum justSymbol; - - /** - * Gets or Sets arrayEnum - */ - public enum ArrayEnumEnum { - FISH("fish"), - - CRAB("crab"); - - private final String value; - - ArrayEnumEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - - private List arrayEnum = new ArrayList<>(); - - public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - return this; - } - - /** - * Get justSymbol - * @return justSymbol - */ - - @JsonProperty("just_symbol") - public @Nullable JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - public void setJustSymbol(@Nullable JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - public EnumArraysDto arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - return this; - } - - public EnumArraysDto addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList<>(); - } - this.arrayEnum.add(arrayEnumItem); - return this; - } - - /** - * Get arrayEnum - * @return arrayEnum - */ - - @JsonProperty("array_enum") - public List getArrayEnum() { - return arrayEnum; - } - - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArraysDto enumArrays = (EnumArraysDto) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArraysDto {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumClassDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumClassDto.java deleted file mode 100644 index 766783743ebe..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumClassDto.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets EnumClass - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public enum EnumClassDto { - - _ABC("_abc"), - - _EFG("-efg"), - - _XYZ_("(xyz)"); - - private final String value; - - EnumClassDto(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumClassDto fromValue(String value) { - for (EnumClassDto b : EnumClassDto.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumTestDto.java deleted file mode 100644 index f22f967bbd04..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/EnumTestDto.java +++ /dev/null @@ -1,325 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.model.OuterEnumDto; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * EnumTestDto - */ - -@JsonTypeName("Enum_Test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class EnumTestDto { - - /** - * Gets or Sets enumString - */ - public enum EnumStringEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private final String value; - - EnumStringEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable EnumStringEnum enumString; - - /** - * Gets or Sets enumStringRequired - */ - public enum EnumStringRequiredEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private final String value; - - EnumStringRequiredEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private EnumStringRequiredEnum enumStringRequired; - - /** - * Gets or Sets enumInteger - */ - public enum EnumIntegerEnum { - NUMBER_1(1), - - NUMBER_MINUS_1(-1); - - private final Integer value; - - EnumIntegerEnum(Integer value) { - this.value = value; - } - - @JsonValue - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable EnumIntegerEnum enumInteger; - - /** - * Gets or Sets enumNumber - */ - public enum EnumNumberEnum { - NUMBER_1_DOT_1(1.1), - - NUMBER_MINUS_1_DOT_2(-1.2); - - private final Double value; - - EnumNumberEnum(Double value) { - this.value = value; - } - - @JsonValue - public Double getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable EnumNumberEnum enumNumber; - - private @Nullable OuterEnumDto outerEnum; - - public EnumTestDto() { - super(); - } - - public EnumTestDto enumString(@Nullable EnumStringEnum enumString) { - this.enumString = enumString; - return this; - } - - /** - * Get enumString - * @return enumString - */ - - @JsonProperty("enum_string") - public @Nullable EnumStringEnum getEnumString() { - return enumString; - } - - public void setEnumString(@Nullable EnumStringEnum enumString) { - this.enumString = enumString; - } - - public EnumTestDto enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - return this; - } - - /** - * Get enumStringRequired - * @return enumStringRequired - */ - @NotNull - @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - public EnumTestDto enumInteger(@Nullable EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - return this; - } - - /** - * Get enumInteger - * @return enumInteger - */ - - @JsonProperty("enum_integer") - public @Nullable EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - public void setEnumInteger(@Nullable EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - public EnumTestDto enumNumber(@Nullable EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - return this; - } - - /** - * Get enumNumber - * @return enumNumber - */ - - @JsonProperty("enum_number") - public @Nullable EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - public EnumTestDto outerEnum(@Nullable OuterEnumDto outerEnum) { - this.outerEnum = outerEnum; - return this; - } - - /** - * Get outerEnum - * @return outerEnum - */ - - @JsonProperty("outerEnum") - public @Nullable OuterEnumDto getOuterEnum() { - return outerEnum; - } - - public void setOuterEnum(@Nullable OuterEnumDto outerEnum) { - this.outerEnum = outerEnum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTestDto enumTest = (EnumTestDto) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTestDto {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); - sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); - sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileDto.java deleted file mode 100644 index 1b4e72e7de4e..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileDto.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * Must be named `File` for test. - */ - -@JsonTypeName("File") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class FileDto { - - private @Nullable String sourceURI; - - public FileDto sourceURI(@Nullable String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - /** - * Test capitalization - * @return sourceURI - */ - - @JsonProperty("sourceURI") - public @Nullable String getSourceURI() { - return sourceURI; - } - - public void setSourceURI(@Nullable String sourceURI) { - this.sourceURI = sourceURI; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileDto file = (FileDto) o; - return Objects.equals(this.sourceURI, file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileDto {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java deleted file mode 100644 index d7867a37d1b9..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.model.FileDto; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * FileSchemaTestClassDto - */ - -@JsonTypeName("FileSchemaTestClass") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class FileSchemaTestClassDto { - - private @Nullable FileDto file; - - - private List<@Valid FileDto> files = new ArrayList<>(); - - public FileSchemaTestClassDto file(@Nullable FileDto file) { - this.file = file; - return this; - } - - /** - * Get file - * @return file - */ - - @JsonProperty("file") - public @Nullable FileDto getFile() { - return file; - } - - public void setFile(@Nullable FileDto file) { - this.file = file; - } - - public FileSchemaTestClassDto files(List<@Valid FileDto> files) { - this.files = files; - return this; - } - - public FileSchemaTestClassDto addFilesItem(FileDto filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Get files - * @return files - */ - - @JsonProperty("files") - public List<@Valid FileDto> getFiles() { - return files; - } - - public void setFiles(List<@Valid FileDto> files) { - this.files = files; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClassDto fileSchemaTestClass = (FileSchemaTestClassDto) o; - return Objects.equals(this.file, fileSchemaTestClass.file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(file, files); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClassDto {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FormatTestDto.java deleted file mode 100644 index c00c48deed87..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/FormatTestDto.java +++ /dev/null @@ -1,404 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * FormatTestDto - */ - -@JsonTypeName("format_test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class FormatTestDto { - - private @Nullable Integer integer; - - private @Nullable Integer int32; - - private @Nullable Long int64; - - private BigDecimal number; - - private @Nullable Float _float; - - private @Nullable Double _double; - - private @Nullable String string; - - private byte[] _byte; - - private @Nullable org.springframework.core.io.Resource binary; - - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; - - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private @Nullable OffsetDateTime dateTime; - - private @Nullable UUID uuid; - - private String password; - - private @Nullable BigDecimal bigDecimal; - - public FormatTestDto() { - super(); - } - - public FormatTestDto integer(@Nullable Integer integer) { - this.integer = integer; - return this; - } - - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer - */ - - @JsonProperty("integer") - public @Nullable Integer getInteger() { - return integer; - } - - public void setInteger(@Nullable Integer integer) { - this.integer = integer; - } - - public FormatTestDto int32(@Nullable Integer int32) { - this.int32 = int32; - return this; - } - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 - */ - - @JsonProperty("int32") - public @Nullable Integer getInt32() { - return int32; - } - - public void setInt32(@Nullable Integer int32) { - this.int32 = int32; - } - - public FormatTestDto int64(@Nullable Long int64) { - this.int64 = int64; - return this; - } - - /** - * Get int64 - * @return int64 - */ - - @JsonProperty("int64") - public @Nullable Long getInt64() { - return int64; - } - - public void setInt64(@Nullable Long int64) { - this.int64 = int64; - } - - public FormatTestDto number(BigDecimal number) { - this.number = number; - return this; - } - - /** - * Get number - * minimum: 32.1 - * maximum: 543.2 - * @return number - */ - @NotNull - @JsonProperty("number") - public BigDecimal getNumber() { - return number; - } - - public void setNumber(BigDecimal number) { - this.number = number; - } - - public FormatTestDto _float(@Nullable Float _float) { - this._float = _float; - return this; - } - - /** - * Get _float - * minimum: 54.3 - * maximum: 987.6 - * @return _float - */ - - @JsonProperty("float") - public @Nullable Float getFloat() { - return _float; - } - - public void setFloat(@Nullable Float _float) { - this._float = _float; - } - - public FormatTestDto _double(@Nullable Double _double) { - this._double = _double; - return this; - } - - /** - * Get _double - * minimum: 67.8 - * maximum: 123.4 - * @return _double - */ - - @JsonProperty("double") - public @Nullable Double getDouble() { - return _double; - } - - public void setDouble(@Nullable Double _double) { - this._double = _double; - } - - public FormatTestDto string(@Nullable String string) { - this.string = string; - return this; - } - - /** - * Get string - * @return string - */ - - @JsonProperty("string") - public @Nullable String getString() { - return string; - } - - public void setString(@Nullable String string) { - this.string = string; - } - - public FormatTestDto _byte(byte[] _byte) { - this._byte = _byte; - return this; - } - - /** - * Get _byte - * @return _byte - */ - @NotNull - @JsonProperty("byte") - public byte[] getByte() { - return _byte; - } - - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - public FormatTestDto binary(@Nullable org.springframework.core.io.Resource binary) { - this.binary = binary; - return this; - } - - /** - * Get binary - * @return binary - */ - - @JsonProperty("binary") - public @Nullable org.springframework.core.io.Resource getBinary() { - return binary; - } - - public void setBinary(@Nullable org.springframework.core.io.Resource binary) { - this.binary = binary; - } - - public FormatTestDto date(LocalDate date) { - this.date = date; - return this; - } - - /** - * Get date - * @return date - */ - @NotNull - @JsonProperty("date") - public LocalDate getDate() { - return date; - } - - public void setDate(LocalDate date) { - this.date = date; - } - - public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - */ - - @JsonProperty("dateTime") - public @Nullable OffsetDateTime getDateTime() { - return dateTime; - } - - public void setDateTime(@Nullable OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - public FormatTestDto uuid(@Nullable UUID uuid) { - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - */ - - @JsonProperty("uuid") - public @Nullable UUID getUuid() { - return uuid; - } - - public void setUuid(@Nullable UUID uuid) { - this.uuid = uuid; - } - - public FormatTestDto password(String password) { - this.password = password; - return this; - } - - /** - * Get password - * @return password - */ - @NotNull - @JsonProperty("password") - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public FormatTestDto bigDecimal(@Nullable BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - return this; - } - - /** - * Get bigDecimal - * @return bigDecimal - */ - - @JsonProperty("BigDecimal") - public @Nullable BigDecimal getBigDecimal() { - return bigDecimal; - } - - public void setBigDecimal(@Nullable BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTestDto formatTest = (FormatTestDto) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTestDto {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" password: ").append("*").append("\n"); - sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java deleted file mode 100644 index f70bfcfb3b3a..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * HasOnlyReadOnlyDto - */ - -@JsonTypeName("hasOnlyReadOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class HasOnlyReadOnlyDto { - - private @Nullable String bar; - - private @Nullable String foo; - - public HasOnlyReadOnlyDto bar(@Nullable String bar) { - this.bar = bar; - return this; - } - - /** - * Get bar - * @return bar - */ - - @JsonProperty("bar") - public @Nullable String getBar() { - return bar; - } - - public void setBar(@Nullable String bar) { - this.bar = bar; - } - - public HasOnlyReadOnlyDto foo(@Nullable String foo) { - this.foo = foo; - return this; - } - - /** - * Get foo - * @return foo - */ - - @JsonProperty("foo") - public @Nullable String getFoo() { - return foo; - } - - public void setFoo(@Nullable String foo) { - this.foo = foo; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnlyDto hasOnlyReadOnly = (HasOnlyReadOnlyDto) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnlyDto {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ListDto.java deleted file mode 100644 index c155a45c0b6c..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ListDto.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ListDto - */ - -@JsonTypeName("List") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ListDto { - - private @Nullable String _123list; - - public ListDto _123list(@Nullable String _123list) { - this._123list = _123list; - return this; - } - - /** - * Get _123list - * @return _123list - */ - - @JsonProperty("123-list") - public @Nullable String get123list() { - return _123list; - } - - public void set123list(@Nullable String _123list) { - this._123list = _123list; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListDto _list = (ListDto) o; - return Objects.equals(this._123list, _list._123list); - } - - @Override - public int hashCode() { - return Objects.hash(_123list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListDto {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MapTestDto.java deleted file mode 100644 index d585aaf5cb7e..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MapTestDto.java +++ /dev/null @@ -1,226 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * MapTestDto - */ - -@JsonTypeName("MapTest") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class MapTestDto { - - - private Map> mapMapOfString = new HashMap<>(); - - /** - * Gets or Sets inner - */ - public enum InnerEnum { - UPPER("UPPER"), - - LOWER("lower"); - - private final String value; - - InnerEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - - private Map mapOfEnumString = new HashMap<>(); - - - private Map directMap = new HashMap<>(); - - - private Map indirectMap = new HashMap<>(); - - public MapTestDto mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - return this; - } - - public MapTestDto putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap<>(); - } - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - /** - * Get mapMapOfString - * @return mapMapOfString - */ - - @JsonProperty("map_map_of_string") - public Map> getMapMapOfString() { - return mapMapOfString; - } - - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - public MapTestDto mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - return this; - } - - public MapTestDto putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap<>(); - } - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - /** - * Get mapOfEnumString - * @return mapOfEnumString - */ - - @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - public MapTestDto directMap(Map directMap) { - this.directMap = directMap; - return this; - } - - public MapTestDto putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap<>(); - } - this.directMap.put(key, directMapItem); - return this; - } - - /** - * Get directMap - * @return directMap - */ - - @JsonProperty("direct_map") - public Map getDirectMap() { - return directMap; - } - - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - public MapTestDto indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - return this; - } - - public MapTestDto putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap<>(); - } - this.indirectMap.put(key, indirectMapItem); - return this; - } - - /** - * Get indirectMap - * @return indirectMap - */ - - @JsonProperty("indirect_map") - public Map getIndirectMap() { - return indirectMap; - } - - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTestDto mapTest = (MapTestDto) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTestDto {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java deleted file mode 100644 index 69a49c3b06ea..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ /dev/null @@ -1,145 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.openapitools.model.AnimalDto; -import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * MixedPropertiesAndAdditionalPropertiesClassDto - */ - -@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class MixedPropertiesAndAdditionalPropertiesClassDto { - - private @Nullable UUID uuid; - - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private @Nullable OffsetDateTime dateTime; - - - private Map map = new HashMap<>(); - - public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - */ - - @JsonProperty("uuid") - public @Nullable UUID getUuid() { - return uuid; - } - - public void setUuid(@Nullable UUID uuid) { - this.uuid = uuid; - } - - public MixedPropertiesAndAdditionalPropertiesClassDto dateTime(@Nullable OffsetDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - */ - - @JsonProperty("dateTime") - public @Nullable OffsetDateTime getDateTime() { - return dateTime; - } - - public void setDateTime(@Nullable OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - public MixedPropertiesAndAdditionalPropertiesClassDto map(Map map) { - this.map = map; - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClassDto putMapItem(String key, AnimalDto mapItem) { - if (this.map == null) { - this.map = new HashMap<>(); - } - this.map.put(key, mapItem); - return this; - } - - /** - * Get map - * @return map - */ - - @JsonProperty("map") - public Map getMap() { - return map; - } - - public void setMap(Map map) { - this.map = map; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClassDto mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClassDto) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClassDto {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java deleted file mode 100644 index eac1d092c452..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * Model for testing model name starting with number - */ - -@JsonTypeName("200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class Model200ResponseDto { - - private @Nullable Integer name; - - private @Nullable String propertyClass; - - public Model200ResponseDto name(@Nullable Integer name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable Integer getName() { - return name; - } - - public void setName(@Nullable Integer name) { - this.name = name; - } - - public Model200ResponseDto propertyClass(@Nullable String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - */ - - @JsonProperty("class") - public @Nullable String getPropertyClass() { - return propertyClass; - } - - public void setPropertyClass(@Nullable String propertyClass) { - this.propertyClass = propertyClass; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200ResponseDto _200response = (Model200ResponseDto) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200ResponseDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NameDto.java deleted file mode 100644 index 7b04969f2043..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NameDto.java +++ /dev/null @@ -1,156 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * Model for testing model name same as property name - */ - -@JsonTypeName("Name") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class NameDto { - - private Integer name; - - private @Nullable Integer snakeCase; - - private @Nullable String property; - - private @Nullable Integer _123number; - - public NameDto() { - super(); - } - - public NameDto name(Integer name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @NotNull - @JsonProperty("name") - public Integer getName() { - return name; - } - - public void setName(Integer name) { - this.name = name; - } - - public NameDto snakeCase(@Nullable Integer snakeCase) { - this.snakeCase = snakeCase; - return this; - } - - /** - * Get snakeCase - * @return snakeCase - */ - - @JsonProperty("snake_case") - public @Nullable Integer getSnakeCase() { - return snakeCase; - } - - public void setSnakeCase(@Nullable Integer snakeCase) { - this.snakeCase = snakeCase; - } - - public NameDto property(@Nullable String property) { - this.property = property; - return this; - } - - /** - * Get property - * @return property - */ - - @JsonProperty("property") - public @Nullable String getProperty() { - return property; - } - - public void setProperty(@Nullable String property) { - this.property = property; - } - - public NameDto _123number(@Nullable Integer _123number) { - this._123number = _123number; - return this; - } - - /** - * Get _123number - * @return _123number - */ - - @JsonProperty("123Number") - public @Nullable Integer get123number() { - return _123number; - } - - public void set123number(@Nullable Integer _123number) { - this._123number = _123number; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NameDto name = (NameDto) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NameDto {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java deleted file mode 100644 index 13c83d77e9d6..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import org.springframework.lang.Nullable; -import java.util.NoSuchElementException; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * NullableMapPropertyDto - */ - -@JsonTypeName("NullableMapProperty") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class NullableMapPropertyDto { - - - private JsonNullable> languageValues = JsonNullable.>undefined(); - - public NullableMapPropertyDto languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); - return this; - } - - public NullableMapPropertyDto putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { - this.languageValues = JsonNullable.of(new HashMap<>()); - } - this.languageValues.get().put(key, languageValuesItem); - return this; - } - - /** - * Get languageValues - * @return languageValues - */ - - @JsonProperty("languageValues") - public JsonNullable> getLanguageValues() { - return languageValues; - } - - public void setLanguageValues(JsonNullable> languageValues) { - this.languageValues = languageValues; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NullableMapPropertyDto nullableMapProperty = (NullableMapPropertyDto) o; - return equalsNullable(this.languageValues, nullableMapProperty.languageValues); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(hashCodeNullable(languageValues)); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NullableMapPropertyDto {\n"); - sb.append(" languageValues: ").append(toIndentedString(languageValues)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java deleted file mode 100644 index ee1c0fe4d347..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * NumberOnlyDto - */ - -@JsonTypeName("NumberOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class NumberOnlyDto { - - private @Nullable BigDecimal justNumber; - - public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) { - this.justNumber = justNumber; - return this; - } - - /** - * Get justNumber - * @return justNumber - */ - - @JsonProperty("JustNumber") - public @Nullable BigDecimal getJustNumber() { - return justNumber; - } - - public void setJustNumber(@Nullable BigDecimal justNumber) { - this.justNumber = justNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnlyDto numberOnly = (NumberOnlyDto) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - - @Override - public int hashCode() { - return Objects.hash(justNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnlyDto {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OrderDto.java deleted file mode 100644 index 3d3c83438af5..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OrderDto.java +++ /dev/null @@ -1,239 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * OrderDto - */ - -@JsonTypeName("Order") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class OrderDto { - - private @Nullable Long id; - - private @Nullable Long petId; - - private @Nullable Integer quantity; - - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private @Nullable OffsetDateTime shipDate; - - /** - * Order Status - */ - public enum StatusEnum { - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private final String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable StatusEnum status; - - private Boolean complete = false; - - public OrderDto id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public OrderDto petId(@Nullable Long petId) { - this.petId = petId; - return this; - } - - /** - * Get petId - * @return petId - */ - - @JsonProperty("petId") - public @Nullable Long getPetId() { - return petId; - } - - public void setPetId(@Nullable Long petId) { - this.petId = petId; - } - - public OrderDto quantity(@Nullable Integer quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - */ - - @JsonProperty("quantity") - public @Nullable Integer getQuantity() { - return quantity; - } - - public void setQuantity(@Nullable Integer quantity) { - this.quantity = quantity; - } - - public OrderDto shipDate(@Nullable OffsetDateTime shipDate) { - this.shipDate = shipDate; - return this; - } - - /** - * Get shipDate - * @return shipDate - */ - - @JsonProperty("shipDate") - public @Nullable OffsetDateTime getShipDate() { - return shipDate; - } - - public void setShipDate(@Nullable OffsetDateTime shipDate) { - this.shipDate = shipDate; - } - - public OrderDto status(@Nullable StatusEnum status) { - this.status = status; - return this; - } - - /** - * Order Status - * @return status - */ - - @JsonProperty("status") - public @Nullable StatusEnum getStatus() { - return status; - } - - public void setStatus(@Nullable StatusEnum status) { - this.status = status; - } - - public OrderDto complete(Boolean complete) { - this.complete = complete; - return this; - } - - /** - * Get complete - * @return complete - */ - - @JsonProperty("complete") - public Boolean getComplete() { - return complete; - } - - public void setComplete(Boolean complete) { - this.complete = complete; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrderDto order = (OrderDto) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrderDto {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java deleted file mode 100644 index 91acbd9a1f35..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java +++ /dev/null @@ -1,130 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * OuterCompositeDto - */ - -@JsonTypeName("OuterComposite") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class OuterCompositeDto { - - private @Nullable BigDecimal myNumber; - - private @Nullable String myString; - - private @Nullable Boolean myBoolean; - - public OuterCompositeDto myNumber(@Nullable BigDecimal myNumber) { - this.myNumber = myNumber; - return this; - } - - /** - * Get myNumber - * @return myNumber - */ - - @JsonProperty("my_number") - public @Nullable BigDecimal getMyNumber() { - return myNumber; - } - - public void setMyNumber(@Nullable BigDecimal myNumber) { - this.myNumber = myNumber; - } - - public OuterCompositeDto myString(@Nullable String myString) { - this.myString = myString; - return this; - } - - /** - * Get myString - * @return myString - */ - - @JsonProperty("my_string") - public @Nullable String getMyString() { - return myString; - } - - public void setMyString(@Nullable String myString) { - this.myString = myString; - } - - public OuterCompositeDto myBoolean(@Nullable Boolean myBoolean) { - this.myBoolean = myBoolean; - return this; - } - - /** - * Get myBoolean - * @return myBoolean - */ - - @JsonProperty("my_boolean") - public @Nullable Boolean getMyBoolean() { - return myBoolean; - } - - public void setMyBoolean(@Nullable Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterCompositeDto outerComposite = (OuterCompositeDto) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterCompositeDto {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterEnumDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterEnumDto.java deleted file mode 100644 index 38a8d0eb9b4c..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/OuterEnumDto.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnum - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public enum OuterEnumDto { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private final String value; - - OuterEnumDto(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnumDto fromValue(String value) { - for (OuterEnumDto b : OuterEnumDto.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java deleted file mode 100644 index 0f2e46a1229e..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ /dev/null @@ -1,165 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; -import org.springframework.lang.Nullable; -import java.util.NoSuchElementException; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ParentWithNullableDto - */ - -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = ChildWithNullableDto.class, name = "ChildWithNullable") -}) - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ParentWithNullableDto { - - /** - * Gets or Sets type - */ - public enum TypeEnum { - CHILD_WITH_NULLABLE("ChildWithNullable"); - - private final String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable TypeEnum type; - - private JsonNullable nullableProperty = JsonNullable.undefined(); - - public ParentWithNullableDto type(@Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - - @JsonProperty("type") - public @Nullable TypeEnum getType() { - return type; - } - - public void setType(@Nullable TypeEnum type) { - this.type = type; - } - - public ParentWithNullableDto nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); - return this; - } - - /** - * Get nullableProperty - * @return nullableProperty - */ - - @JsonProperty("nullableProperty") - public JsonNullable getNullableProperty() { - return nullableProperty; - } - - public void setNullableProperty(JsonNullable nullableProperty) { - this.nullableProperty = nullableProperty; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ParentWithNullableDto parentWithNullable = (ParentWithNullableDto) o; - return Objects.equals(this.type, parentWithNullable.type) && - equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(type, hashCodeNullable(nullableProperty)); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ParentWithNullableDto {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/PetDto.java deleted file mode 100644 index 362ad2b5ae16..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/PetDto.java +++ /dev/null @@ -1,274 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import org.openapitools.model.CategoryDto; -import org.openapitools.model.TagDto; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * PetDto - */ - -@JsonTypeName("Pet") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class PetDto { - - private @Nullable Long id; - - private @Nullable CategoryDto category; - - private String name; - - - private Set photoUrls = new LinkedHashSet<>(); - - - private List<@Valid TagDto> tags = new ArrayList<>(); - - /** - * pet status in the store - */ - public enum StatusEnum { - AVAILABLE("available"), - - PENDING("pending"), - - SOLD("sold"); - - private final String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @Deprecated - private @Nullable StatusEnum status; - - public PetDto() { - super(); - } - - public PetDto id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public PetDto category(@Nullable CategoryDto category) { - this.category = category; - return this; - } - - /** - * Get category - * @return category - */ - - @JsonProperty("category") - public @Nullable CategoryDto getCategory() { - return category; - } - - public void setCategory(@Nullable CategoryDto category) { - this.category = category; - } - - public PetDto name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @NotNull - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public PetDto photoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - return this; - } - - public PetDto addPhotoUrlsItem(String photoUrlsItem) { - if (this.photoUrls == null) { - this.photoUrls = new LinkedHashSet<>(); - } - this.photoUrls.add(photoUrlsItem); - return this; - } - - /** - * Get photoUrls - * @return photoUrls - */ - @NotNull - @JsonProperty("photoUrls") - public Set getPhotoUrls() { - return photoUrls; - } - - @JsonDeserialize(as = LinkedHashSet.class) - public void setPhotoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - } - - public PetDto tags(List<@Valid TagDto> tags) { - this.tags = tags; - return this; - } - - public PetDto addTagsItem(TagDto tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - */ - - @JsonProperty("tags") - public List<@Valid TagDto> getTags() { - return tags; - } - - public void setTags(List<@Valid TagDto> tags) { - this.tags = tags; - } - - public PetDto status(@Nullable StatusEnum status) { - this.status = status; - return this; - } - - /** - * pet status in the store - * @return status - * @deprecated - */ - - @JsonProperty("status") - @Deprecated - public @Nullable StatusEnum getStatus() { - return status; - } - - /** - * @deprecated - */ - @Deprecated - public void setStatus(@Nullable StatusEnum status) { - this.status = status; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PetDto pet = (PetDto) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PetDto {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java deleted file mode 100644 index 53e133b88860..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ReadOnlyFirstDto - */ - -@JsonTypeName("ReadOnlyFirst") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ReadOnlyFirstDto { - - private @Nullable String bar; - - private @Nullable String baz; - - public ReadOnlyFirstDto bar(@Nullable String bar) { - this.bar = bar; - return this; - } - - /** - * Get bar - * @return bar - */ - - @JsonProperty("bar") - public @Nullable String getBar() { - return bar; - } - - public void setBar(@Nullable String bar) { - this.bar = bar; - } - - public ReadOnlyFirstDto baz(@Nullable String baz) { - this.baz = baz; - return this; - } - - /** - * Get baz - * @return baz - */ - - @JsonProperty("baz") - public @Nullable String getBaz() { - return baz; - } - - public void setBaz(@Nullable String baz) { - this.baz = baz; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirstDto readOnlyFirst = (ReadOnlyFirstDto) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); - } - - @Override - public int hashCode() { - return Objects.hash(bar, baz); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirstDto {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java deleted file mode 100644 index 3c9c502a23c9..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +++ /dev/null @@ -1,152 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * ResponseObjectWithDifferentFieldNamesDto - */ - -@JsonTypeName("ResponseObjectWithDifferentFieldNames") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ResponseObjectWithDifferentFieldNamesDto { - - private @Nullable String normalPropertyName; - - private @Nullable String UPPER_CASE_PROPERTY_SNAKE; - - private @Nullable String lowerCasePropertyDashes; - - private @Nullable String propertyNameWithSpaces; - - public ResponseObjectWithDifferentFieldNamesDto normalPropertyName(@Nullable String normalPropertyName) { - this.normalPropertyName = normalPropertyName; - return this; - } - - /** - * Get normalPropertyName - * @return normalPropertyName - */ - - @JsonProperty("normalPropertyName") - public @Nullable String getNormalPropertyName() { - return normalPropertyName; - } - - public void setNormalPropertyName(@Nullable String normalPropertyName) { - this.normalPropertyName = normalPropertyName; - } - - public ResponseObjectWithDifferentFieldNamesDto UPPER_CASE_PROPERTY_SNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { - this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; - return this; - } - - /** - * Get UPPER_CASE_PROPERTY_SNAKE - * @return UPPER_CASE_PROPERTY_SNAKE - */ - - @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") - public @Nullable String getUPPERCASEPROPERTYSNAKE() { - return UPPER_CASE_PROPERTY_SNAKE; - } - - public void setUPPERCASEPROPERTYSNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { - this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; - } - - public ResponseObjectWithDifferentFieldNamesDto lowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { - this.lowerCasePropertyDashes = lowerCasePropertyDashes; - return this; - } - - /** - * Get lowerCasePropertyDashes - * @return lowerCasePropertyDashes - */ - - @JsonProperty("lower-case-property-dashes") - public @Nullable String getLowerCasePropertyDashes() { - return lowerCasePropertyDashes; - } - - public void setLowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { - this.lowerCasePropertyDashes = lowerCasePropertyDashes; - } - - public ResponseObjectWithDifferentFieldNamesDto propertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { - this.propertyNameWithSpaces = propertyNameWithSpaces; - return this; - } - - /** - * Get propertyNameWithSpaces - * @return propertyNameWithSpaces - */ - - @JsonProperty("property name with spaces") - public @Nullable String getPropertyNameWithSpaces() { - return propertyNameWithSpaces; - } - - public void setPropertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { - this.propertyNameWithSpaces = propertyNameWithSpaces; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseObjectWithDifferentFieldNamesDto responseObjectWithDifferentFieldNames = (ResponseObjectWithDifferentFieldNamesDto) o; - return Objects.equals(this.normalPropertyName, responseObjectWithDifferentFieldNames.normalPropertyName) && - Objects.equals(this.UPPER_CASE_PROPERTY_SNAKE, responseObjectWithDifferentFieldNames.UPPER_CASE_PROPERTY_SNAKE) && - Objects.equals(this.lowerCasePropertyDashes, responseObjectWithDifferentFieldNames.lowerCasePropertyDashes) && - Objects.equals(this.propertyNameWithSpaces, responseObjectWithDifferentFieldNames.propertyNameWithSpaces); - } - - @Override - public int hashCode() { - return Objects.hash(normalPropertyName, UPPER_CASE_PROPERTY_SNAKE, lowerCasePropertyDashes, propertyNameWithSpaces); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseObjectWithDifferentFieldNamesDto {\n"); - sb.append(" normalPropertyName: ").append(toIndentedString(normalPropertyName)).append("\n"); - sb.append(" UPPER_CASE_PROPERTY_SNAKE: ").append(toIndentedString(UPPER_CASE_PROPERTY_SNAKE)).append("\n"); - sb.append(" lowerCasePropertyDashes: ").append(toIndentedString(lowerCasePropertyDashes)).append("\n"); - sb.append(" propertyNameWithSpaces: ").append(toIndentedString(propertyNameWithSpaces)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReturnDto.java deleted file mode 100644 index 68ff365e5acd..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/ReturnDto.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * Model for testing reserved words - */ - -@JsonTypeName("Return") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class ReturnDto { - - private @Nullable Integer _return; - - public ReturnDto _return(@Nullable Integer _return) { - this._return = _return; - return this; - } - - /** - * Get _return - * @return _return - */ - - @JsonProperty("return") - public @Nullable Integer getReturn() { - return _return; - } - - public void setReturn(@Nullable Integer _return) { - this._return = _return; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnDto _return = (ReturnDto) o; - return Objects.equals(this._return, _return._return); - } - - @Override - public int hashCode() { - return Objects.hash(_return); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnDto {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java deleted file mode 100644 index ee5527e5c733..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * SpecialModelNameDto - */ - -@JsonTypeName("_special_model.name_") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class SpecialModelNameDto { - - private @Nullable Long $specialPropertyName; - - public SpecialModelNameDto $specialPropertyName(@Nullable Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - return this; - } - - /** - * Get $specialPropertyName - * @return $specialPropertyName - */ - - @JsonProperty("$special[property.name]") - public @Nullable Long get$SpecialPropertyName() { - return $specialPropertyName; - } - - public void set$SpecialPropertyName(@Nullable Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelNameDto specialModelName = (SpecialModelNameDto) o; - return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); - } - - @Override - public int hashCode() { - return Objects.hash($specialPropertyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelNameDto {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TagDto.java deleted file mode 100644 index 0de958ebee42..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TagDto.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * TagDto - */ - -@JsonTypeName("Tag") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class TagDto { - - private @Nullable Long id; - - private @Nullable String name; - - public TagDto id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public TagDto name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TagDto tag = (TagDto) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TagDto {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java deleted file mode 100644 index e874605be925..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ /dev/null @@ -1,192 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * TypeHolderDefaultDto - */ - -@JsonTypeName("TypeHolderDefault") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class TypeHolderDefaultDto { - - private String stringItem = "what"; - - private BigDecimal numberItem = new BigDecimal("1.234"); - - private Integer integerItem = -2; - - private Boolean boolItem = true; - - - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); - - public TypeHolderDefaultDto() { - super(); - } - - public TypeHolderDefaultDto stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - */ - @NotNull - @JsonProperty("string_item") - public String getStringItem() { - return stringItem; - } - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - public TypeHolderDefaultDto numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - */ - @NotNull - @JsonProperty("number_item") - public BigDecimal getNumberItem() { - return numberItem; - } - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - public TypeHolderDefaultDto integerItem(Integer integerItem) { - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - */ - @NotNull - @JsonProperty("integer_item") - public Integer getIntegerItem() { - return integerItem; - } - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - public TypeHolderDefaultDto boolItem(Boolean boolItem) { - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - */ - @NotNull - @JsonProperty("bool_item") - public Boolean getBoolItem() { - return boolItem; - } - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - public TypeHolderDefaultDto arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderDefaultDto addArrayItemItem(Integer arrayItemItem) { - if (this.arrayItem == null) { - this.arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); - } - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - */ - @NotNull - @JsonProperty("array_item") - public List getArrayItem() { - return arrayItem; - } - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderDefaultDto typeHolderDefault = (TypeHolderDefaultDto) o; - return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && - Objects.equals(this.numberItem, typeHolderDefault.numberItem) && - Objects.equals(this.integerItem, typeHolderDefault.integerItem) && - Objects.equals(this.boolItem, typeHolderDefault.boolItem) && - Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderDefaultDto {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java deleted file mode 100644 index 917bff15c1da..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ /dev/null @@ -1,215 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * TypeHolderExampleDto - */ - -@JsonTypeName("TypeHolderExample") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class TypeHolderExampleDto { - - private String stringItem; - - private BigDecimal numberItem; - - private Float floatItem; - - private Integer integerItem; - - private Boolean boolItem; - - - private List arrayItem = new ArrayList<>(); - - public TypeHolderExampleDto() { - super(); - } - - public TypeHolderExampleDto stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - */ - @NotNull - @JsonProperty("string_item") - public String getStringItem() { - return stringItem; - } - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - public TypeHolderExampleDto numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - */ - @NotNull - @JsonProperty("number_item") - public BigDecimal getNumberItem() { - return numberItem; - } - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - public TypeHolderExampleDto floatItem(Float floatItem) { - this.floatItem = floatItem; - return this; - } - - /** - * Get floatItem - * @return floatItem - */ - @NotNull - @JsonProperty("float_item") - public Float getFloatItem() { - return floatItem; - } - - public void setFloatItem(Float floatItem) { - this.floatItem = floatItem; - } - - public TypeHolderExampleDto integerItem(Integer integerItem) { - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - */ - @NotNull - @JsonProperty("integer_item") - public Integer getIntegerItem() { - return integerItem; - } - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - public TypeHolderExampleDto boolItem(Boolean boolItem) { - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - */ - @NotNull - @JsonProperty("bool_item") - public Boolean getBoolItem() { - return boolItem; - } - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - public TypeHolderExampleDto arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderExampleDto addArrayItemItem(Integer arrayItemItem) { - if (this.arrayItem == null) { - this.arrayItem = new ArrayList<>(); - } - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - */ - @NotNull - @JsonProperty("array_item") - public List getArrayItem() { - return arrayItem; - } - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderExampleDto typeHolderExample = (TypeHolderExampleDto) o; - return Objects.equals(this.stringItem, typeHolderExample.stringItem) && - Objects.equals(this.numberItem, typeHolderExample.numberItem) && - Objects.equals(this.floatItem, typeHolderExample.floatItem) && - Objects.equals(this.integerItem, typeHolderExample.integerItem) && - Objects.equals(this.boolItem, typeHolderExample.boolItem) && - Objects.equals(this.arrayItem, typeHolderExample.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderExampleDto {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/UserDto.java deleted file mode 100644 index b367afd46957..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/UserDto.java +++ /dev/null @@ -1,244 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * UserDto - */ - -@JsonTypeName("User") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class UserDto { - - private @Nullable Long id; - - private @Nullable String username; - - private @Nullable String firstName; - - private @Nullable String lastName; - - private @Nullable String email; - - private @Nullable String password; - - private @Nullable String phone; - - private @Nullable Integer userStatus; - - public UserDto id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public UserDto username(@Nullable String username) { - this.username = username; - return this; - } - - /** - * Get username - * @return username - */ - - @JsonProperty("username") - public @Nullable String getUsername() { - return username; - } - - public void setUsername(@Nullable String username) { - this.username = username; - } - - public UserDto firstName(@Nullable String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - */ - - @JsonProperty("firstName") - public @Nullable String getFirstName() { - return firstName; - } - - public void setFirstName(@Nullable String firstName) { - this.firstName = firstName; - } - - public UserDto lastName(@Nullable String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - */ - - @JsonProperty("lastName") - public @Nullable String getLastName() { - return lastName; - } - - public void setLastName(@Nullable String lastName) { - this.lastName = lastName; - } - - public UserDto email(@Nullable String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - - @JsonProperty("email") - public @Nullable String getEmail() { - return email; - } - - public void setEmail(@Nullable String email) { - this.email = email; - } - - public UserDto password(@Nullable String password) { - this.password = password; - return this; - } - - /** - * Get password - * @return password - */ - - @JsonProperty("password") - public @Nullable String getPassword() { - return password; - } - - public void setPassword(@Nullable String password) { - this.password = password; - } - - public UserDto phone(@Nullable String phone) { - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - */ - - @JsonProperty("phone") - public @Nullable String getPhone() { - return phone; - } - - public void setPhone(@Nullable String phone) { - this.phone = phone; - } - - public UserDto userStatus(@Nullable Integer userStatus) { - this.userStatus = userStatus; - return this; - } - - /** - * User Status - * @return userStatus - */ - - @JsonProperty("userStatus") - public @Nullable Integer getUserStatus() { - return userStatus; - } - - public void setUserStatus(@Nullable Integer userStatus) { - this.userStatus = userStatus; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserDto user = (UserDto) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserDto {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/XmlItemDto.java deleted file mode 100644 index 9f2473a6f2f2..000000000000 --- a/samples/client/petstore/spring-http-interface-validation/src/main/java/org/openapitools/model/XmlItemDto.java +++ /dev/null @@ -1,812 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * XmlItemDto - */ - -@JsonTypeName("XmlItem") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public class XmlItemDto { - - private @Nullable String attributeString; - - private @Nullable BigDecimal attributeNumber; - - private @Nullable Integer attributeInteger; - - private @Nullable Boolean attributeBoolean; - - - private List wrappedArray = new ArrayList<>(); - - private @Nullable String nameString; - - private @Nullable BigDecimal nameNumber; - - private @Nullable Integer nameInteger; - - private @Nullable Boolean nameBoolean; - - - private List nameArray = new ArrayList<>(); - - - private List nameWrappedArray = new ArrayList<>(); - - private @Nullable String prefixString; - - private @Nullable BigDecimal prefixNumber; - - private @Nullable Integer prefixInteger; - - private @Nullable Boolean prefixBoolean; - - - private List prefixArray = new ArrayList<>(); - - - private List prefixWrappedArray = new ArrayList<>(); - - private @Nullable String namespaceString; - - private @Nullable BigDecimal namespaceNumber; - - private @Nullable Integer namespaceInteger; - - private @Nullable Boolean namespaceBoolean; - - - private List namespaceArray = new ArrayList<>(); - - - private List namespaceWrappedArray = new ArrayList<>(); - - private @Nullable String prefixNsString; - - private @Nullable BigDecimal prefixNsNumber; - - private @Nullable Integer prefixNsInteger; - - private @Nullable Boolean prefixNsBoolean; - - - private List prefixNsArray = new ArrayList<>(); - - - private List prefixNsWrappedArray = new ArrayList<>(); - - public XmlItemDto attributeString(@Nullable String attributeString) { - this.attributeString = attributeString; - return this; - } - - /** - * Get attributeString - * @return attributeString - */ - - @JsonProperty("attribute_string") - public @Nullable String getAttributeString() { - return attributeString; - } - - public void setAttributeString(@Nullable String attributeString) { - this.attributeString = attributeString; - } - - public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - return this; - } - - /** - * Get attributeNumber - * @return attributeNumber - */ - - @JsonProperty("attribute_number") - public @Nullable BigDecimal getAttributeNumber() { - return attributeNumber; - } - - public void setAttributeNumber(@Nullable BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - public XmlItemDto attributeInteger(@Nullable Integer attributeInteger) { - this.attributeInteger = attributeInteger; - return this; - } - - /** - * Get attributeInteger - * @return attributeInteger - */ - - @JsonProperty("attribute_integer") - public @Nullable Integer getAttributeInteger() { - return attributeInteger; - } - - public void setAttributeInteger(@Nullable Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - public XmlItemDto attributeBoolean(@Nullable Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - return this; - } - - /** - * Get attributeBoolean - * @return attributeBoolean - */ - - @JsonProperty("attribute_boolean") - public @Nullable Boolean getAttributeBoolean() { - return attributeBoolean; - } - - public void setAttributeBoolean(@Nullable Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - public XmlItemDto wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - return this; - } - - public XmlItemDto addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList<>(); - } - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - /** - * Get wrappedArray - * @return wrappedArray - */ - - @JsonProperty("wrapped_array") - public List getWrappedArray() { - return wrappedArray; - } - - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - public XmlItemDto nameString(@Nullable String nameString) { - this.nameString = nameString; - return this; - } - - /** - * Get nameString - * @return nameString - */ - - @JsonProperty("name_string") - public @Nullable String getNameString() { - return nameString; - } - - public void setNameString(@Nullable String nameString) { - this.nameString = nameString; - } - - public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) { - this.nameNumber = nameNumber; - return this; - } - - /** - * Get nameNumber - * @return nameNumber - */ - - @JsonProperty("name_number") - public @Nullable BigDecimal getNameNumber() { - return nameNumber; - } - - public void setNameNumber(@Nullable BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - public XmlItemDto nameInteger(@Nullable Integer nameInteger) { - this.nameInteger = nameInteger; - return this; - } - - /** - * Get nameInteger - * @return nameInteger - */ - - @JsonProperty("name_integer") - public @Nullable Integer getNameInteger() { - return nameInteger; - } - - public void setNameInteger(@Nullable Integer nameInteger) { - this.nameInteger = nameInteger; - } - - public XmlItemDto nameBoolean(@Nullable Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - return this; - } - - /** - * Get nameBoolean - * @return nameBoolean - */ - - @JsonProperty("name_boolean") - public @Nullable Boolean getNameBoolean() { - return nameBoolean; - } - - public void setNameBoolean(@Nullable Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - public XmlItemDto nameArray(List nameArray) { - this.nameArray = nameArray; - return this; - } - - public XmlItemDto addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList<>(); - } - this.nameArray.add(nameArrayItem); - return this; - } - - /** - * Get nameArray - * @return nameArray - */ - - @JsonProperty("name_array") - public List getNameArray() { - return nameArray; - } - - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - public XmlItemDto nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - return this; - } - - public XmlItemDto addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList<>(); - } - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - /** - * Get nameWrappedArray - * @return nameWrappedArray - */ - - @JsonProperty("name_wrapped_array") - public List getNameWrappedArray() { - return nameWrappedArray; - } - - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - public XmlItemDto prefixString(@Nullable String prefixString) { - this.prefixString = prefixString; - return this; - } - - /** - * Get prefixString - * @return prefixString - */ - - @JsonProperty("prefix_string") - public @Nullable String getPrefixString() { - return prefixString; - } - - public void setPrefixString(@Nullable String prefixString) { - this.prefixString = prefixString; - } - - public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - return this; - } - - /** - * Get prefixNumber - * @return prefixNumber - */ - - @JsonProperty("prefix_number") - public @Nullable BigDecimal getPrefixNumber() { - return prefixNumber; - } - - public void setPrefixNumber(@Nullable BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - public XmlItemDto prefixInteger(@Nullable Integer prefixInteger) { - this.prefixInteger = prefixInteger; - return this; - } - - /** - * Get prefixInteger - * @return prefixInteger - */ - - @JsonProperty("prefix_integer") - public @Nullable Integer getPrefixInteger() { - return prefixInteger; - } - - public void setPrefixInteger(@Nullable Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - public XmlItemDto prefixBoolean(@Nullable Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - return this; - } - - /** - * Get prefixBoolean - * @return prefixBoolean - */ - - @JsonProperty("prefix_boolean") - public @Nullable Boolean getPrefixBoolean() { - return prefixBoolean; - } - - public void setPrefixBoolean(@Nullable Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - public XmlItemDto prefixArray(List prefixArray) { - this.prefixArray = prefixArray; - return this; - } - - public XmlItemDto addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList<>(); - } - this.prefixArray.add(prefixArrayItem); - return this; - } - - /** - * Get prefixArray - * @return prefixArray - */ - - @JsonProperty("prefix_array") - public List getPrefixArray() { - return prefixArray; - } - - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - public XmlItemDto prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - public XmlItemDto addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList<>(); - } - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - /** - * Get prefixWrappedArray - * @return prefixWrappedArray - */ - - @JsonProperty("prefix_wrapped_array") - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - public XmlItemDto namespaceString(@Nullable String namespaceString) { - this.namespaceString = namespaceString; - return this; - } - - /** - * Get namespaceString - * @return namespaceString - */ - - @JsonProperty("namespace_string") - public @Nullable String getNamespaceString() { - return namespaceString; - } - - public void setNamespaceString(@Nullable String namespaceString) { - this.namespaceString = namespaceString; - } - - public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - return this; - } - - /** - * Get namespaceNumber - * @return namespaceNumber - */ - - @JsonProperty("namespace_number") - public @Nullable BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - public void setNamespaceNumber(@Nullable BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - public XmlItemDto namespaceInteger(@Nullable Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - return this; - } - - /** - * Get namespaceInteger - * @return namespaceInteger - */ - - @JsonProperty("namespace_integer") - public @Nullable Integer getNamespaceInteger() { - return namespaceInteger; - } - - public void setNamespaceInteger(@Nullable Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - public XmlItemDto namespaceBoolean(@Nullable Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - return this; - } - - /** - * Get namespaceBoolean - * @return namespaceBoolean - */ - - @JsonProperty("namespace_boolean") - public @Nullable Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - public void setNamespaceBoolean(@Nullable Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - public XmlItemDto namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - return this; - } - - public XmlItemDto addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList<>(); - } - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - /** - * Get namespaceArray - * @return namespaceArray - */ - - @JsonProperty("namespace_array") - public List getNamespaceArray() { - return namespaceArray; - } - - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - public XmlItemDto namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - public XmlItemDto addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList<>(); - } - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - /** - * Get namespaceWrappedArray - * @return namespaceWrappedArray - */ - - @JsonProperty("namespace_wrapped_array") - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - public XmlItemDto prefixNsString(@Nullable String prefixNsString) { - this.prefixNsString = prefixNsString; - return this; - } - - /** - * Get prefixNsString - * @return prefixNsString - */ - - @JsonProperty("prefix_ns_string") - public @Nullable String getPrefixNsString() { - return prefixNsString; - } - - public void setPrefixNsString(@Nullable String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - public XmlItemDto prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - return this; - } - - /** - * Get prefixNsNumber - * @return prefixNsNumber - */ - - @JsonProperty("prefix_ns_number") - public @Nullable BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - public void setPrefixNsNumber(@Nullable BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - public XmlItemDto prefixNsInteger(@Nullable Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - return this; - } - - /** - * Get prefixNsInteger - * @return prefixNsInteger - */ - - @JsonProperty("prefix_ns_integer") - public @Nullable Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - public void setPrefixNsInteger(@Nullable Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - public XmlItemDto prefixNsBoolean(@Nullable Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - /** - * Get prefixNsBoolean - * @return prefixNsBoolean - */ - - @JsonProperty("prefix_ns_boolean") - public @Nullable Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - public void setPrefixNsBoolean(@Nullable Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - public XmlItemDto prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - return this; - } - - public XmlItemDto addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList<>(); - } - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - /** - * Get prefixNsArray - * @return prefixNsArray - */ - - @JsonProperty("prefix_ns_array") - public List getPrefixNsArray() { - return prefixNsArray; - } - - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - public XmlItemDto prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - public XmlItemDto addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList<>(); - } - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - /** - * Get prefixNsWrappedArray - * @return prefixNsWrappedArray - */ - - @JsonProperty("prefix_ns_wrapped_array") - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItemDto xmlItem = (XmlItemDto) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItemDto {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - From 418c729b8a63bf980c3c0467ca8570bb20d165e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Tue, 3 Feb 2026 16:24:53 +0100 Subject: [PATCH 04/17] generate sample files --- ...spring-http-interface-bean-validation.yaml | 2 +- .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 60 ++ .../.openapi-generator/VERSION | 1 + .../README.md | 21 + .../pom.xml | 76 ++ .../org/openapitools/api/AnotherFakeApi.java | 40 + .../java/org/openapitools/api/FakeApi.java | 378 ++++++++ .../api/FakeClassnameTags123Api.java | 40 + .../java/org/openapitools/api/PetApi.java | 225 +++++ .../java/org/openapitools/api/StoreApi.java | 95 ++ .../java/org/openapitools/api/UserApi.java | 171 ++++ .../HttpInterfacesAbstractConfigurator.java | 65 ++ .../model/AdditionalPropertiesAnyTypeDto.java | 127 +++ .../model/AdditionalPropertiesArrayDto.java | 128 +++ .../model/AdditionalPropertiesBooleanDto.java | 127 +++ .../model/AdditionalPropertiesClassDto.java | 403 +++++++++ .../model/AdditionalPropertiesIntegerDto.java | 127 +++ .../model/AdditionalPropertiesNumberDto.java | 128 +++ .../model/AdditionalPropertiesObjectDto.java | 128 +++ .../model/AdditionalPropertiesStringDto.java | 127 +++ .../org/openapitools/model/AnimalDto.java | 123 +++ .../openapitools/model/ApiResponseDto.java | 129 +++ .../model/ArrayOfArrayOfNumberOnlyDto.java | 96 +++ .../model/ArrayOfNumberOnlyDto.java | 96 +++ .../org/openapitools/model/ArrayTestDto.java | 160 ++++ .../org/openapitools/model/BigCatDto.java | 149 ++++ .../openapitools/model/CapitalizationDto.java | 198 +++++ .../java/org/openapitools/model/CatDto.java | 111 +++ .../org/openapitools/model/CategoryDto.java | 110 +++ .../model/ChildWithNullableDto.java | 114 +++ .../org/openapitools/model/ClassModelDto.java | 83 ++ .../org/openapitools/model/ClientDto.java | 83 ++ .../model/ContainerDefaultValueDto.java | 208 +++++ .../java/org/openapitools/model/DogDto.java | 104 +++ .../org/openapitools/model/EnumArraysDto.java | 189 ++++ .../org/openapitools/model/EnumClassDto.java | 56 ++ .../org/openapitools/model/EnumTestDto.java | 325 +++++++ .../java/org/openapitools/model/FileDto.java | 83 ++ .../model/FileSchemaTestClassDto.java | 119 +++ .../org/openapitools/model/FormatTestDto.java | 404 +++++++++ .../model/HasOnlyReadOnlyDto.java | 106 +++ .../java/org/openapitools/model/ListDto.java | 83 ++ .../org/openapitools/model/MapTestDto.java | 226 +++++ ...ertiesAndAdditionalPropertiesClassDto.java | 145 ++++ .../model/Model200ResponseDto.java | 106 +++ .../java/org/openapitools/model/NameDto.java | 156 ++++ .../model/NullableMapPropertyDto.java | 108 +++ .../org/openapitools/model/NumberOnlyDto.java | 84 ++ .../java/org/openapitools/model/OrderDto.java | 239 ++++++ .../openapitools/model/OuterCompositeDto.java | 130 +++ .../org/openapitools/model/OuterEnumDto.java | 56 ++ .../model/ParentWithNullableDto.java | 165 ++++ .../java/org/openapitools/model/PetDto.java | 274 ++++++ .../openapitools/model/ReadOnlyFirstDto.java | 106 +++ ...ponseObjectWithDifferentFieldNamesDto.java | 152 ++++ .../org/openapitools/model/ReturnDto.java | 83 ++ .../model/SpecialModelNameDto.java | 83 ++ .../java/org/openapitools/model/TagDto.java | 106 +++ .../model/TypeHolderDefaultDto.java | 192 +++++ .../model/TypeHolderExampleDto.java | 215 +++++ .../java/org/openapitools/model/UserDto.java | 244 ++++++ .../org/openapitools/model/XmlItemDto.java | 812 ++++++++++++++++++ 63 files changed, 9302 insertions(+), 1 deletion(-) create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator-ignore create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/README.md create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/pom.xml create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java create mode 100644 samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java diff --git a/bin/configs/spring-http-interface-bean-validation.yaml b/bin/configs/spring-http-interface-bean-validation.yaml index 10c10a81efc4..2385ff974479 100644 --- a/bin/configs/spring-http-interface-bean-validation.yaml +++ b/bin/configs/spring-http-interface-bean-validation.yaml @@ -1,6 +1,6 @@ generatorName: spring library: spring-http-interface -outputDir: samples/client/petstore/spring-http-interface-validation +outputDir: samples/client/petstore/spring-http-interface-bean-validation inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: diff --git a/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator-ignore b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES new file mode 100644 index 000000000000..c1c311163fa2 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES @@ -0,0 +1,60 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +src/main/java/org/openapitools/model/AnimalDto.java +src/main/java/org/openapitools/model/ApiResponseDto.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +src/main/java/org/openapitools/model/ArrayTestDto.java +src/main/java/org/openapitools/model/BigCatDto.java +src/main/java/org/openapitools/model/CapitalizationDto.java +src/main/java/org/openapitools/model/CatDto.java +src/main/java/org/openapitools/model/CategoryDto.java +src/main/java/org/openapitools/model/ChildWithNullableDto.java +src/main/java/org/openapitools/model/ClassModelDto.java +src/main/java/org/openapitools/model/ClientDto.java +src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +src/main/java/org/openapitools/model/DogDto.java +src/main/java/org/openapitools/model/EnumArraysDto.java +src/main/java/org/openapitools/model/EnumClassDto.java +src/main/java/org/openapitools/model/EnumTestDto.java +src/main/java/org/openapitools/model/FileDto.java +src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +src/main/java/org/openapitools/model/FormatTestDto.java +src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +src/main/java/org/openapitools/model/ListDto.java +src/main/java/org/openapitools/model/MapTestDto.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +src/main/java/org/openapitools/model/Model200ResponseDto.java +src/main/java/org/openapitools/model/NameDto.java +src/main/java/org/openapitools/model/NullableMapPropertyDto.java +src/main/java/org/openapitools/model/NumberOnlyDto.java +src/main/java/org/openapitools/model/OrderDto.java +src/main/java/org/openapitools/model/OuterCompositeDto.java +src/main/java/org/openapitools/model/OuterEnumDto.java +src/main/java/org/openapitools/model/ParentWithNullableDto.java +src/main/java/org/openapitools/model/PetDto.java +src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +src/main/java/org/openapitools/model/ReturnDto.java +src/main/java/org/openapitools/model/SpecialModelNameDto.java +src/main/java/org/openapitools/model/TagDto.java +src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +src/main/java/org/openapitools/model/TypeHolderExampleDto.java +src/main/java/org/openapitools/model/UserDto.java +src/main/java/org/openapitools/model/XmlItemDto.java diff --git a/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION new file mode 100644 index 000000000000..193a12d6e891 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.20.0-SNAPSHOT diff --git a/samples/client/petstore/spring-http-interface-bean-validation/README.md b/samples/client/petstore/spring-http-interface-bean-validation/README.md new file mode 100644 index 000000000000..d947e03a2484 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated API stub + +[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface) + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring application for HTTP integration with other REST services +To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor +```java +@Configuration +public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { + + public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance + super(myWebClient); + } +} +``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-bean-validation/pom.xml b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml new file mode 100644 index 000000000000..6d581f4de4fb --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml @@ -0,0 +1,76 @@ + + 4.0.0 + org.openapitools + spring-http-interface + jar + spring-http-interface + 1.0.0-SNAPSHOT + + 17 + UTF-8 + + + org.springframework.boot + spring-boot-starter-parent + 3.1.3 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + org.springframework.boot + spring-boot-starter-webflux + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + jakarta.validation + jakarta.validation-api + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.8 + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java new file mode 100644 index 000000000000..01d1324ff23b --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,40 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ClientDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface AnotherFakeApi { + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param clientDto client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/another-fake/dummy", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity call123testSpecialTags( + @RequestBody ClientDto clientDto + ); + +} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java new file mode 100644 index 000000000000..fc8aa14fdf11 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,378 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullableDto; +import org.openapitools.model.ClientDto; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.model.FileSchemaTestClassDto; +import java.time.LocalDate; +import java.util.Map; +import org.springframework.lang.Nullable; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterCompositeDto; +import org.openapitools.model.UserDto; +import org.openapitools.model.XmlItemDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface FakeApi { + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItemDto XmlItem Body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/create_xml_item", + accept = { "application/json" }, + contentType = "application/xml" + ) + ResponseEntity createXmlItem( + @RequestBody XmlItemDto xmlItemDto + ); + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/boolean", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterBooleanSerialize( + @RequestBody(required = false) @Nullable Boolean body + ); + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param outerCompositeDto Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/composite", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterCompositeSerialize( + @RequestBody(required = false) @Nullable OuterCompositeDto outerCompositeDto + ); + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/number", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterNumberSerialize( + @RequestBody(required = false) @Nullable BigDecimal body + ); + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/string", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterStringSerialize( + @RequestBody(required = false) @Nullable String body + ); + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param fileSchemaTestClassDto (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/body-with-file-schema", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testBodyWithFileSchema( + @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto + ); + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param userDto (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/body-with-query-params", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testBodyWithQueryParams( + @RequestParam(value = "query", required = true) String query, + @RequestBody UserDto userDto + ); + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param clientDto client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/fake", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testClientModel( + @RequestBody ClientDto clientDto + ); + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "POST", + value = "/fake", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testEndpointParameters( + @RequestParam(value = "number", required = true) BigDecimal number, + @RequestParam(value = "double", required = true) Double _double, + @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @RequestParam(value = "byte", required = true) byte[] _byte, + @RequestParam(value = "integer", required = false) Integer integer, + @RequestParam(value = "int32", required = false) Integer int32, + @RequestParam(value = "int64", required = false) Long int64, + @RequestParam(value = "float", required = false) Float _float, + @RequestParam(value = "string", required = false) String string, + @RequestPart(value = "binary", required = false) MultipartFile binary, + @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @RequestParam(value = "password", required = false) String password, + @RequestParam(value = "callback", required = false) String paramCallback + ); + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/fake", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testEnumParameters( + @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray, + @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, + @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, + @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, + @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, + @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @RequestParam(value = "enum_form_string", required = false) String enumFormString + ); + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Something wrong (status code 400) + */ + @HttpExchange( + method = "DELETE", + value = "/fake", + accept = { "application/json" } + ) + ResponseEntity testGroupParameters( + @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, + @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup, + @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group + ); + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * + * @param requestBody request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/inline-additionalProperties", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testInlineAdditionalProperties( + @RequestBody Map requestBody + ); + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/jsonFormData", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testJsonFormData( + @RequestParam(value = "param", required = true) String param, + @RequestParam(value = "param2", required = true) String param2 + ); + + + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullableDto request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/nullable", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testNullable( + @RequestBody ChildWithNullableDto childWithNullableDto + ); + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/test-query-parameters", + accept = { "application/json" } + ) + ResponseEntity testQueryParameterCollectionFormat( + @RequestParam(value = "pipe", required = true) List pipe, + @RequestParam(value = "http", required = true) List http, + @RequestParam(value = "url", required = true) List url, + @RequestParam(value = "context", required = true) List context + ); + + + /** + * GET /fake/response-with-example + * This endpoint defines an example value for its response schema. + * + * @return Success (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/response-with-example", + accept = { "application/json" } + ) + ResponseEntity testWithResultExample( + + ); + +} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java new file mode 100644 index 000000000000..733c3da6a214 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -0,0 +1,40 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ClientDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface FakeClassnameTags123Api { + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param clientDto client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/fake_classname_test", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testClassname( + @RequestBody ClientDto clientDto + ); + +} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..1e123cf725a0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,225 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ApiResponseDto; +import org.springframework.lang.Nullable; +import org.openapitools.model.PetDto; +import org.openapitools.model.ResponseObjectWithDifferentFieldNamesDto; +import java.util.Set; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * + * @param petDto Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @HttpExchange( + method = "POST", + value = "/pet", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity addPet( + @RequestBody PetDto petDto + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @HttpExchange( + method = "DELETE", + value = "/pet/{petId}", + accept = { "application/json" } + ) + ResponseEntity deletePet( + @PathVariable("petId") Long petId, + @RequestHeader(value = "api_key", required = false) @Nullable String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @HttpExchange( + method = "GET", + value = "/pet/findByStatus", + accept = { "application/json", "application/xml" } + ) + ResponseEntity> findPetsByStatus( + @RequestParam(value = "status", required = true) List status + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Deprecated + @HttpExchange( + method = "GET", + value = "/pet/findByTags", + accept = { "application/json", "application/xml" } + ) + ResponseEntity> findPetsByTags( + @RequestParam(value = "tags", required = true) Set tags + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/pet/{petId}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getPetById( + @PathVariable("petId") Long petId + ); + + + /** + * GET /fake/{petId}/response-object-different-names + * + * @param petId ID of pet to update (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/{petId}/response-object-different-names", + accept = { "application/json" } + ) + ResponseEntity responseObjectDifferentNames( + @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * + * @param petDto Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @HttpExchange( + method = "PUT", + value = "/pet", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity updatePet( + @RequestBody PetDto petDto + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @HttpExchange( + method = "POST", + value = "/pet/{petId}", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity updatePetWithForm( + @PathVariable("petId") Long petId, + @RequestParam(value = "name", required = false) String name, + @RequestParam(value = "status", required = false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/pet/{petId}/uploadImage", + accept = { "application/json" }, + contentType = "multipart/form-data" + ) + ResponseEntity uploadFile( + @PathVariable("petId") Long petId, + @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @RequestPart(value = "file", required = false) MultipartFile file + ); + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/{petId}/uploadImageWithRequiredFile", + accept = { "application/json" }, + contentType = "multipart/form-data" + ) + ResponseEntity uploadFileWithRequiredFile( + @PathVariable("petId") Long petId, + @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + ); + +} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..6bcb815d5b5a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,95 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.OrderDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface StoreApi { + + /** + * DELETE /store/order/{order_id} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @HttpExchange( + method = "DELETE", + value = "/store/order/{order_id}", + accept = { "application/json" } + ) + ResponseEntity deleteOrder( + @PathVariable("order_id") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/store/inventory", + accept = { "application/json" } + ) + ResponseEntity> getInventory( + + ); + + + /** + * GET /store/order/{order_id} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/store/order/{order_id}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getOrderById( + @PathVariable("order_id") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * + * @param orderDto order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @HttpExchange( + method = "POST", + value = "/store/order", + accept = { "application/json", "application/xml" }, + contentType = "application/json" + ) + ResponseEntity placeOrder( + @RequestBody OrderDto orderDto + ); + +} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..7adaff82408e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,171 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.time.OffsetDateTime; +import org.openapitools.model.UserDto; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param userDto Created user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUser( + @RequestBody UserDto userDto + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * + * @param userDto List of user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user/createWithArray", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUsersWithArrayInput( + @RequestBody List userDto + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * + * @param userDto List of user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user/createWithList", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUsersWithListInput( + @RequestBody List userDto + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "DELETE", + value = "/user/{username}", + accept = { "application/json" } + ) + ResponseEntity deleteUser( + @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/user/{username}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getUserByName( + @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @HttpExchange( + method = "GET", + value = "/user/login", + accept = { "application/json", "application/xml" } + ) + ResponseEntity loginUser( + @RequestParam(value = "username", required = true) String username, + @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/user/logout", + accept = { "application/json" } + ) + ResponseEntity logoutUser( + + ); + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param userDto Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "PUT", + value = "/user/{username}", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity updateUser( + @PathVariable("username") String username, + @RequestBody UserDto userDto + ); + +} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java new file mode 100644 index 000000000000..f9e6dca33a9a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -0,0 +1,65 @@ +/* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.configuration; + +import org.openapitools.api.AnotherFakeApi; +import org.openapitools.api.FakeApi; +import org.openapitools.api.FakeClassnameTags123Api; +import org.openapitools.api.PetApi; +import org.openapitools.api.StoreApi; +import org.openapitools.api.UserApi; + +import org.springframework.context.annotation.Bean; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.support.WebClientAdapter; +import org.springframework.web.service.invoker.HttpServiceProxyFactory; + +public abstract class HttpInterfacesAbstractConfigurator { + + private final WebClient webClient; + + public HttpInterfacesAbstractConfigurator(final WebClient webClient) { + this.webClient = webClient; + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") + AnotherFakeApi anotherFakeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(AnotherFakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") + FakeApi fakeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(FakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") + FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(FakeClassnameTags123Api.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") + PetApi petHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(PetApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") + StoreApi storeHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(StoreApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") + UserApi userHttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + return factory.createClient(UserApi.class); + } + + +} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java new file mode 100644 index 000000000000..3e02dfb50ca5 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesAnyTypeDto + */ + +@JsonTypeName("AdditionalPropertiesAnyType") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesAnyTypeDto { + + private @Nullable String name; + + public AdditionalPropertiesAnyTypeDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesAnyTypeDto putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesAnyTypeDto additionalPropertiesAnyType = (AdditionalPropertiesAnyTypeDto) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + Objects.equals(this.additionalProperties, additionalPropertiesAnyType.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyTypeDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java new file mode 100644 index 000000000000..497bd9eb1285 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesArrayDto + */ + +@JsonTypeName("AdditionalPropertiesArray") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesArrayDto { + + private @Nullable String name; + + public AdditionalPropertiesArrayDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesArrayDto putAdditionalProperty(String key, List value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public List getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesArrayDto additionalPropertiesArray = (AdditionalPropertiesArrayDto) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + Objects.equals(this.additionalProperties, additionalPropertiesArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArrayDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java new file mode 100644 index 000000000000..60a45b5ed9cc --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesBooleanDto + */ + +@JsonTypeName("AdditionalPropertiesBoolean") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesBooleanDto { + + private @Nullable String name; + + public AdditionalPropertiesBooleanDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesBooleanDto putAdditionalProperty(String key, Boolean value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Boolean getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesBooleanDto additionalPropertiesBoolean = (AdditionalPropertiesBooleanDto) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + Objects.equals(this.additionalProperties, additionalPropertiesBoolean.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBooleanDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java new file mode 100644 index 000000000000..629426ed1bcf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -0,0 +1,403 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * AdditionalPropertiesClassDto + */ + +@JsonTypeName("AdditionalPropertiesClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesClassDto { + + + private Map mapString = new HashMap<>(); + + + private Map mapNumber = new HashMap<>(); + + + private Map mapInteger = new HashMap<>(); + + + private Map mapBoolean = new HashMap<>(); + + + private Map> mapArrayInteger = new HashMap<>(); + + + private Map> mapArrayAnytype = new HashMap<>(); + + + private Map> mapMapString = new HashMap<>(); + + + private Map> mapMapAnytype = new HashMap<>(); + + private @Nullable Object anytype1; + + private JsonNullable anytype2 = JsonNullable.undefined(); + + private @Nullable Object anytype3; + + public AdditionalPropertiesClassDto mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClassDto putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + + @JsonProperty("map_string") + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClassDto mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClassDto putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + + @JsonProperty("map_number") + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClassDto mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClassDto putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + + @JsonProperty("map_integer") + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClassDto mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClassDto putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + + @JsonProperty("map_boolean") + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClassDto mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClassDto putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + + @JsonProperty("map_array_integer") + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClassDto mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClassDto putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + + @JsonProperty("map_array_anytype") + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClassDto mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClassDto putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + + @JsonProperty("map_map_string") + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClassDto mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClassDto putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + + @JsonProperty("map_map_anytype") + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClassDto anytype1(@Nullable Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + + @JsonProperty("anytype_1") + public @Nullable Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(@Nullable Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClassDto anytype2(Object anytype2) { + this.anytype2 = JsonNullable.of(anytype2); + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + + @JsonProperty("anytype_2") + public JsonNullable getAnytype2() { + return anytype2; + } + + public void setAnytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClassDto anytype3(@Nullable Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + + @JsonProperty("anytype_3") + public @Nullable Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(@Nullable Object anytype3) { + this.anytype3 = anytype3; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClassDto additionalPropertiesClass = (AdditionalPropertiesClassDto) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + equalsNullable(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, hashCodeNullable(anytype2), anytype3); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClassDto {\n"); + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java new file mode 100644 index 000000000000..c566ab2481fc --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesIntegerDto + */ + +@JsonTypeName("AdditionalPropertiesInteger") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesIntegerDto { + + private @Nullable String name; + + public AdditionalPropertiesIntegerDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesIntegerDto putAdditionalProperty(String key, Integer value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Integer getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesIntegerDto additionalPropertiesInteger = (AdditionalPropertiesIntegerDto) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + Objects.equals(this.additionalProperties, additionalPropertiesInteger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesIntegerDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java new file mode 100644 index 000000000000..75eda796c3eb --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesNumberDto + */ + +@JsonTypeName("AdditionalPropertiesNumber") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesNumberDto { + + private @Nullable String name; + + public AdditionalPropertiesNumberDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesNumberDto putAdditionalProperty(String key, BigDecimal value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public BigDecimal getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesNumberDto additionalPropertiesNumber = (AdditionalPropertiesNumberDto) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + Objects.equals(this.additionalProperties, additionalPropertiesNumber.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumberDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java new file mode 100644 index 000000000000..1949afe4c581 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesObjectDto + */ + +@JsonTypeName("AdditionalPropertiesObject") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesObjectDto { + + private @Nullable String name; + + public AdditionalPropertiesObjectDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesObjectDto putAdditionalProperty(String key, Map value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Map getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesObjectDto additionalPropertiesObject = (AdditionalPropertiesObjectDto) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + Objects.equals(this.additionalProperties, additionalPropertiesObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObjectDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java new file mode 100644 index 000000000000..945ba5bfdddf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesStringDto + */ + +@JsonTypeName("AdditionalPropertiesString") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AdditionalPropertiesStringDto { + + private @Nullable String name; + + public AdditionalPropertiesStringDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesStringDto putAdditionalProperty(String key, String value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public String getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesStringDto additionalPropertiesString = (AdditionalPropertiesStringDto) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + Objects.equals(this.additionalProperties, additionalPropertiesString.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesStringDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java new file mode 100644 index 000000000000..44585b4222f0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java @@ -0,0 +1,123 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * AnimalDto + */ + +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat"), + @JsonSubTypes.Type(value = CatDto.class, name = "Cat"), + @JsonSubTypes.Type(value = DogDto.class, name = "Dog") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class AnimalDto { + + private String className; + + private String color = "red"; + + public AnimalDto() { + super(); + } + + public AnimalDto className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @NotNull + @JsonProperty("className") + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public AnimalDto color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + + @JsonProperty("color") + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnimalDto animal = (AnimalDto) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnimalDto {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java new file mode 100644 index 000000000000..937c1814095c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -0,0 +1,129 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ApiResponseDto + */ + +@JsonTypeName("ApiResponse") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ApiResponseDto { + + private @Nullable Integer code; + + private @Nullable String type; + + private @Nullable String message; + + public ApiResponseDto code(@Nullable Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @JsonProperty("code") + public @Nullable Integer getCode() { + return code; + } + + public void setCode(@Nullable Integer code) { + this.code = code; + } + + public ApiResponseDto type(@Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public @Nullable String getType() { + return type; + } + + public void setType(@Nullable String type) { + this.type = type; + } + + public ApiResponseDto message(@Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @JsonProperty("message") + public @Nullable String getMessage() { + return message; + } + + public void setMessage(@Nullable String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiResponseDto _apiResponse = (ApiResponseDto) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiResponseDto {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java new file mode 100644 index 000000000000..9153e5dac5c9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfArrayOfNumberOnlyDto + */ + +@JsonTypeName("ArrayOfArrayOfNumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayOfArrayOfNumberOnlyDto { + + + private List> arrayArrayNumber = new ArrayList<>(); + + public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnlyDto addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + + @JsonProperty("ArrayArrayNumber") + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnlyDto arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnlyDto) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnlyDto {\n"); + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java new file mode 100644 index 000000000000..98ed15a0b184 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -0,0 +1,96 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfNumberOnlyDto + */ + +@JsonTypeName("ArrayOfNumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayOfNumberOnlyDto { + + + private List arrayNumber = new ArrayList<>(); + + public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnlyDto addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + + @JsonProperty("ArrayNumber") + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnlyDto arrayOfNumberOnly = (ArrayOfNumberOnlyDto) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnlyDto {\n"); + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java new file mode 100644 index 000000000000..7de0d174f1b6 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -0,0 +1,160 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.ReadOnlyFirstDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayTestDto + */ + +@JsonTypeName("ArrayTest") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ArrayTestDto { + + + private List arrayOfString = new ArrayList<>(); + + + private List> arrayArrayOfInteger = new ArrayList<>(); + + + private List> arrayArrayOfModel = new ArrayList<>(); + + public ArrayTestDto arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTestDto addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + + @JsonProperty("array_of_string") + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTestDto arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTestDto addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + + @JsonProperty("array_array_of_integer") + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTestDto addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + + @JsonProperty("array_array_of_model") + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTestDto arrayTest = (ArrayTestDto) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTestDto {\n"); + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java new file mode 100644 index 000000000000..f8685bbe513c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java @@ -0,0 +1,149 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.CatDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * BigCatDto + */ + + +@JsonTypeName("BigCat") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class BigCatDto extends CatDto { + + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private final String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable KindEnum kind; + + public BigCatDto() { + super(); + } + + public BigCatDto kind(@Nullable KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + + @JsonProperty("kind") + public @Nullable KindEnum getKind() { + return kind; + } + + public void setKind(@Nullable KindEnum kind) { + this.kind = kind; + } + + + public BigCatDto declawed(Boolean declawed) { + super.declawed(declawed); + return this; + } + + public BigCatDto className(String className) { + super.className(className); + return this; + } + + public BigCatDto color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCatDto bigCat = (BigCatDto) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java new file mode 100644 index 000000000000..1c7a8b98ae3e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -0,0 +1,198 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CapitalizationDto + */ + +@JsonTypeName("Capitalization") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class CapitalizationDto { + + private @Nullable String smallCamel; + + private @Nullable String capitalCamel; + + private @Nullable String smallSnake; + + private @Nullable String capitalSnake; + + private @Nullable String scAETHFlowPoints; + + private @Nullable String ATT_NAME; + + public CapitalizationDto smallCamel(@Nullable String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + + @JsonProperty("smallCamel") + public @Nullable String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(@Nullable String smallCamel) { + this.smallCamel = smallCamel; + } + + public CapitalizationDto capitalCamel(@Nullable String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + + @JsonProperty("CapitalCamel") + public @Nullable String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(@Nullable String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public CapitalizationDto smallSnake(@Nullable String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + + @JsonProperty("small_Snake") + public @Nullable String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(@Nullable String smallSnake) { + this.smallSnake = smallSnake; + } + + public CapitalizationDto capitalSnake(@Nullable String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + + @JsonProperty("Capital_Snake") + public @Nullable String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(@Nullable String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public CapitalizationDto scAETHFlowPoints(@Nullable String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + + @JsonProperty("SCA_ETH_Flow_Points") + public @Nullable String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(@Nullable String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public CapitalizationDto ATT_NAME(@Nullable String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + + @JsonProperty("ATT_NAME") + public @Nullable String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(@Nullable String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CapitalizationDto capitalization = (CapitalizationDto) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CapitalizationDto {\n"); + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java new file mode 100644 index 000000000000..051efd518e0e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java @@ -0,0 +1,111 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.model.AnimalDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CatDto + */ + +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class CatDto extends AnimalDto { + + private @Nullable Boolean declawed; + + public CatDto() { + super(); + } + + public CatDto declawed(@Nullable Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + + @JsonProperty("declawed") + public @Nullable Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(@Nullable Boolean declawed) { + this.declawed = declawed; + } + + + public CatDto className(String className) { + super.className(className); + return this; + } + + public CatDto color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatDto cat = (CatDto) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java new file mode 100644 index 000000000000..fba08710dadf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java @@ -0,0 +1,110 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CategoryDto + */ + +@JsonTypeName("Category") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class CategoryDto { + + private @Nullable Long id; + + private String name = "default-name"; + + public CategoryDto() { + super(); + } + + public CategoryDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public CategoryDto name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CategoryDto category = (CategoryDto) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CategoryDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java new file mode 100644 index 000000000000..2da557bac29d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -0,0 +1,114 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullableDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ChildWithNullableDto + */ + + +@JsonTypeName("ChildWithNullable") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ChildWithNullableDto extends ParentWithNullableDto { + + private @Nullable String otherProperty; + + public ChildWithNullableDto otherProperty(@Nullable String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @JsonProperty("otherProperty") + public @Nullable String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(@Nullable String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullableDto type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullableDto nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullableDto childWithNullable = (ChildWithNullableDto) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullableDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java new file mode 100644 index 000000000000..f0531a128c3d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model with \"_class\" property + */ + +@JsonTypeName("ClassModel") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ClassModelDto { + + private @Nullable String propertyClass; + + public ClassModelDto propertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + + @JsonProperty("_class") + public @Nullable String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModelDto classModel = (ClassModelDto) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModelDto {\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java new file mode 100644 index 000000000000..a199fc8203ad --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ClientDto + */ + +@JsonTypeName("Client") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ClientDto { + + private @Nullable String client; + + public ClientDto client(@Nullable String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + + @JsonProperty("client") + public @Nullable String getClient() { + return client; + } + + public void setClient(@Nullable String client) { + this.client = client; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClientDto client = (ClientDto) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClientDto {\n"); + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java new file mode 100644 index 000000000000..863248d301de --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -0,0 +1,208 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ContainerDefaultValueDto + */ + +@JsonTypeName("ContainerDefaultValue") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ContainerDefaultValueDto { + + + private JsonNullable> nullableArray = JsonNullable.>undefined(); + + + private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + + + private List requiredArray = new ArrayList<>(); + + + private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + + public ContainerDefaultValueDto() { + super(); + } + + public ContainerDefaultValueDto nullableArray(List nullableArray) { + this.nullableArray = JsonNullable.of(nullableArray); + return this; + } + + public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { + if (this.nullableArray == null || !this.nullableArray.isPresent()) { + this.nullableArray = JsonNullable.of(new ArrayList<>()); + } + this.nullableArray.get().add(nullableArrayItem); + return this; + } + + /** + * Get nullableArray + * @return nullableArray + */ + + @JsonProperty("nullable_array") + public JsonNullable> getNullableArray() { + return nullableArray; + } + + public void setNullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; + } + + public ContainerDefaultValueDto nullableRequiredArray(List nullableRequiredArray) { + this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + return this; + } + + public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequiredArrayItem) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); + } + this.nullableRequiredArray.get().add(nullableRequiredArrayItem); + return this; + } + + /** + * Get nullableRequiredArray + * @return nullableRequiredArray + */ + @NotNull + @JsonProperty("nullable_required_array") + public JsonNullable> getNullableRequiredArray() { + return nullableRequiredArray; + } + + public void setNullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; + } + + public ContainerDefaultValueDto requiredArray(List requiredArray) { + this.requiredArray = requiredArray; + return this; + } + + public ContainerDefaultValueDto addRequiredArrayItem(String requiredArrayItem) { + if (this.requiredArray == null) { + this.requiredArray = new ArrayList<>(); + } + this.requiredArray.add(requiredArrayItem); + return this; + } + + /** + * Get requiredArray + * @return requiredArray + */ + @NotNull + @JsonProperty("required_array") + public List getRequiredArray() { + return requiredArray; + } + + public void setRequiredArray(List requiredArray) { + this.requiredArray = requiredArray; + } + + public ContainerDefaultValueDto nullableArrayWithDefault(List nullableArrayWithDefault) { + this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + return this; + } + + public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); + } + this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); + return this; + } + + /** + * Get nullableArrayWithDefault + * @return nullableArrayWithDefault + */ + + @JsonProperty("nullable_array_with_default") + public JsonNullable> getNullableArrayWithDefault() { + return nullableArrayWithDefault; + } + + public void setNullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContainerDefaultValueDto containerDefaultValue = (ContainerDefaultValueDto) o; + return equalsNullable(this.nullableArray, containerDefaultValue.nullableArray) && + Objects.equals(this.nullableRequiredArray, containerDefaultValue.nullableRequiredArray) && + Objects.equals(this.requiredArray, containerDefaultValue.requiredArray) && + equalsNullable(this.nullableArrayWithDefault, containerDefaultValue.nullableArrayWithDefault); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableArray), nullableRequiredArray, requiredArray, hashCodeNullable(nullableArrayWithDefault)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContainerDefaultValueDto {\n"); + sb.append(" nullableArray: ").append(toIndentedString(nullableArray)).append("\n"); + sb.append(" nullableRequiredArray: ").append(toIndentedString(nullableRequiredArray)).append("\n"); + sb.append(" requiredArray: ").append(toIndentedString(requiredArray)).append("\n"); + sb.append(" nullableArrayWithDefault: ").append(toIndentedString(nullableArrayWithDefault)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java new file mode 100644 index 000000000000..e66b8b730481 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java @@ -0,0 +1,104 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.model.AnimalDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * DogDto + */ + + +@JsonTypeName("Dog") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class DogDto extends AnimalDto { + + private @Nullable String breed; + + public DogDto() { + super(); + } + + public DogDto breed(@Nullable String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + + @JsonProperty("breed") + public @Nullable String getBreed() { + return breed; + } + + public void setBreed(@Nullable String breed) { + this.breed = breed; + } + + + public DogDto className(String className) { + super.className(className); + return this; + } + + public DogDto color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DogDto dog = (DogDto) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java new file mode 100644 index 000000000000..d638aa2e39ca --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -0,0 +1,189 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumArraysDto + */ + +@JsonTypeName("EnumArrays") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class EnumArraysDto { + + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private final String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private final String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + + private List arrayEnum = new ArrayList<>(); + + public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + + @JsonProperty("just_symbol") + public @Nullable JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(@Nullable JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArraysDto arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArraysDto addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + + @JsonProperty("array_enum") + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArraysDto enumArrays = (EnumArraysDto) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArraysDto {\n"); + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java new file mode 100644 index 000000000000..766783743ebe --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java @@ -0,0 +1,56 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public enum EnumClassDto { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private final String value; + + EnumClassDto(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClassDto fromValue(String value) { + for (EnumClassDto b : EnumClassDto.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java new file mode 100644 index 000000000000..f22f967bbd04 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java @@ -0,0 +1,325 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.model.OuterEnumDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumTestDto + */ + +@JsonTypeName("Enum_Test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class EnumTestDto { + + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private final String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private final String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private final Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private final Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable EnumNumberEnum enumNumber; + + private @Nullable OuterEnumDto outerEnum; + + public EnumTestDto() { + super(); + } + + public EnumTestDto enumString(@Nullable EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + + @JsonProperty("enum_string") + public @Nullable EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(@Nullable EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTestDto enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @NotNull + @JsonProperty("enum_string_required") + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTestDto enumInteger(@Nullable EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + + @JsonProperty("enum_integer") + public @Nullable EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(@Nullable EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTestDto enumNumber(@Nullable EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + + @JsonProperty("enum_number") + public @Nullable EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTestDto outerEnum(@Nullable OuterEnumDto outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + + @JsonProperty("outerEnum") + public @Nullable OuterEnumDto getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(@Nullable OuterEnumDto outerEnum) { + this.outerEnum = outerEnum; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTestDto enumTest = (EnumTestDto) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTestDto {\n"); + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java new file mode 100644 index 000000000000..1b4e72e7de4e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Must be named `File` for test. + */ + +@JsonTypeName("File") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class FileDto { + + private @Nullable String sourceURI; + + public FileDto sourceURI(@Nullable String sourceURI) { + this.sourceURI = sourceURI; + return this; + } + + /** + * Test capitalization + * @return sourceURI + */ + + @JsonProperty("sourceURI") + public @Nullable String getSourceURI() { + return sourceURI; + } + + public void setSourceURI(@Nullable String sourceURI) { + this.sourceURI = sourceURI; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileDto file = (FileDto) o; + return Objects.equals(this.sourceURI, file.sourceURI); + } + + @Override + public int hashCode() { + return Objects.hash(sourceURI); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileDto {\n"); + sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java new file mode 100644 index 000000000000..df3798815bd4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -0,0 +1,119 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.FileDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FileSchemaTestClassDto + */ + +@JsonTypeName("FileSchemaTestClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class FileSchemaTestClassDto { + + private @Nullable FileDto file; + + + private List files = new ArrayList<>(); + + public FileSchemaTestClassDto file(@Nullable FileDto file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + + @JsonProperty("file") + public @Nullable FileDto getFile() { + return file; + } + + public void setFile(@Nullable FileDto file) { + this.file = file; + } + + public FileSchemaTestClassDto files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClassDto addFilesItem(FileDto filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + + @JsonProperty("files") + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClassDto fileSchemaTestClass = (FileSchemaTestClassDto) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClassDto {\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java new file mode 100644 index 000000000000..c00c48deed87 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java @@ -0,0 +1,404 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FormatTestDto + */ + +@JsonTypeName("format_test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class FormatTestDto { + + private @Nullable Integer integer; + + private @Nullable Integer int32; + + private @Nullable Long int64; + + private BigDecimal number; + + private @Nullable Float _float; + + private @Nullable Double _double; + + private @Nullable String string; + + private byte[] _byte; + + private @Nullable org.springframework.core.io.Resource binary; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime dateTime; + + private @Nullable UUID uuid; + + private String password; + + private @Nullable BigDecimal bigDecimal; + + public FormatTestDto() { + super(); + } + + public FormatTestDto integer(@Nullable Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + + @JsonProperty("integer") + public @Nullable Integer getInteger() { + return integer; + } + + public void setInteger(@Nullable Integer integer) { + this.integer = integer; + } + + public FormatTestDto int32(@Nullable Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + + @JsonProperty("int32") + public @Nullable Integer getInt32() { + return int32; + } + + public void setInt32(@Nullable Integer int32) { + this.int32 = int32; + } + + public FormatTestDto int64(@Nullable Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + + @JsonProperty("int64") + public @Nullable Long getInt64() { + return int64; + } + + public void setInt64(@Nullable Long int64) { + this.int64 = int64; + } + + public FormatTestDto number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @NotNull + @JsonProperty("number") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTestDto _float(@Nullable Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + + @JsonProperty("float") + public @Nullable Float getFloat() { + return _float; + } + + public void setFloat(@Nullable Float _float) { + this._float = _float; + } + + public FormatTestDto _double(@Nullable Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + + @JsonProperty("double") + public @Nullable Double getDouble() { + return _double; + } + + public void setDouble(@Nullable Double _double) { + this._double = _double; + } + + public FormatTestDto string(@Nullable String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + + @JsonProperty("string") + public @Nullable String getString() { + return string; + } + + public void setString(@Nullable String string) { + this.string = string; + } + + public FormatTestDto _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @NotNull + @JsonProperty("byte") + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTestDto binary(@Nullable org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + + @JsonProperty("binary") + public @Nullable org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(@Nullable org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTestDto date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @NotNull + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTestDto uuid(@Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + public void setUuid(@Nullable UUID uuid) { + this.uuid = uuid; + } + + public FormatTestDto password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @NotNull + @JsonProperty("password") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTestDto bigDecimal(@Nullable BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + + @JsonProperty("BigDecimal") + public @Nullable BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(@Nullable BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTestDto formatTest = (FormatTestDto) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTestDto {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append("*").append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java new file mode 100644 index 000000000000..f70bfcfb3b3a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * HasOnlyReadOnlyDto + */ + +@JsonTypeName("hasOnlyReadOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class HasOnlyReadOnlyDto { + + private @Nullable String bar; + + private @Nullable String foo; + + public HasOnlyReadOnlyDto bar(@Nullable String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + + @JsonProperty("bar") + public @Nullable String getBar() { + return bar; + } + + public void setBar(@Nullable String bar) { + this.bar = bar; + } + + public HasOnlyReadOnlyDto foo(@Nullable String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + + @JsonProperty("foo") + public @Nullable String getFoo() { + return foo; + } + + public void setFoo(@Nullable String foo) { + this.foo = foo; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnlyDto hasOnlyReadOnly = (HasOnlyReadOnlyDto) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnlyDto {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java new file mode 100644 index 000000000000..c155a45c0b6c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ListDto + */ + +@JsonTypeName("List") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ListDto { + + private @Nullable String _123list; + + public ListDto _123list(@Nullable String _123list) { + this._123list = _123list; + return this; + } + + /** + * Get _123list + * @return _123list + */ + + @JsonProperty("123-list") + public @Nullable String get123list() { + return _123list; + } + + public void set123list(@Nullable String _123list) { + this._123list = _123list; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListDto _list = (ListDto) o; + return Objects.equals(this._123list, _list._123list); + } + + @Override + public int hashCode() { + return Objects.hash(_123list); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListDto {\n"); + sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java new file mode 100644 index 000000000000..d585aaf5cb7e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java @@ -0,0 +1,226 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MapTestDto + */ + +@JsonTypeName("MapTest") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class MapTestDto { + + + private Map> mapMapOfString = new HashMap<>(); + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private final String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + + private Map mapOfEnumString = new HashMap<>(); + + + private Map directMap = new HashMap<>(); + + + private Map indirectMap = new HashMap<>(); + + public MapTestDto mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTestDto putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + + @JsonProperty("map_map_of_string") + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTestDto mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTestDto putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + + @JsonProperty("map_of_enum_string") + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTestDto directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTestDto putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + + @JsonProperty("direct_map") + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTestDto indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTestDto putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + + @JsonProperty("indirect_map") + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTestDto mapTest = (MapTestDto) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTestDto {\n"); + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java new file mode 100644 index 000000000000..69a49c3b06ea --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -0,0 +1,145 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.AnimalDto; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MixedPropertiesAndAdditionalPropertiesClassDto + */ + +@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class MixedPropertiesAndAdditionalPropertiesClassDto { + + private @Nullable UUID uuid; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime dateTime; + + + private Map map = new HashMap<>(); + + public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + public void setUuid(@Nullable UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClassDto dateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClassDto map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClassDto putMapItem(String key, AnimalDto mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + + @JsonProperty("map") + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClassDto mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClassDto) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClassDto {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java new file mode 100644 index 000000000000..eac1d092c452 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model name starting with number + */ + +@JsonTypeName("200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class Model200ResponseDto { + + private @Nullable Integer name; + + private @Nullable String propertyClass; + + public Model200ResponseDto name(@Nullable Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable Integer getName() { + return name; + } + + public void setName(@Nullable Integer name) { + this.name = name; + } + + public Model200ResponseDto propertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + + @JsonProperty("class") + public @Nullable String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(@Nullable String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200ResponseDto _200response = (Model200ResponseDto) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200ResponseDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java new file mode 100644 index 000000000000..7b04969f2043 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java @@ -0,0 +1,156 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model name same as property name + */ + +@JsonTypeName("Name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class NameDto { + + private Integer name; + + private @Nullable Integer snakeCase; + + private @Nullable String property; + + private @Nullable Integer _123number; + + public NameDto() { + super(); + } + + public NameDto name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public NameDto snakeCase(@Nullable Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + + @JsonProperty("snake_case") + public @Nullable Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(@Nullable Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public NameDto property(@Nullable String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + + @JsonProperty("property") + public @Nullable String getProperty() { + return property; + } + + public void setProperty(@Nullable String property) { + this.property = property; + } + + public NameDto _123number(@Nullable Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + + @JsonProperty("123Number") + public @Nullable Integer get123number() { + return _123number; + } + + public void set123number(@Nullable Integer _123number) { + this._123number = _123number; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NameDto name = (NameDto) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NameDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java new file mode 100644 index 000000000000..13c83d77e9d6 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NullableMapPropertyDto + */ + +@JsonTypeName("NullableMapProperty") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class NullableMapPropertyDto { + + + private JsonNullable> languageValues = JsonNullable.>undefined(); + + public NullableMapPropertyDto languageValues(Map languageValues) { + this.languageValues = JsonNullable.of(languageValues); + return this; + } + + public NullableMapPropertyDto putLanguageValuesItem(String key, String languageValuesItem) { + if (this.languageValues == null || !this.languageValues.isPresent()) { + this.languageValues = JsonNullable.of(new HashMap<>()); + } + this.languageValues.get().put(key, languageValuesItem); + return this; + } + + /** + * Get languageValues + * @return languageValues + */ + + @JsonProperty("languageValues") + public JsonNullable> getLanguageValues() { + return languageValues; + } + + public void setLanguageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableMapPropertyDto nullableMapProperty = (NullableMapPropertyDto) o; + return equalsNullable(this.languageValues, nullableMapProperty.languageValues); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(languageValues)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableMapPropertyDto {\n"); + sb.append(" languageValues: ").append(toIndentedString(languageValues)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java new file mode 100644 index 000000000000..ee1c0fe4d347 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -0,0 +1,84 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NumberOnlyDto + */ + +@JsonTypeName("NumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class NumberOnlyDto { + + private @Nullable BigDecimal justNumber; + + public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + + @JsonProperty("JustNumber") + public @Nullable BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(@Nullable BigDecimal justNumber) { + this.justNumber = justNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnlyDto numberOnly = (NumberOnlyDto) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnlyDto {\n"); + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java new file mode 100644 index 000000000000..3d3c83438af5 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java @@ -0,0 +1,239 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OrderDto + */ + +@JsonTypeName("Order") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class OrderDto { + + private @Nullable Long id; + + private @Nullable Long petId; + + private @Nullable Integer quantity; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private @Nullable OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable StatusEnum status; + + private Boolean complete = false; + + public OrderDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public OrderDto petId(@Nullable Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + + @JsonProperty("petId") + public @Nullable Long getPetId() { + return petId; + } + + public void setPetId(@Nullable Long petId) { + this.petId = petId; + } + + public OrderDto quantity(@Nullable Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + + @JsonProperty("quantity") + public @Nullable Integer getQuantity() { + return quantity; + } + + public void setQuantity(@Nullable Integer quantity) { + this.quantity = quantity; + } + + public OrderDto shipDate(@Nullable OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + + @JsonProperty("shipDate") + public @Nullable OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(@Nullable OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public OrderDto status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + + @JsonProperty("status") + public @Nullable StatusEnum getStatus() { + return status; + } + + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + public OrderDto complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + + @JsonProperty("complete") + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDto order = (OrderDto) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java new file mode 100644 index 000000000000..91acbd9a1f35 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -0,0 +1,130 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OuterCompositeDto + */ + +@JsonTypeName("OuterComposite") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class OuterCompositeDto { + + private @Nullable BigDecimal myNumber; + + private @Nullable String myString; + + private @Nullable Boolean myBoolean; + + public OuterCompositeDto myNumber(@Nullable BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + + @JsonProperty("my_number") + public @Nullable BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(@Nullable BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterCompositeDto myString(@Nullable String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + + @JsonProperty("my_string") + public @Nullable String getMyString() { + return myString; + } + + public void setMyString(@Nullable String myString) { + this.myString = myString; + } + + public OuterCompositeDto myBoolean(@Nullable Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + + @JsonProperty("my_boolean") + public @Nullable Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(@Nullable Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterCompositeDto outerComposite = (OuterCompositeDto) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterCompositeDto {\n"); + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java new file mode 100644 index 000000000000..38a8d0eb9b4c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java @@ -0,0 +1,56 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public enum OuterEnumDto { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private final String value; + + OuterEnumDto(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDto fromValue(String value) { + for (OuterEnumDto b : OuterEnumDto.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java new file mode 100644 index 000000000000..0f2e46a1229e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -0,0 +1,165 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ParentWithNullableDto + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullableDto.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ParentWithNullableDto { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILD_WITH_NULLABLE("ChildWithNullable"); + + private final String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullableDto type(@Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public @Nullable TypeEnum getType() { + return type; + } + + public void setType(@Nullable TypeEnum type) { + this.type = type; + } + + public ParentWithNullableDto nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullableDto parentWithNullable = (ParentWithNullableDto) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullableDto {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java new file mode 100644 index 000000000000..8104d6f0dc21 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java @@ -0,0 +1,274 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.CategoryDto; +import org.openapitools.model.TagDto; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * PetDto + */ + +@JsonTypeName("Pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class PetDto { + + private @Nullable Long id; + + private @Nullable CategoryDto category; + + private String name; + + + private Set photoUrls = new LinkedHashSet<>(); + + + private List tags = new ArrayList<>(); + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @Deprecated + private @Nullable StatusEnum status; + + public PetDto() { + super(); + } + + public PetDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public PetDto category(@Nullable CategoryDto category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + + @JsonProperty("category") + public @Nullable CategoryDto getCategory() { + return category; + } + + public void setCategory(@Nullable CategoryDto category) { + this.category = category; + } + + public PetDto name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PetDto photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public PetDto addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @NotNull + @JsonProperty("photoUrls") + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public PetDto tags(List tags) { + this.tags = tags; + return this; + } + + public PetDto addTagsItem(TagDto tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + + @JsonProperty("tags") + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public PetDto status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + */ + + @JsonProperty("status") + @Deprecated + public @Nullable StatusEnum getStatus() { + return status; + } + + /** + * @deprecated + */ + @Deprecated + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PetDto pet = (PetDto) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PetDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java new file mode 100644 index 000000000000..53e133b88860 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ReadOnlyFirstDto + */ + +@JsonTypeName("ReadOnlyFirst") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ReadOnlyFirstDto { + + private @Nullable String bar; + + private @Nullable String baz; + + public ReadOnlyFirstDto bar(@Nullable String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + + @JsonProperty("bar") + public @Nullable String getBar() { + return bar; + } + + public void setBar(@Nullable String bar) { + this.bar = bar; + } + + public ReadOnlyFirstDto baz(@Nullable String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + + @JsonProperty("baz") + public @Nullable String getBaz() { + return baz; + } + + public void setBaz(@Nullable String baz) { + this.baz = baz; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirstDto readOnlyFirst = (ReadOnlyFirstDto) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirstDto {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java new file mode 100644 index 000000000000..3c9c502a23c9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -0,0 +1,152 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ResponseObjectWithDifferentFieldNamesDto + */ + +@JsonTypeName("ResponseObjectWithDifferentFieldNames") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ResponseObjectWithDifferentFieldNamesDto { + + private @Nullable String normalPropertyName; + + private @Nullable String UPPER_CASE_PROPERTY_SNAKE; + + private @Nullable String lowerCasePropertyDashes; + + private @Nullable String propertyNameWithSpaces; + + public ResponseObjectWithDifferentFieldNamesDto normalPropertyName(@Nullable String normalPropertyName) { + this.normalPropertyName = normalPropertyName; + return this; + } + + /** + * Get normalPropertyName + * @return normalPropertyName + */ + + @JsonProperty("normalPropertyName") + public @Nullable String getNormalPropertyName() { + return normalPropertyName; + } + + public void setNormalPropertyName(@Nullable String normalPropertyName) { + this.normalPropertyName = normalPropertyName; + } + + public ResponseObjectWithDifferentFieldNamesDto UPPER_CASE_PROPERTY_SNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + return this; + } + + /** + * Get UPPER_CASE_PROPERTY_SNAKE + * @return UPPER_CASE_PROPERTY_SNAKE + */ + + @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") + public @Nullable String getUPPERCASEPROPERTYSNAKE() { + return UPPER_CASE_PROPERTY_SNAKE; + } + + public void setUPPERCASEPROPERTYSNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + } + + public ResponseObjectWithDifferentFieldNamesDto lowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + return this; + } + + /** + * Get lowerCasePropertyDashes + * @return lowerCasePropertyDashes + */ + + @JsonProperty("lower-case-property-dashes") + public @Nullable String getLowerCasePropertyDashes() { + return lowerCasePropertyDashes; + } + + public void setLowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + } + + public ResponseObjectWithDifferentFieldNamesDto propertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; + return this; + } + + /** + * Get propertyNameWithSpaces + * @return propertyNameWithSpaces + */ + + @JsonProperty("property name with spaces") + public @Nullable String getPropertyNameWithSpaces() { + return propertyNameWithSpaces; + } + + public void setPropertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseObjectWithDifferentFieldNamesDto responseObjectWithDifferentFieldNames = (ResponseObjectWithDifferentFieldNamesDto) o; + return Objects.equals(this.normalPropertyName, responseObjectWithDifferentFieldNames.normalPropertyName) && + Objects.equals(this.UPPER_CASE_PROPERTY_SNAKE, responseObjectWithDifferentFieldNames.UPPER_CASE_PROPERTY_SNAKE) && + Objects.equals(this.lowerCasePropertyDashes, responseObjectWithDifferentFieldNames.lowerCasePropertyDashes) && + Objects.equals(this.propertyNameWithSpaces, responseObjectWithDifferentFieldNames.propertyNameWithSpaces); + } + + @Override + public int hashCode() { + return Objects.hash(normalPropertyName, UPPER_CASE_PROPERTY_SNAKE, lowerCasePropertyDashes, propertyNameWithSpaces); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseObjectWithDifferentFieldNamesDto {\n"); + sb.append(" normalPropertyName: ").append(toIndentedString(normalPropertyName)).append("\n"); + sb.append(" UPPER_CASE_PROPERTY_SNAKE: ").append(toIndentedString(UPPER_CASE_PROPERTY_SNAKE)).append("\n"); + sb.append(" lowerCasePropertyDashes: ").append(toIndentedString(lowerCasePropertyDashes)).append("\n"); + sb.append(" propertyNameWithSpaces: ").append(toIndentedString(propertyNameWithSpaces)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java new file mode 100644 index 000000000000..68ff365e5acd --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing reserved words + */ + +@JsonTypeName("Return") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class ReturnDto { + + private @Nullable Integer _return; + + public ReturnDto _return(@Nullable Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + + @JsonProperty("return") + public @Nullable Integer getReturn() { + return _return; + } + + public void setReturn(@Nullable Integer _return) { + this._return = _return; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnDto _return = (ReturnDto) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnDto {\n"); + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java new file mode 100644 index 000000000000..ee5527e5c733 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -0,0 +1,83 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * SpecialModelNameDto + */ + +@JsonTypeName("_special_model.name_") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class SpecialModelNameDto { + + private @Nullable Long $specialPropertyName; + + public SpecialModelNameDto $specialPropertyName(@Nullable Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + + @JsonProperty("$special[property.name]") + public @Nullable Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(@Nullable Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelNameDto specialModelName = (SpecialModelNameDto) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelNameDto {\n"); + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java new file mode 100644 index 000000000000..0de958ebee42 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java @@ -0,0 +1,106 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TagDto + */ + +@JsonTypeName("Tag") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class TagDto { + + private @Nullable Long id; + + private @Nullable String name; + + public TagDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public TagDto name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagDto tag = (TagDto) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java new file mode 100644 index 000000000000..e874605be925 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -0,0 +1,192 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderDefaultDto + */ + +@JsonTypeName("TypeHolderDefault") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class TypeHolderDefaultDto { + + private String stringItem = "what"; + + private BigDecimal numberItem = new BigDecimal("1.234"); + + private Integer integerItem = -2; + + private Boolean boolItem = true; + + + private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + + public TypeHolderDefaultDto() { + super(); + } + + public TypeHolderDefaultDto stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @NotNull + @JsonProperty("string_item") + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefaultDto numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefaultDto integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @NotNull + @JsonProperty("integer_item") + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefaultDto boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @NotNull + @JsonProperty("bool_item") + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefaultDto arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefaultDto addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @NotNull + @JsonProperty("array_item") + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefaultDto typeHolderDefault = (TypeHolderDefaultDto) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefaultDto {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java new file mode 100644 index 000000000000..917bff15c1da --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -0,0 +1,215 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderExampleDto + */ + +@JsonTypeName("TypeHolderExample") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class TypeHolderExampleDto { + + private String stringItem; + + private BigDecimal numberItem; + + private Float floatItem; + + private Integer integerItem; + + private Boolean boolItem; + + + private List arrayItem = new ArrayList<>(); + + public TypeHolderExampleDto() { + super(); + } + + public TypeHolderExampleDto stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @NotNull + @JsonProperty("string_item") + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExampleDto numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExampleDto floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @NotNull + @JsonProperty("float_item") + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExampleDto integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @NotNull + @JsonProperty("integer_item") + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExampleDto boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @NotNull + @JsonProperty("bool_item") + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExampleDto arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExampleDto addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList<>(); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @NotNull + @JsonProperty("array_item") + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExampleDto typeHolderExample = (TypeHolderExampleDto) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExampleDto {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java new file mode 100644 index 000000000000..b367afd46957 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java @@ -0,0 +1,244 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * UserDto + */ + +@JsonTypeName("User") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class UserDto { + + private @Nullable Long id; + + private @Nullable String username; + + private @Nullable String firstName; + + private @Nullable String lastName; + + private @Nullable String email; + + private @Nullable String password; + + private @Nullable String phone; + + private @Nullable Integer userStatus; + + public UserDto id(@Nullable Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public @Nullable Long getId() { + return id; + } + + public void setId(@Nullable Long id) { + this.id = id; + } + + public UserDto username(@Nullable String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + + @JsonProperty("username") + public @Nullable String getUsername() { + return username; + } + + public void setUsername(@Nullable String username) { + this.username = username; + } + + public UserDto firstName(@Nullable String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + + @JsonProperty("firstName") + public @Nullable String getFirstName() { + return firstName; + } + + public void setFirstName(@Nullable String firstName) { + this.firstName = firstName; + } + + public UserDto lastName(@Nullable String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + + @JsonProperty("lastName") + public @Nullable String getLastName() { + return lastName; + } + + public void setLastName(@Nullable String lastName) { + this.lastName = lastName; + } + + public UserDto email(@Nullable String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + + @JsonProperty("email") + public @Nullable String getEmail() { + return email; + } + + public void setEmail(@Nullable String email) { + this.email = email; + } + + public UserDto password(@Nullable String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + + @JsonProperty("password") + public @Nullable String getPassword() { + return password; + } + + public void setPassword(@Nullable String password) { + this.password = password; + } + + public UserDto phone(@Nullable String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + + @JsonProperty("phone") + public @Nullable String getPhone() { + return phone; + } + + public void setPhone(@Nullable String phone) { + this.phone = phone; + } + + public UserDto userStatus(@Nullable Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + + @JsonProperty("userStatus") + public @Nullable Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(@Nullable Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserDto user = (UserDto) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java new file mode 100644 index 000000000000..9f2473a6f2f2 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java @@ -0,0 +1,812 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * XmlItemDto + */ + +@JsonTypeName("XmlItem") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public class XmlItemDto { + + private @Nullable String attributeString; + + private @Nullable BigDecimal attributeNumber; + + private @Nullable Integer attributeInteger; + + private @Nullable Boolean attributeBoolean; + + + private List wrappedArray = new ArrayList<>(); + + private @Nullable String nameString; + + private @Nullable BigDecimal nameNumber; + + private @Nullable Integer nameInteger; + + private @Nullable Boolean nameBoolean; + + + private List nameArray = new ArrayList<>(); + + + private List nameWrappedArray = new ArrayList<>(); + + private @Nullable String prefixString; + + private @Nullable BigDecimal prefixNumber; + + private @Nullable Integer prefixInteger; + + private @Nullable Boolean prefixBoolean; + + + private List prefixArray = new ArrayList<>(); + + + private List prefixWrappedArray = new ArrayList<>(); + + private @Nullable String namespaceString; + + private @Nullable BigDecimal namespaceNumber; + + private @Nullable Integer namespaceInteger; + + private @Nullable Boolean namespaceBoolean; + + + private List namespaceArray = new ArrayList<>(); + + + private List namespaceWrappedArray = new ArrayList<>(); + + private @Nullable String prefixNsString; + + private @Nullable BigDecimal prefixNsNumber; + + private @Nullable Integer prefixNsInteger; + + private @Nullable Boolean prefixNsBoolean; + + + private List prefixNsArray = new ArrayList<>(); + + + private List prefixNsWrappedArray = new ArrayList<>(); + + public XmlItemDto attributeString(@Nullable String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + + @JsonProperty("attribute_string") + public @Nullable String getAttributeString() { + return attributeString; + } + + public void setAttributeString(@Nullable String attributeString) { + this.attributeString = attributeString; + } + + public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + + @JsonProperty("attribute_number") + public @Nullable BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(@Nullable BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItemDto attributeInteger(@Nullable Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + + @JsonProperty("attribute_integer") + public @Nullable Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(@Nullable Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItemDto attributeBoolean(@Nullable Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + + @JsonProperty("attribute_boolean") + public @Nullable Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(@Nullable Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItemDto wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItemDto addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + + @JsonProperty("wrapped_array") + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItemDto nameString(@Nullable String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + + @JsonProperty("name_string") + public @Nullable String getNameString() { + return nameString; + } + + public void setNameString(@Nullable String nameString) { + this.nameString = nameString; + } + + public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + + @JsonProperty("name_number") + public @Nullable BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(@Nullable BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItemDto nameInteger(@Nullable Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + + @JsonProperty("name_integer") + public @Nullable Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(@Nullable Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItemDto nameBoolean(@Nullable Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + + @JsonProperty("name_boolean") + public @Nullable Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(@Nullable Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItemDto nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItemDto addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + + @JsonProperty("name_array") + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItemDto nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItemDto addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + + @JsonProperty("name_wrapped_array") + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItemDto prefixString(@Nullable String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + + @JsonProperty("prefix_string") + public @Nullable String getPrefixString() { + return prefixString; + } + + public void setPrefixString(@Nullable String prefixString) { + this.prefixString = prefixString; + } + + public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + + @JsonProperty("prefix_number") + public @Nullable BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(@Nullable BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItemDto prefixInteger(@Nullable Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + + @JsonProperty("prefix_integer") + public @Nullable Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(@Nullable Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItemDto prefixBoolean(@Nullable Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + + @JsonProperty("prefix_boolean") + public @Nullable Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(@Nullable Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItemDto prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItemDto addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + + @JsonProperty("prefix_array") + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItemDto prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItemDto addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + + @JsonProperty("prefix_wrapped_array") + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItemDto namespaceString(@Nullable String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + + @JsonProperty("namespace_string") + public @Nullable String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(@Nullable String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + + @JsonProperty("namespace_number") + public @Nullable BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(@Nullable BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItemDto namespaceInteger(@Nullable Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + + @JsonProperty("namespace_integer") + public @Nullable Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(@Nullable Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItemDto namespaceBoolean(@Nullable Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + + @JsonProperty("namespace_boolean") + public @Nullable Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(@Nullable Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItemDto namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItemDto addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + + @JsonProperty("namespace_array") + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItemDto namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItemDto addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + + @JsonProperty("namespace_wrapped_array") + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItemDto prefixNsString(@Nullable String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + + @JsonProperty("prefix_ns_string") + public @Nullable String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(@Nullable String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItemDto prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + + @JsonProperty("prefix_ns_number") + public @Nullable BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(@Nullable BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItemDto prefixNsInteger(@Nullable Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + + @JsonProperty("prefix_ns_integer") + public @Nullable Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(@Nullable Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItemDto prefixNsBoolean(@Nullable Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + + @JsonProperty("prefix_ns_boolean") + public @Nullable Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(@Nullable Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItemDto prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItemDto addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + + @JsonProperty("prefix_ns_array") + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItemDto prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItemDto addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + + @JsonProperty("prefix_ns_wrapped_array") + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItemDto xmlItem = (XmlItemDto) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItemDto {\n"); + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(@Nullable Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + From a61b5d939bba22d99f03f8a7d3b5711cf081feea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Tue, 3 Feb 2026 16:31:25 +0100 Subject: [PATCH 05/17] generate sample files --- .../.openapi-generator/FILES | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES index c1c311163fa2..69906eac967c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES +++ b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/api/AnotherFakeApi.java From 67839a23579f63bfedb1c388ddf77222fbb70883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Tue, 3 Feb 2026 23:12:29 +0100 Subject: [PATCH 06/17] generate sample files --- .../codegen/languages/SpringCodegen.java | 8 +- .../spring-http-interface/api.mustache | 3 +- .../org/openapitools/api/AnotherFakeApi.java | 3 +- .../java/org/openapitools/api/FakeApi.java | 83 +++++++++--------- .../api/FakeClassnameTags123Api.java | 3 +- .../java/org/openapitools/api/PetApi.java | 29 ++++--- .../java/org/openapitools/api/StoreApi.java | 7 +- .../java/org/openapitools/api/UserApi.java | 19 ++-- .../model/AdditionalPropertiesAnyTypeDto.java | 3 +- .../model/AdditionalPropertiesArrayDto.java | 3 +- .../model/AdditionalPropertiesBooleanDto.java | 3 +- .../model/AdditionalPropertiesClassDto.java | 29 ++++--- .../model/AdditionalPropertiesIntegerDto.java | 3 +- .../model/AdditionalPropertiesNumberDto.java | 3 +- .../model/AdditionalPropertiesObjectDto.java | 3 +- .../model/AdditionalPropertiesStringDto.java | 3 +- .../org/openapitools/model/AnimalDto.java | 5 +- .../openapitools/model/ApiResponseDto.java | 3 +- .../model/ArrayOfArrayOfNumberOnlyDto.java | 7 +- .../model/ArrayOfNumberOnlyDto.java | 7 +- .../org/openapitools/model/ArrayTestDto.java | 23 ++--- .../org/openapitools/model/BigCatDto.java | 3 +- .../openapitools/model/CapitalizationDto.java | 3 +- .../java/org/openapitools/model/CatDto.java | 3 +- .../org/openapitools/model/CategoryDto.java | 5 +- .../model/ChildWithNullableDto.java | 3 +- .../org/openapitools/model/ClassModelDto.java | 3 +- .../org/openapitools/model/ClientDto.java | 3 +- .../model/ContainerDefaultValueDto.java | 15 ++-- .../java/org/openapitools/model/DogDto.java | 3 +- .../org/openapitools/model/EnumArraysDto.java | 5 +- .../org/openapitools/model/EnumClassDto.java | 3 +- .../org/openapitools/model/EnumTestDto.java | 7 +- .../java/org/openapitools/model/FileDto.java | 3 +- .../model/FileSchemaTestClassDto.java | 17 ++-- .../org/openapitools/model/FormatTestDto.java | 29 ++++--- .../model/HasOnlyReadOnlyDto.java | 3 +- .../java/org/openapitools/model/ListDto.java | 3 +- .../org/openapitools/model/MapTestDto.java | 13 +-- ...ertiesAndAdditionalPropertiesClassDto.java | 11 +-- .../model/Model200ResponseDto.java | 3 +- .../java/org/openapitools/model/NameDto.java | 5 +- .../model/NullableMapPropertyDto.java | 5 +- .../org/openapitools/model/NumberOnlyDto.java | 5 +- .../java/org/openapitools/model/OrderDto.java | 5 +- .../openapitools/model/OuterCompositeDto.java | 5 +- .../org/openapitools/model/OuterEnumDto.java | 3 +- .../model/ParentWithNullableDto.java | 3 +- .../java/org/openapitools/model/PetDto.java | 23 ++--- .../openapitools/model/ReadOnlyFirstDto.java | 3 +- ...ponseObjectWithDifferentFieldNamesDto.java | 3 +- .../org/openapitools/model/ReturnDto.java | 3 +- .../model/SpecialModelNameDto.java | 3 +- .../java/org/openapitools/model/TagDto.java | 3 +- .../model/TypeHolderDefaultDto.java | 15 ++-- .../model/TypeHolderExampleDto.java | 17 ++-- .../java/org/openapitools/model/UserDto.java | 3 +- .../org/openapitools/model/XmlItemDto.java | 31 +++---- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 6 +- .../java/org/openapitools/api/FakeApi.java | 86 ++++++++++--------- .../api/FakeClassnameTags123Api.java | 6 +- .../java/org/openapitools/api/PetApi.java | 32 ++++--- .../java/org/openapitools/api/StoreApi.java | 10 ++- .../java/org/openapitools/api/UserApi.java | 22 +++-- .../model/AdditionalPropertiesAnyType.java | 3 +- .../model/AdditionalPropertiesArray.java | 3 +- .../model/AdditionalPropertiesBoolean.java | 3 +- .../model/AdditionalPropertiesClass.java | 29 ++++--- .../model/AdditionalPropertiesInteger.java | 3 +- .../model/AdditionalPropertiesNumber.java | 3 +- .../model/AdditionalPropertiesObject.java | 3 +- .../model/AdditionalPropertiesString.java | 3 +- .../java/org/openapitools/model/Animal.java | 5 +- .../model/ArrayOfArrayOfNumberOnly.java | 7 +- .../openapitools/model/ArrayOfNumberOnly.java | 7 +- .../org/openapitools/model/ArrayTest.java | 23 ++--- .../java/org/openapitools/model/BigCat.java | 3 +- .../openapitools/model/Capitalization.java | 3 +- .../main/java/org/openapitools/model/Cat.java | 3 +- .../java/org/openapitools/model/Category.java | 5 +- .../openapitools/model/ChildWithNullable.java | 3 +- .../org/openapitools/model/ClassModel.java | 3 +- .../java/org/openapitools/model/Client.java | 3 +- .../model/ContainerDefaultValue.java | 15 ++-- .../main/java/org/openapitools/model/Dog.java | 3 +- .../org/openapitools/model/EnumArrays.java | 5 +- .../org/openapitools/model/EnumClass.java | 3 +- .../java/org/openapitools/model/EnumTest.java | 7 +- .../java/org/openapitools/model/File.java | 3 +- .../model/FileSchemaTestClass.java | 17 ++-- .../org/openapitools/model/FormatTest.java | 29 ++++--- .../openapitools/model/HasOnlyReadOnly.java | 3 +- .../java/org/openapitools/model/MapTest.java | 13 +-- ...ropertiesAndAdditionalPropertiesClass.java | 11 +-- .../openapitools/model/Model200Response.java | 3 +- .../openapitools/model/ModelApiResponse.java | 3 +- .../org/openapitools/model/ModelList.java | 3 +- .../org/openapitools/model/ModelReturn.java | 3 +- .../java/org/openapitools/model/Name.java | 5 +- .../model/NullableMapProperty.java | 5 +- .../org/openapitools/model/NumberOnly.java | 5 +- .../java/org/openapitools/model/Order.java | 5 +- .../openapitools/model/OuterComposite.java | 5 +- .../org/openapitools/model/OuterEnum.java | 3 +- .../model/ParentWithNullable.java | 3 +- .../main/java/org/openapitools/model/Pet.java | 23 ++--- .../org/openapitools/model/ReadOnlyFirst.java | 3 +- ...ResponseObjectWithDifferentFieldNames.java | 3 +- .../openapitools/model/SpecialModelName.java | 3 +- .../main/java/org/openapitools/model/Tag.java | 3 +- .../openapitools/model/TypeHolderDefault.java | 15 ++-- .../openapitools/model/TypeHolderExample.java | 17 ++-- .../java/org/openapitools/model/User.java | 3 +- .../java/org/openapitools/model/XmlItem.java | 31 +++---- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + 138 files changed, 615 insertions(+), 462 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index d9fdf3786f46..d1572e4439a6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -385,13 +385,13 @@ public void processOpts() { annotationLibrary = AnnotationLibrary.NONE; useJakartaEe = true; if(additionalProperties.containsKey(USE_BEANVALIDATION)) { - useBeanValidation = Boolean.parseBoolean(additionalProperties.get(USE_BEANVALIDATION).toString()); + useBeanValidation = convertPropertyToBoolean(USE_BEANVALIDATION); } else { //default to false if not specified useBeanValidation = false; } if(additionalProperties.containsKey(PERFORM_BEANVALIDATION)) { - performBeanValidation = Boolean.parseBoolean(additionalProperties.get(PERFORM_BEANVALIDATION).toString()); + performBeanValidation = convertPropertyToBoolean(PERFORM_BEANVALIDATION); } else { //default to false if not specified performBeanValidation = false; @@ -407,8 +407,7 @@ public void processOpts() { applyJakartaPackage(); - LOGGER.warn("For Spring HTTP Interface following options are disabled: documentProvider, annotationLibrary, useBeanValidation, performBeanValidation. " - + "useJakartaEe defaulted to 'true'"); + LOGGER.warn("For Spring HTTP Interface following options are disabled: documentProvider, annotationLibrary. useJakartaEe defaulted to 'true'"); } if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) { @@ -569,7 +568,6 @@ public void processOpts() { } else if (SPRING_HTTP_INTERFACE.equals(library)) { supportingFiles.add(new SupportingFile("httpInterfacesConfiguration.mustache", (sourceFolder + File.separator + configPackage).replace(".", java.io.File.separator), "HttpInterfacesAbstractConfigurator.java")); - writePropertyBack(USE_BEANVALIDATION, false); } } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache index 68c3fae791c5..cf346d72d331 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache @@ -34,8 +34,9 @@ import java.util.Optional; import {{javaxPackage}}.annotation.Generated; -{{>generatedAnnotation}} {{#useBeanValidation}}{{^useSpringBuiltInValidation}}@Validated{{/useSpringBuiltInValidation}}{{/useBeanValidation}} +{{>generatedAnnotation}} + {{#operations}} public interface {{classname}} { {{#operation}} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 01d1324ff23b..9b0b472f2a00 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface AnotherFakeApi { @@ -34,7 +35,7 @@ public interface AnotherFakeApi { contentType = "application/json" ) ResponseEntity call123testSpecialTags( - @RequestBody ClientDto clientDto + @Valid @RequestBody ClientDto clientDto ); } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java index fc8aa14fdf11..fa1cdfb8a512 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -28,6 +28,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeApi { @@ -45,7 +46,7 @@ public interface FakeApi { contentType = "application/xml" ) ResponseEntity createXmlItem( - @RequestBody XmlItemDto xmlItemDto + @Valid @RequestBody XmlItemDto xmlItemDto ); @@ -63,7 +64,7 @@ ResponseEntity createXmlItem( contentType = "application/json" ) ResponseEntity fakeOuterBooleanSerialize( - @RequestBody(required = false) @Nullable Boolean body + @Valid @RequestBody(required = false) @Nullable Boolean body ); @@ -81,7 +82,7 @@ ResponseEntity fakeOuterBooleanSerialize( contentType = "application/json" ) ResponseEntity fakeOuterCompositeSerialize( - @RequestBody(required = false) @Nullable OuterCompositeDto outerCompositeDto + @Valid @RequestBody(required = false) @Nullable OuterCompositeDto outerCompositeDto ); @@ -99,7 +100,7 @@ ResponseEntity fakeOuterCompositeSerialize( contentType = "application/json" ) ResponseEntity fakeOuterNumberSerialize( - @RequestBody(required = false) @Nullable BigDecimal body + @Valid @RequestBody(required = false) @Nullable BigDecimal body ); @@ -117,7 +118,7 @@ ResponseEntity fakeOuterNumberSerialize( contentType = "application/json" ) ResponseEntity fakeOuterStringSerialize( - @RequestBody(required = false) @Nullable String body + @Valid @RequestBody(required = false) @Nullable String body ); @@ -135,7 +136,7 @@ ResponseEntity fakeOuterStringSerialize( contentType = "application/json" ) ResponseEntity testBodyWithFileSchema( - @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto + @Valid @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto ); @@ -153,8 +154,8 @@ ResponseEntity testBodyWithFileSchema( contentType = "application/json" ) ResponseEntity testBodyWithQueryParams( - @RequestParam(value = "query", required = true) String query, - @RequestBody UserDto userDto + @NotNull @Valid @RequestParam(value = "query", required = true) String query, + @Valid @RequestBody UserDto userDto ); @@ -172,7 +173,7 @@ ResponseEntity testBodyWithQueryParams( contentType = "application/json" ) ResponseEntity testClientModel( - @RequestBody ClientDto clientDto + @Valid @RequestBody ClientDto clientDto ); @@ -204,20 +205,20 @@ ResponseEntity testClientModel( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testEndpointParameters( - @RequestParam(value = "number", required = true) BigDecimal number, - @RequestParam(value = "double", required = true) Double _double, - @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @RequestParam(value = "byte", required = true) byte[] _byte, - @RequestParam(value = "integer", required = false) Integer integer, - @RequestParam(value = "int32", required = false) Integer int32, - @RequestParam(value = "int64", required = false) Long int64, - @RequestParam(value = "float", required = false) Float _float, - @RequestParam(value = "string", required = false) String string, + @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") @Valid @RequestParam(value = "number", required = true) BigDecimal number, + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") @Valid @RequestParam(value = "double", required = true) Double _double, + @Pattern(regexp = "^[A-Z].*") @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Valid @RequestParam(value = "byte", required = true) byte[] _byte, + @Min(value = 10) @Max(value = 100) @Valid @RequestParam(value = "integer", required = false) Integer integer, + @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, + @Valid @RequestParam(value = "int64", required = false) Long int64, + @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, + @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, @RequestPart(value = "binary", required = false) MultipartFile binary, - @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @RequestParam(value = "password", required = false) String password, - @RequestParam(value = "callback", required = false) String paramCallback + @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Size(min = 10, max = 64) @Valid @RequestParam(value = "password", required = false) String password, + @Valid @RequestParam(value = "callback", required = false) String paramCallback ); @@ -245,12 +246,12 @@ ResponseEntity testEndpointParameters( ResponseEntity testEnumParameters( @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray, @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, - @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, - @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, - @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Valid @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, + @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Valid @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, + @Valid @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, + @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ); @@ -272,12 +273,12 @@ ResponseEntity testEnumParameters( accept = { "application/json" } ) ResponseEntity testGroupParameters( - @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, + @NotNull @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @NotNull @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Valid @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup, - @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group + @Valid @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group ); @@ -295,7 +296,7 @@ ResponseEntity testGroupParameters( contentType = "application/json" ) ResponseEntity testInlineAdditionalProperties( - @RequestBody Map requestBody + @Valid @RequestBody Map requestBody ); @@ -314,8 +315,8 @@ ResponseEntity testInlineAdditionalProperties( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testJsonFormData( - @RequestParam(value = "param", required = true) String param, - @RequestParam(value = "param2", required = true) String param2 + @Valid @RequestParam(value = "param", required = true) String param, + @Valid @RequestParam(value = "param2", required = true) String param2 ); @@ -333,7 +334,7 @@ ResponseEntity testJsonFormData( contentType = "application/json" ) ResponseEntity testNullable( - @RequestBody ChildWithNullableDto childWithNullableDto + @Valid @RequestBody ChildWithNullableDto childWithNullableDto ); @@ -353,10 +354,10 @@ ResponseEntity testNullable( accept = { "application/json" } ) ResponseEntity testQueryParameterCollectionFormat( - @RequestParam(value = "pipe", required = true) List pipe, - @RequestParam(value = "http", required = true) List http, - @RequestParam(value = "url", required = true) List url, - @RequestParam(value = "context", required = true) List context + @NotNull @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Valid @RequestParam(value = "context", required = true) List context ); diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 733c3da6a214..2158aaa579b5 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeClassnameTags123Api { @@ -34,7 +35,7 @@ public interface FakeClassnameTags123Api { contentType = "application/json" ) ResponseEntity testClassname( - @RequestBody ClientDto clientDto + @Valid @RequestBody ClientDto clientDto ); } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java index 1e123cf725a0..0ac83d49c9e3 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface PetApi { @@ -39,7 +40,7 @@ public interface PetApi { contentType = "application/json" ) ResponseEntity addPet( - @RequestBody PetDto petDto + @Valid @RequestBody PetDto petDto ); @@ -58,7 +59,7 @@ ResponseEntity addPet( accept = { "application/json" } ) ResponseEntity deletePet( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ); @@ -77,7 +78,7 @@ ResponseEntity deletePet( accept = { "application/json", "application/xml" } ) ResponseEntity> findPetsByStatus( - @RequestParam(value = "status", required = true) List status + @NotNull @Valid @RequestParam(value = "status", required = true) List status ); @@ -97,7 +98,7 @@ ResponseEntity> findPetsByStatus( accept = { "application/json", "application/xml" } ) ResponseEntity> findPetsByTags( - @RequestParam(value = "tags", required = true) Set tags + @NotNull @Valid @RequestParam(value = "tags", required = true) Set tags ); @@ -116,7 +117,7 @@ ResponseEntity> findPetsByTags( accept = { "application/json", "application/xml" } ) ResponseEntity getPetById( - @PathVariable("petId") Long petId + @NotNull @PathVariable("petId") Long petId ); @@ -132,7 +133,7 @@ ResponseEntity getPetById( accept = { "application/json" } ) ResponseEntity responseObjectDifferentNames( - @PathVariable("petId") Long petId + @NotNull @PathVariable("petId") Long petId ); @@ -153,7 +154,7 @@ ResponseEntity responseObjectDifferent contentType = "application/json" ) ResponseEntity updatePet( - @RequestBody PetDto petDto + @Valid @RequestBody PetDto petDto ); @@ -173,9 +174,9 @@ ResponseEntity updatePet( contentType = "application/x-www-form-urlencoded" ) ResponseEntity updatePetWithForm( - @PathVariable("petId") Long petId, - @RequestParam(value = "name", required = false) String name, - @RequestParam(value = "status", required = false) String status + @NotNull @PathVariable("petId") Long petId, + @Valid @RequestParam(value = "name", required = false) String name, + @Valid @RequestParam(value = "status", required = false) String status ); @@ -195,8 +196,8 @@ ResponseEntity updatePetWithForm( contentType = "multipart/form-data" ) ResponseEntity uploadFile( - @PathVariable("petId") Long petId, - @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @NotNull @PathVariable("petId") Long petId, + @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ); @@ -217,9 +218,9 @@ ResponseEntity uploadFile( contentType = "multipart/form-data" ) ResponseEntity uploadFileWithRequiredFile( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ); } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java index 6bcb815d5b5a..1d3480382ef0 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface StoreApi { @@ -35,7 +36,7 @@ public interface StoreApi { accept = { "application/json" } ) ResponseEntity deleteOrder( - @PathVariable("order_id") String orderId + @NotNull @PathVariable("order_id") String orderId ); @@ -70,7 +71,7 @@ ResponseEntity> getInventory( accept = { "application/json", "application/xml" } ) ResponseEntity getOrderById( - @PathVariable("order_id") Long orderId + @NotNull @Min(value = 1L) @Max(value = 5L) @PathVariable("order_id") Long orderId ); @@ -89,7 +90,7 @@ ResponseEntity getOrderById( contentType = "application/json" ) ResponseEntity placeOrder( - @RequestBody OrderDto orderDto + @Valid @RequestBody OrderDto orderDto ); } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java index 7adaff82408e..4f34e9cbf598 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface UserApi { @@ -35,7 +36,7 @@ public interface UserApi { contentType = "application/json" ) ResponseEntity createUser( - @RequestBody UserDto userDto + @Valid @RequestBody UserDto userDto ); @@ -53,7 +54,7 @@ ResponseEntity createUser( contentType = "application/json" ) ResponseEntity createUsersWithArrayInput( - @RequestBody List userDto + @Valid @RequestBody List<@Valid UserDto> userDto ); @@ -71,7 +72,7 @@ ResponseEntity createUsersWithArrayInput( contentType = "application/json" ) ResponseEntity createUsersWithListInput( - @RequestBody List userDto + @Valid @RequestBody List<@Valid UserDto> userDto ); @@ -89,7 +90,7 @@ ResponseEntity createUsersWithListInput( accept = { "application/json" } ) ResponseEntity deleteUser( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ); @@ -108,7 +109,7 @@ ResponseEntity deleteUser( accept = { "application/json", "application/xml" } ) ResponseEntity getUserByName( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ); @@ -127,8 +128,8 @@ ResponseEntity getUserByName( accept = { "application/json", "application/xml" } ) ResponseEntity loginUser( - @RequestParam(value = "username", required = true) String username, - @RequestParam(value = "password", required = true) String password + @NotNull @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Valid @RequestParam(value = "password", required = true) String password ); @@ -164,8 +165,8 @@ ResponseEntity logoutUser( contentType = "application/json" ) ResponseEntity updateUser( - @PathVariable("username") String username, - @RequestBody UserDto userDto + @NotNull @PathVariable("username") String username, + @Valid @RequestBody UserDto userDto ); } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java index 3e02dfb50ca5..886970920eb1 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java index 497bd9eb1285..4197bbea822d 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -9,7 +9,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java index 60a45b5ed9cc..1977e18d11ed 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 629426ed1bcf..13a840072673 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -15,7 +15,8 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -29,28 +30,28 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - + @Valid private Map mapString = new HashMap<>(); - + @Valid private Map mapNumber = new HashMap<>(); - + @Valid private Map mapInteger = new HashMap<>(); - + @Valid private Map mapBoolean = new HashMap<>(); - + @Valid private Map> mapArrayInteger = new HashMap<>(); - + @Valid private Map> mapArrayAnytype = new HashMap<>(); - + @Valid private Map> mapMapString = new HashMap<>(); - + @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; @@ -103,7 +104,7 @@ public AdditionalPropertiesClassDto putMapNumberItem(String key, BigDecimal mapN * Get mapNumber * @return mapNumber */ - + @Valid @JsonProperty("map_number") public Map getMapNumber() { return mapNumber; @@ -184,7 +185,7 @@ public AdditionalPropertiesClassDto putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; @@ -211,7 +212,7 @@ public AdditionalPropertiesClassDto putMapArrayAnytypeItem(String key, List> getMapArrayAnytype() { return mapArrayAnytype; @@ -238,7 +239,7 @@ public AdditionalPropertiesClassDto putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; @@ -265,7 +266,7 @@ public AdditionalPropertiesClassDto putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java index c566ab2481fc..33b4c4c65fb2 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java index 75eda796c3eb..38effa5104b2 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -9,7 +9,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java index 1949afe4c581..6c87b7e7fc99 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -9,7 +9,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java index 945ba5bfdddf..c9f34e8ffaa5 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java index 44585b4222f0..3ddcbf21b31b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -52,7 +53,7 @@ public AnimalDto className(String className) { * Get className * @return className */ - @NotNull + @NotNull @JsonProperty("className") public String getClassName() { return className; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java index 937c1814095c..bf085b05eda4 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 9153e5dac5c9..15cfbe917bc8 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -26,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - + @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +47,7 @@ public ArrayOfArrayOfNumberOnlyDto addArrayArrayNumberItem(List arra * Get arrayArrayNumber * @return arrayArrayNumber */ - + @Valid @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { return arrayArrayNumber; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index 98ed15a0b184..b61174cf1bdc 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -26,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - + @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { @@ -46,7 +47,7 @@ public ArrayOfNumberOnlyDto addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - + @Valid @JsonProperty("ArrayNumber") public List getArrayNumber() { return arrayNumber; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java index 7de0d174f1b6..593114ac41b3 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -26,14 +27,14 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class ArrayTestDto { - + @Valid private List arrayOfString = new ArrayList<>(); - + @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - - private List> arrayArrayOfModel = new ArrayList<>(); + @Valid + private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -79,7 +80,7 @@ public ArrayTestDto addArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - + @Valid @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; @@ -89,12 +90,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTestDto addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -106,13 +107,13 @@ public ArrayTestDto addArrayArrayOfModelItem(List arrayArrayOf * Get arrayArrayOfModel * @return arrayArrayOfModel */ - + @Valid @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java index f8685bbe513c..d2ff6b309852 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java @@ -13,7 +13,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java index 1c7a8b98ae3e..d8cc493ddf15 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java index 051efd518e0e..3aa992e73ab6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java index fba08710dadf..902d5dc87f18 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -58,7 +59,7 @@ public CategoryDto name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java index 2da557bac29d..511a8e92b74c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -15,7 +15,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java index f0531a128c3d..1c87aaf53b6f 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java index a199fc8203ad..7981678f9e83 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 863248d301de..93283cfff1c5 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -13,7 +13,8 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -27,16 +28,16 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class ContainerDefaultValueDto { - + @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - + @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - + @Valid private List requiredArray = new ArrayList<>(); - + @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValueDto() { @@ -87,7 +88,7 @@ public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequ * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull + @NotNull @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { return nullableRequiredArray; @@ -114,7 +115,7 @@ public ContainerDefaultValueDto addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull + @NotNull @JsonProperty("required_array") public List getRequiredArray() { return requiredArray; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java index e66b8b730481..a32df78ef3cc 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java index d638aa2e39ca..bb0d71da9a24 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -98,7 +99,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - + @Valid private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java index 766783743ebe..45b32592b12d 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java @@ -5,7 +5,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java index f22f967bbd04..b1dbd61aaeaf 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java @@ -10,7 +10,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -210,7 +211,7 @@ public EnumTestDto enumStringRequired(EnumStringRequiredEnum enumStringRequired) * Get enumStringRequired * @return enumStringRequired */ - @NotNull + @NotNull @JsonProperty("enum_string_required") public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; @@ -267,7 +268,7 @@ public EnumTestDto outerEnum(@Nullable OuterEnumDto outerEnum) { * Get outerEnum * @return outerEnum */ - + @Valid @JsonProperty("outerEnum") public @Nullable OuterEnumDto getOuterEnum() { return outerEnum; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java index 1b4e72e7de4e..f556f0485ca1 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index df3798815bd4..41900022c953 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -28,8 +29,8 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - - private List files = new ArrayList<>(); + @Valid + private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { this.file = file; @@ -40,7 +41,7 @@ public FileSchemaTestClassDto file(@Nullable FileDto file) { * Get file * @return file */ - + @Valid @JsonProperty("file") public @Nullable FileDto getFile() { return file; @@ -50,7 +51,7 @@ public void setFile(@Nullable FileDto file) { this.file = file; } - public FileSchemaTestClassDto files(List files) { + public FileSchemaTestClassDto files(List<@Valid FileDto> files) { this.files = files; return this; } @@ -67,13 +68,13 @@ public FileSchemaTestClassDto addFilesItem(FileDto filesItem) { * Get files * @return files */ - + @Valid @JsonProperty("files") - public List getFiles() { + public List<@Valid FileDto> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid FileDto> files) { this.files = files; } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java index c00c48deed87..98778497e61a 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java @@ -14,7 +14,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -73,7 +74,7 @@ public FormatTestDto integer(@Nullable Integer integer) { * maximum: 100 * @return integer */ - + @Min(value = 10) @Max(value = 100) @JsonProperty("integer") public @Nullable Integer getInteger() { return integer; @@ -94,7 +95,7 @@ public FormatTestDto int32(@Nullable Integer int32) { * maximum: 200 * @return int32 */ - + @Min(value = 20) @Max(value = 200) @JsonProperty("int32") public @Nullable Integer getInt32() { return int32; @@ -134,7 +135,7 @@ public FormatTestDto number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull + @NotNull @Valid @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") @JsonProperty("number") public BigDecimal getNumber() { return number; @@ -155,7 +156,7 @@ public FormatTestDto _float(@Nullable Float _float) { * maximum: 987.6 * @return _float */ - + @DecimalMin(value = "54.3") @DecimalMax(value = "987.6") @JsonProperty("float") public @Nullable Float getFloat() { return _float; @@ -176,7 +177,7 @@ public FormatTestDto _double(@Nullable Double _double) { * maximum: 123.4 * @return _double */ - + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") @JsonProperty("double") public @Nullable Double getDouble() { return _double; @@ -195,7 +196,7 @@ public FormatTestDto string(@Nullable String string) { * Get string * @return string */ - + @Pattern(regexp = "/[a-z]/i") @JsonProperty("string") public @Nullable String getString() { return string; @@ -214,7 +215,7 @@ public FormatTestDto _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull + @NotNull @JsonProperty("byte") public byte[] getByte() { return _byte; @@ -233,7 +234,7 @@ public FormatTestDto binary(@Nullable org.springframework.core.io.Resource binar * Get binary * @return binary */ - + @Valid @JsonProperty("binary") public @Nullable org.springframework.core.io.Resource getBinary() { return binary; @@ -252,7 +253,7 @@ public FormatTestDto date(LocalDate date) { * Get date * @return date */ - @NotNull + @NotNull @Valid @JsonProperty("date") public LocalDate getDate() { return date; @@ -271,7 +272,7 @@ public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -290,7 +291,7 @@ public FormatTestDto uuid(@Nullable UUID uuid) { * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -309,7 +310,7 @@ public FormatTestDto password(String password) { * Get password * @return password */ - @NotNull + @NotNull @Size(min = 10, max = 64) @JsonProperty("password") public String getPassword() { return password; @@ -328,7 +329,7 @@ public FormatTestDto bigDecimal(@Nullable BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - + @Valid @JsonProperty("BigDecimal") public @Nullable BigDecimal getBigDecimal() { return bigDecimal; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java index f70bfcfb3b3a..5280f2a6b4cd 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java index c155a45c0b6c..75c03c0c5d45 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java index d585aaf5cb7e..393ffaa82d9f 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -25,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class MapTestDto { - + @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +64,13 @@ public static InnerEnum fromValue(String value) { } } - + @Valid private Map mapOfEnumString = new HashMap<>(); - + @Valid private Map directMap = new HashMap<>(); - + @Valid private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { @@ -89,7 +90,7 @@ public MapTestDto putMapMapOfStringItem(String key, Map mapMapOf * Get mapMapOfString * @return mapMapOfString */ - + @Valid @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { return mapMapOfString; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index 69a49c3b06ea..ee001161dc60 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -14,7 +14,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -33,7 +34,7 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - + @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { @@ -45,7 +46,7 @@ public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -64,7 +65,7 @@ public MixedPropertiesAndAdditionalPropertiesClassDto dateTime(@Nullable OffsetD * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -91,7 +92,7 @@ public MixedPropertiesAndAdditionalPropertiesClassDto putMapItem(String key, Ani * Get map * @return map */ - + @Valid @JsonProperty("map") public Map getMap() { return map; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java index eac1d092c452..6da351f6cedb 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java index 7b04969f2043..d95e2c968f07 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -43,7 +44,7 @@ public NameDto name(Integer name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public Integer getName() { return name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 13c83d77e9d6..2bd9502bcde9 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -13,7 +13,8 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -27,7 +28,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class NullableMapPropertyDto { - + @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapPropertyDto languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java index ee1c0fe4d347..69f5ec824231 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -9,7 +9,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -34,7 +35,7 @@ public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) { * Get justNumber * @return justNumber */ - + @Valid @JsonProperty("JustNumber") public @Nullable BigDecimal getJustNumber() { return justNumber; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java index 3d3c83438af5..1f918cc2cfe6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -141,7 +142,7 @@ public OrderDto shipDate(@Nullable OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - + @Valid @JsonProperty("shipDate") public @Nullable OffsetDateTime getShipDate() { return shipDate; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java index 91acbd9a1f35..a40688f14daa 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -9,7 +9,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -38,7 +39,7 @@ public OuterCompositeDto myNumber(@Nullable BigDecimal myNumber) { * Get myNumber * @return myNumber */ - + @Valid @JsonProperty("my_number") public @Nullable BigDecimal getMyNumber() { return myNumber; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java index 38a8d0eb9b4c..545582c00e48 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java @@ -5,7 +5,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java index 0f2e46a1229e..afdab67a078a 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -15,7 +15,8 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java index 8104d6f0dc21..d7a6158e2c03 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java @@ -17,7 +17,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -37,11 +38,11 @@ public class PetDto { private String name; - + @Valid private Set photoUrls = new LinkedHashSet<>(); - - private List tags = new ArrayList<>(); + @Valid + private List<@Valid TagDto> tags = new ArrayList<>(); /** * pet status in the store @@ -115,7 +116,7 @@ public PetDto category(@Nullable CategoryDto category) { * Get category * @return category */ - + @Valid @JsonProperty("category") public @Nullable CategoryDto getCategory() { return category; @@ -134,7 +135,7 @@ public PetDto name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; @@ -161,7 +162,7 @@ public PetDto addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull + @NotNull @JsonProperty("photoUrls") public Set getPhotoUrls() { return photoUrls; @@ -172,7 +173,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public PetDto tags(List tags) { + public PetDto tags(List<@Valid TagDto> tags) { this.tags = tags; return this; } @@ -189,13 +190,13 @@ public PetDto addTagsItem(TagDto tagsItem) { * Get tags * @return tags */ - + @Valid @JsonProperty("tags") - public List getTags() { + public List<@Valid TagDto> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java index 53e133b88860..3658a91bea4c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java index 3c9c502a23c9..52ddd241d878 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java index 68ff365e5acd..732fafa7bad9 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java index ee5527e5c733..8794e9221fb4 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java index 0de958ebee42..411f9e37d18d 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index e874605be925..986d6fe83a4d 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -34,7 +35,7 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - + @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { @@ -50,7 +51,7 @@ public TypeHolderDefaultDto stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull + @NotNull @JsonProperty("string_item") public String getStringItem() { return stringItem; @@ -69,7 +70,7 @@ public TypeHolderDefaultDto numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -88,7 +89,7 @@ public TypeHolderDefaultDto integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -107,7 +108,7 @@ public TypeHolderDefaultDto boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -134,7 +135,7 @@ public TypeHolderDefaultDto addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull + @NotNull @JsonProperty("array_item") public List getArrayItem() { return arrayItem; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index 917bff15c1da..3c5877a2c43e 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -36,7 +37,7 @@ public class TypeHolderExampleDto { private Boolean boolItem; - + @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { @@ -52,7 +53,7 @@ public TypeHolderExampleDto stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull + @NotNull @JsonProperty("string_item") public String getStringItem() { return stringItem; @@ -71,7 +72,7 @@ public TypeHolderExampleDto numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -90,7 +91,7 @@ public TypeHolderExampleDto floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull + @NotNull @JsonProperty("float_item") public Float getFloatItem() { return floatItem; @@ -109,7 +110,7 @@ public TypeHolderExampleDto integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -128,7 +129,7 @@ public TypeHolderExampleDto boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -155,7 +156,7 @@ public TypeHolderExampleDto addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull + @NotNull @JsonProperty("array_item") public List getArrayItem() { return arrayItem; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java index b367afd46957..a0cc4f95509f 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java index 9f2473a6f2f2..36faf67738e1 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -34,7 +35,7 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - + @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +46,10 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - + @Valid private List nameArray = new ArrayList<>(); - + @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +60,10 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - + @Valid private List prefixArray = new ArrayList<>(); - + @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +74,10 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - + @Valid private List namespaceArray = new ArrayList<>(); - + @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +88,10 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - + @Valid private List prefixNsArray = new ArrayList<>(); - + @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { @@ -121,7 +122,7 @@ public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - + @Valid @JsonProperty("attribute_number") public @Nullable BigDecimal getAttributeNumber() { return attributeNumber; @@ -224,7 +225,7 @@ public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - + @Valid @JsonProperty("name_number") public @Nullable BigDecimal getNameNumber() { return nameNumber; @@ -354,7 +355,7 @@ public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - + @Valid @JsonProperty("prefix_number") public @Nullable BigDecimal getPrefixNumber() { return prefixNumber; @@ -484,7 +485,7 @@ public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - + @Valid @JsonProperty("namespace_number") public @Nullable BigDecimal getNamespaceNumber() { return namespaceNumber; @@ -614,7 +615,7 @@ public XmlItemDto prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - + @Valid @JsonProperty("prefix_ns_number") public @Nullable BigDecimal getPrefixNsNumber() { return prefixNsNumber; diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java index ed5b3dc18980..8c15d5dc239f 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface AnotherFakeApi { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index bea5db699e3f..004b844abc87 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -28,6 +28,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeApi { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index c3444bb7be50..46050d64d1d9 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeClassnameTags123Api { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java index 26c7203f987f..4c23f1c5b758 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface PetApi { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java index be91a130caea..5b8b7360b72c 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface StoreApi { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index 52ddf435fe19..dfbd08972b8e 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface UserApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2787c9d1160d..ba0dbe4037e1 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import org.springframework.http.codec.multipart.Part; import reactor.core.publisher.Flux; @@ -21,6 +24,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface AnotherFakeApi { @@ -38,7 +42,7 @@ public interface AnotherFakeApi { contentType = "application/json" ) Mono> call123testSpecialTags( - @RequestBody Mono client + @Valid @RequestBody Mono client ); } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java index 0fefc031ea6d..5c2cac6624c1 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -21,6 +21,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import org.springframework.http.codec.multipart.Part; import reactor.core.publisher.Flux; @@ -32,6 +35,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeApi { @@ -49,7 +53,7 @@ public interface FakeApi { contentType = "application/xml" ) Mono> createXmlItem( - @RequestBody Mono xmlItem + @Valid @RequestBody Mono xmlItem ); @@ -67,7 +71,7 @@ Mono> createXmlItem( contentType = "application/json" ) Mono> fakeOuterBooleanSerialize( - @RequestBody(required = false) Mono body + @Valid @RequestBody(required = false) Mono body ); @@ -85,7 +89,7 @@ Mono> fakeOuterBooleanSerialize( contentType = "application/json" ) Mono> fakeOuterCompositeSerialize( - @RequestBody(required = false) Mono outerComposite + @Valid @RequestBody(required = false) Mono outerComposite ); @@ -103,7 +107,7 @@ Mono> fakeOuterCompositeSerialize( contentType = "application/json" ) Mono> fakeOuterNumberSerialize( - @RequestBody(required = false) Mono body + @Valid @RequestBody(required = false) Mono body ); @@ -121,7 +125,7 @@ Mono> fakeOuterNumberSerialize( contentType = "application/json" ) Mono> fakeOuterStringSerialize( - @RequestBody(required = false) Mono body + @Valid @RequestBody(required = false) Mono body ); @@ -139,7 +143,7 @@ Mono> fakeOuterStringSerialize( contentType = "application/json" ) Mono> testBodyWithFileSchema( - @RequestBody Mono fileSchemaTestClass + @Valid @RequestBody Mono fileSchemaTestClass ); @@ -157,8 +161,8 @@ Mono> testBodyWithFileSchema( contentType = "application/json" ) Mono> testBodyWithQueryParams( - @RequestParam(value = "query", required = true) String query, - @RequestBody Mono user + @NotNull @Valid @RequestParam(value = "query", required = true) String query, + @Valid @RequestBody Mono user ); @@ -176,7 +180,7 @@ Mono> testBodyWithQueryParams( contentType = "application/json" ) Mono> testClientModel( - @RequestBody Mono client + @Valid @RequestBody Mono client ); @@ -208,20 +212,20 @@ Mono> testClientModel( contentType = "application/x-www-form-urlencoded" ) Mono> testEndpointParameters( - @RequestPart(value = "number", required = true) BigDecimal number, - @RequestPart(value = "double", required = true) Double _double, - @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @RequestPart(value = "byte", required = true) byte[] _byte, - @RequestPart(value = "integer", required = false) Integer integer, - @RequestPart(value = "int32", required = false) Integer int32, - @RequestPart(value = "int64", required = false) Long int64, - @RequestPart(value = "float", required = false) Float _float, - @RequestPart(value = "string", required = false) String string, + @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") @Valid @RequestPart(value = "number", required = true) BigDecimal number, + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") @Valid @RequestPart(value = "double", required = true) Double _double, + @Pattern(regexp = "^[A-Z].*") @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + @Min(value = 10) @Max(value = 100) @Valid @RequestPart(value = "integer", required = false) Integer integer, + @Min(value = 20) @Max(value = 200) @Valid @RequestPart(value = "int32", required = false) Integer int32, + @Valid @RequestPart(value = "int64", required = false) Long int64, + @DecimalMax(value = "987.6") @Valid @RequestPart(value = "float", required = false) Float _float, + @Pattern(regexp = "/[a-z]/i") @Valid @RequestPart(value = "string", required = false) String string, @RequestPart(value = "binary", required = false) Part binary, - @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @RequestPart(value = "password", required = false) String password, - @RequestPart(value = "callback", required = false) String paramCallback + @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Size(min = 10, max = 64) @Valid @RequestPart(value = "password", required = false) String password, + @Valid @RequestPart(value = "callback", required = false) String paramCallback ); @@ -249,12 +253,12 @@ Mono> testEndpointParameters( Mono> testEnumParameters( @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray, @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, - @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, - @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, - @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @RequestPart(value = "enum_form_string", required = false) String enumFormString + @Valid @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, + @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Valid @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, + @Valid @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, + @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString ); @@ -276,12 +280,12 @@ Mono> testEnumParameters( accept = { "application/json" } ) Mono> testGroupParameters( - @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, + @NotNull @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @NotNull @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Valid @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup, - @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group + @Valid @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group ); @@ -299,7 +303,7 @@ Mono> testGroupParameters( contentType = "application/json" ) Mono> testInlineAdditionalProperties( - @RequestBody Mono> requestBody + @Valid @RequestBody Mono> requestBody ); @@ -318,8 +322,8 @@ Mono> testInlineAdditionalProperties( contentType = "application/x-www-form-urlencoded" ) Mono> testJsonFormData( - @RequestPart(value = "param", required = true) String param, - @RequestPart(value = "param2", required = true) String param2 + @Valid @RequestPart(value = "param", required = true) String param, + @Valid @RequestPart(value = "param2", required = true) String param2 ); @@ -337,7 +341,7 @@ Mono> testJsonFormData( contentType = "application/json" ) Mono> testNullable( - @RequestBody Mono childWithNullable + @Valid @RequestBody Mono childWithNullable ); @@ -357,10 +361,10 @@ Mono> testNullable( accept = { "application/json" } ) Mono> testQueryParameterCollectionFormat( - @RequestParam(value = "pipe", required = true) List pipe, - @RequestParam(value = "http", required = true) List http, - @RequestParam(value = "url", required = true) List url, - @RequestParam(value = "context", required = true) List context + @NotNull @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Valid @RequestParam(value = "context", required = true) List context ); diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 397cbee69eac..ea55bc0d754a 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import org.springframework.http.codec.multipart.Part; import reactor.core.publisher.Flux; @@ -21,6 +24,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeClassnameTags123Api { @@ -38,7 +42,7 @@ public interface FakeClassnameTags123Api { contentType = "application/json" ) Mono> testClassname( - @RequestBody Mono client + @Valid @RequestBody Mono client ); } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java index fd584ea831df..a7e64105f8a9 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java @@ -14,6 +14,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import org.springframework.http.codec.multipart.Part; import reactor.core.publisher.Flux; @@ -25,6 +28,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface PetApi { @@ -43,7 +47,7 @@ public interface PetApi { contentType = "application/json" ) Mono> addPet( - @RequestBody Mono pet + @Valid @RequestBody Mono pet ); @@ -62,7 +66,7 @@ Mono> addPet( accept = { "application/json" } ) Mono> deletePet( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ); @@ -81,7 +85,7 @@ Mono> deletePet( accept = { "application/json", "application/xml" } ) Mono>> findPetsByStatus( - @RequestParam(value = "status", required = true) List status + @NotNull @Valid @RequestParam(value = "status", required = true) List status ); @@ -101,7 +105,7 @@ Mono>> findPetsByStatus( accept = { "application/json", "application/xml" } ) Mono>> findPetsByTags( - @RequestParam(value = "tags", required = true) Set tags + @NotNull @Valid @RequestParam(value = "tags", required = true) Set tags ); @@ -120,7 +124,7 @@ Mono>> findPetsByTags( accept = { "application/json", "application/xml" } ) Mono> getPetById( - @PathVariable("petId") Long petId + @NotNull @PathVariable("petId") Long petId ); @@ -136,7 +140,7 @@ Mono> getPetById( accept = { "application/json" } ) Mono> responseObjectDifferentNames( - @PathVariable("petId") Long petId + @NotNull @PathVariable("petId") Long petId ); @@ -157,7 +161,7 @@ Mono> responseObjectDiffer contentType = "application/json" ) Mono> updatePet( - @RequestBody Mono pet + @Valid @RequestBody Mono pet ); @@ -177,9 +181,9 @@ Mono> updatePet( contentType = "application/x-www-form-urlencoded" ) Mono> updatePetWithForm( - @PathVariable("petId") Long petId, - @RequestPart(value = "name", required = false) String name, - @RequestPart(value = "status", required = false) String status + @NotNull @PathVariable("petId") Long petId, + @Valid @RequestPart(value = "name", required = false) String name, + @Valid @RequestPart(value = "status", required = false) String status ); @@ -199,8 +203,8 @@ Mono> updatePetWithForm( contentType = "multipart/form-data" ) Mono> uploadFile( - @PathVariable("petId") Long petId, - @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @NotNull @PathVariable("petId") Long petId, + @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) Part file ); @@ -221,9 +225,9 @@ Mono> uploadFile( contentType = "multipart/form-data" ) Mono> uploadFileWithRequiredFile( - @PathVariable("petId") Long petId, + @NotNull @PathVariable("petId") Long petId, @RequestPart(value = "requiredFile", required = true) Part requiredFile, - @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata + @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata ); } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java index a4c1f16a1ad0..a9cd27332e44 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import org.springframework.http.codec.multipart.Part; import reactor.core.publisher.Flux; @@ -22,6 +25,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface StoreApi { @@ -39,7 +43,7 @@ public interface StoreApi { accept = { "application/json" } ) Mono> deleteOrder( - @PathVariable("order_id") String orderId + @NotNull @PathVariable("order_id") String orderId ); @@ -74,7 +78,7 @@ Mono>> getInventory( accept = { "application/json", "application/xml" } ) Mono> getOrderById( - @PathVariable("order_id") Long orderId + @NotNull @Min(value = 1L) @Max(value = 5L) @PathVariable("order_id") Long orderId ); @@ -93,7 +97,7 @@ Mono> getOrderById( contentType = "application/json" ) Mono> placeOrder( - @RequestBody Mono order + @Valid @RequestBody Mono order ); } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java index ab66c7ba9420..ea75474e271b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import org.springframework.http.codec.multipart.Part; import reactor.core.publisher.Flux; @@ -22,6 +25,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface UserApi { @@ -39,7 +43,7 @@ public interface UserApi { contentType = "application/json" ) Mono> createUser( - @RequestBody Mono user + @Valid @RequestBody Mono user ); @@ -57,7 +61,7 @@ Mono> createUser( contentType = "application/json" ) Mono> createUsersWithArrayInput( - @RequestBody Flux user + @Valid @RequestBody Flux user ); @@ -75,7 +79,7 @@ Mono> createUsersWithArrayInput( contentType = "application/json" ) Mono> createUsersWithListInput( - @RequestBody Flux user + @Valid @RequestBody Flux user ); @@ -93,7 +97,7 @@ Mono> createUsersWithListInput( accept = { "application/json" } ) Mono> deleteUser( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ); @@ -112,7 +116,7 @@ Mono> deleteUser( accept = { "application/json", "application/xml" } ) Mono> getUserByName( - @PathVariable("username") String username + @NotNull @PathVariable("username") String username ); @@ -131,8 +135,8 @@ Mono> getUserByName( accept = { "application/json", "application/xml" } ) Mono> loginUser( - @RequestParam(value = "username", required = true) String username, - @RequestParam(value = "password", required = true) String password + @NotNull @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Valid @RequestParam(value = "password", required = true) String password ); @@ -168,8 +172,8 @@ Mono> logoutUser( contentType = "application/json" ) Mono> updateUser( - @PathVariable("username") String username, - @RequestBody Mono user + @NotNull @PathVariable("username") String username, + @Valid @RequestBody Mono user ); } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index f36cf911e990..ed35bddc0d18 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index f83546eedb5b..8f5de0a41759 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 64226ebea3b0..9503e53fbea9 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 3ba9be3bbb83..aee5c12f9d03 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -14,7 +14,8 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -27,28 +28,28 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class AdditionalPropertiesClass { - + @Valid private Map mapString = new HashMap<>(); - + @Valid private Map mapNumber = new HashMap<>(); - + @Valid private Map mapInteger = new HashMap<>(); - + @Valid private Map mapBoolean = new HashMap<>(); - + @Valid private Map> mapArrayInteger = new HashMap<>(); - + @Valid private Map> mapArrayAnytype = new HashMap<>(); - + @Valid private Map> mapMapString = new HashMap<>(); - + @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; @@ -101,7 +102,7 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - + @Valid @JsonProperty("map_number") public Map getMapNumber() { return mapNumber; @@ -182,7 +183,7 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; @@ -209,7 +210,7 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - + @Valid @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { return mapArrayAnytype; @@ -236,7 +237,7 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; @@ -263,7 +264,7 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 37b9ecc68ca1..8b6ab04b721b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 7b4ca5f7b309..31c7c2b2c972 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index e86c307fa02c..2150a3bf5fed 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7c4cb11d6d1e..2739a9d99484 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java index ed4c6fc0187a..fab9704c9ac7 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java @@ -10,7 +10,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -58,7 +59,7 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull + @NotNull @JsonProperty("className") public String getClassName() { return className; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 5ee52f148448..1ccce206ee09 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -24,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - + @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -44,7 +45,7 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - + @Valid @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { return arrayArrayNumber; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index ae1056217d7b..3bcc6b8da18c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -24,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class ArrayOfNumberOnly { - + @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -44,7 +45,7 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - + @Valid @JsonProperty("ArrayNumber") public List getArrayNumber() { return arrayNumber; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java index 22c12d58e889..c017bcc07631 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -24,14 +25,14 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class ArrayTest { - + @Valid private List arrayOfString = new ArrayList<>(); - + @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - - private List> arrayArrayOfModel = new ArrayList<>(); + @Valid + private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -77,7 +78,7 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - + @Valid @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; @@ -87,12 +88,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -104,13 +105,13 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - + @Valid @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java index 06ecfea1e482..1e138a1f3ceb 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java @@ -12,7 +12,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java index ef722261eee6..8c514dd279d7 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java index edb831012bce..306d5a91b2cc 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java index 53fb7489b7f3..f89fb2c0f72a 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -63,7 +64,7 @@ public Category name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java index 5acfc0c669de..da45bd694351 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -14,7 +14,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java index 552806996d29..a6030e38a119 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java index d16d1fc2c791..8a48ed1f1de0 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index f14b9fd203ae..1eea6aa88458 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -12,7 +12,8 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -25,16 +26,16 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class ContainerDefaultValue { - + @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - + @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - + @Valid private List requiredArray = new ArrayList<>(); - + @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { @@ -93,7 +94,7 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull + @NotNull @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { return nullableRequiredArray; @@ -120,7 +121,7 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull + @NotNull @JsonProperty("required_array") public List getRequiredArray() { return requiredArray; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java index 1a85e6059b37..10979248b9f6 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java index 7abeac1773bc..1449b56a4ec2 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -96,7 +97,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - + @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java index a433c51e2ec9..bc592d0da188 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java @@ -5,7 +5,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java index 619533ef590c..437130821b1c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java @@ -10,7 +10,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -217,7 +218,7 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull + @NotNull @JsonProperty("enum_string_required") public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; @@ -274,7 +275,7 @@ public EnumTest outerEnum(@Nullable OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - + @Valid @JsonProperty("outerEnum") public @Nullable OuterEnum getOuterEnum() { return outerEnum; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java index f7bcd095745f..702f775da7cf 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 6305f0a7aab0..3dbed6086f1c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -26,8 +27,8 @@ public class FileSchemaTestClass { private @Nullable File file; - - private List files = new ArrayList<>(); + @Valid + private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { this.file = file; @@ -38,7 +39,7 @@ public FileSchemaTestClass file(@Nullable File file) { * Get file * @return file */ - + @Valid @JsonProperty("file") public @Nullable File getFile() { return file; @@ -48,7 +49,7 @@ public void setFile(@Nullable File file) { this.file = file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid File> files) { this.files = files; return this; } @@ -65,13 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - + @Valid @JsonProperty("files") - public List getFiles() { + public List<@Valid File> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid File> files) { this.files = files; } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java index 491933f48763..53ff8580e2ef 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java @@ -14,7 +14,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -83,7 +84,7 @@ public FormatTest integer(@Nullable Integer integer) { * maximum: 100 * @return integer */ - + @Min(value = 10) @Max(value = 100) @JsonProperty("integer") public @Nullable Integer getInteger() { return integer; @@ -104,7 +105,7 @@ public FormatTest int32(@Nullable Integer int32) { * maximum: 200 * @return int32 */ - + @Min(value = 20) @Max(value = 200) @JsonProperty("int32") public @Nullable Integer getInt32() { return int32; @@ -144,7 +145,7 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull + @NotNull @Valid @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") @JsonProperty("number") public BigDecimal getNumber() { return number; @@ -165,7 +166,7 @@ public FormatTest _float(@Nullable Float _float) { * maximum: 987.6 * @return _float */ - + @DecimalMin(value = "54.3") @DecimalMax(value = "987.6") @JsonProperty("float") public @Nullable Float getFloat() { return _float; @@ -186,7 +187,7 @@ public FormatTest _double(@Nullable Double _double) { * maximum: 123.4 * @return _double */ - + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") @JsonProperty("double") public @Nullable Double getDouble() { return _double; @@ -205,7 +206,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - + @Pattern(regexp = "/[a-z]/i") @JsonProperty("string") public @Nullable String getString() { return string; @@ -224,7 +225,7 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull + @NotNull @JsonProperty("byte") public byte[] getByte() { return _byte; @@ -243,7 +244,7 @@ public FormatTest binary(@Nullable org.springframework.core.io.Resource binary) * Get binary * @return binary */ - + @Valid @JsonProperty("binary") public @Nullable org.springframework.core.io.Resource getBinary() { return binary; @@ -262,7 +263,7 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull + @NotNull @Valid @JsonProperty("date") public LocalDate getDate() { return date; @@ -281,7 +282,7 @@ public FormatTest dateTime(@Nullable OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -300,7 +301,7 @@ public FormatTest uuid(@Nullable UUID uuid) { * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -319,7 +320,7 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull + @NotNull @Size(min = 10, max = 64) @JsonProperty("password") public String getPassword() { return password; @@ -338,7 +339,7 @@ public FormatTest bigDecimal(@Nullable BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - + @Valid @JsonProperty("BigDecimal") public @Nullable BigDecimal getBigDecimal() { return bigDecimal; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 9482574e9688..fb34bd778685 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java index d67614fbc5e8..45b414fb171b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java @@ -10,7 +10,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -23,7 +24,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class MapTest { - + @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -61,13 +62,13 @@ public static InnerEnum fromValue(String value) { } } - + @Valid private Map mapOfEnumString = new HashMap<>(); - + @Valid private Map directMap = new HashMap<>(); - + @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -87,7 +88,7 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - + @Valid @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { return mapMapOfString; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d4bfb4ffc75f..03dab8989e56 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -13,7 +13,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -31,7 +32,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - + @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { @@ -43,7 +44,7 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -62,7 +63,7 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(@Nullable OffsetDate * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -89,7 +90,7 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - + @Valid @JsonProperty("map") public Map getMap() { return map; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java index a834ef58b62b..098f09aa5709 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java index 4bd243655b17..84955e435ac4 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java index 38a1aab89c36..0aa52a9c108a 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java index dd32e7bbe7b9..7e05d08e86e4 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java index adbc57077902..c8897b7a6f56 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -48,7 +49,7 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public Integer getName() { return name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java index 0e9d13ac1ed1..9ed6125cfc94 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -12,7 +12,8 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -25,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public class NullableMapProperty { - + @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java index 255e950f4e52..e7d1648b0667 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -32,7 +33,7 @@ public NumberOnly justNumber(@Nullable BigDecimal justNumber) { * Get justNumber * @return justNumber */ - + @Valid @JsonProperty("JustNumber") public @Nullable BigDecimal getJustNumber() { return justNumber; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java index c43687dc4193..3c25b6d5fbd3 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java @@ -10,7 +10,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -139,7 +140,7 @@ public Order shipDate(@Nullable OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - + @Valid @JsonProperty("shipDate") public @Nullable OffsetDateTime getShipDate() { return shipDate; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java index 621f6beadf16..bd54d1fcd677 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -36,7 +37,7 @@ public OuterComposite myNumber(@Nullable BigDecimal myNumber) { * Get myNumber * @return myNumber */ - + @Valid @JsonProperty("my_number") public @Nullable BigDecimal getMyNumber() { return myNumber; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java index d917ddaa49a3..d97fb288a82f 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java @@ -5,7 +5,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java index 270596b5eaac..d34d68475655 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -14,7 +14,8 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java index ca016e033b07..07201903da42 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java @@ -16,7 +16,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -35,11 +36,11 @@ public class Pet { private String name; - + @Valid private Set photoUrls = new LinkedHashSet<>(); - - private List tags = new ArrayList<>(); + @Valid + private List<@Valid Tag> tags = new ArrayList<>(); /** * pet status in the store @@ -121,7 +122,7 @@ public Pet category(@Nullable Category category) { * Get category * @return category */ - + @Valid @JsonProperty("category") public @Nullable Category getCategory() { return category; @@ -140,7 +141,7 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; @@ -167,7 +168,7 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull + @NotNull @JsonProperty("photoUrls") public Set getPhotoUrls() { return photoUrls; @@ -178,7 +179,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -195,13 +196,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - + @Valid @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index eab5e405ee44..2cc6e59e137e 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index f0019e991124..797e1875ae5d 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java index a5f5abec28e7..6cd368fd9ace 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -8,7 +8,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java index c4b2d58c31d5..86e3dd2f21df 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java index ad4e6005aba4..fa13f5becf27 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -32,7 +33,7 @@ public class TypeHolderDefault { private Boolean boolItem = true; - + @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { @@ -59,7 +60,7 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull + @NotNull @JsonProperty("string_item") public String getStringItem() { return stringItem; @@ -78,7 +79,7 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -97,7 +98,7 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -116,7 +117,7 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -143,7 +144,7 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull + @NotNull @JsonProperty("array_item") public List getArrayItem() { return arrayItem; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java index c8359398e143..bf037b841615 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -34,7 +35,7 @@ public class TypeHolderExample { private Boolean boolItem; - + @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { @@ -62,7 +63,7 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull + @NotNull @JsonProperty("string_item") public String getStringItem() { return stringItem; @@ -81,7 +82,7 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -100,7 +101,7 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull + @NotNull @JsonProperty("float_item") public Float getFloatItem() { return floatItem; @@ -119,7 +120,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -138,7 +139,7 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -165,7 +166,7 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull + @NotNull @JsonProperty("array_item") public List getArrayItem() { return arrayItem; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java index 6fcad88f6b92..b8f5a380fd00 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java @@ -7,7 +7,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java index 73c145612341..a12501876451 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java @@ -11,7 +11,8 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; import java.util.*; @@ -32,7 +33,7 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - + @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -43,10 +44,10 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - + @Valid private List nameArray = new ArrayList<>(); - + @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -57,10 +58,10 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - + @Valid private List prefixArray = new ArrayList<>(); - + @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -71,10 +72,10 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - + @Valid private List namespaceArray = new ArrayList<>(); - + @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -85,10 +86,10 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - + @Valid private List prefixNsArray = new ArrayList<>(); - + @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { @@ -119,7 +120,7 @@ public XmlItem attributeNumber(@Nullable BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - + @Valid @JsonProperty("attribute_number") public @Nullable BigDecimal getAttributeNumber() { return attributeNumber; @@ -222,7 +223,7 @@ public XmlItem nameNumber(@Nullable BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - + @Valid @JsonProperty("name_number") public @Nullable BigDecimal getNameNumber() { return nameNumber; @@ -352,7 +353,7 @@ public XmlItem prefixNumber(@Nullable BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - + @Valid @JsonProperty("prefix_number") public @Nullable BigDecimal getPrefixNumber() { return prefixNumber; @@ -482,7 +483,7 @@ public XmlItem namespaceNumber(@Nullable BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - + @Valid @JsonProperty("namespace_number") public @Nullable BigDecimal getNamespaceNumber() { return namespaceNumber; @@ -612,7 +613,7 @@ public XmlItem prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - + @Valid @JsonProperty("prefix_ns_number") public @Nullable BigDecimal getPrefixNsNumber() { return prefixNsNumber; diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java index c7797f79779b..af9e69db8a7c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface AnotherFakeApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index 04a9124859d4..850ba0c3d46d 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -32,6 +32,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index b630798e2f79..b8a0d67a5b51 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeClassnameTags123Api { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java index ecd126897323..7e3f8310f9c0 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java @@ -25,6 +25,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface PetApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java index 22c06d2e4b8a..c2e2e6c9f680 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java @@ -22,6 +22,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface StoreApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index 5c4ed966012a..d02afb15fd6c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -22,6 +22,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface UserApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2787c9d1160d..ad43a3f719c6 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface AnotherFakeApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java index 0fefc031ea6d..ad6b7955e798 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -32,6 +32,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 397cbee69eac..2e3dd935ff37 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeClassnameTags123Api { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java index fd584ea831df..a5ea31b4200c 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -25,6 +25,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface PetApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java index a4c1f16a1ad0..051190221734 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -22,6 +22,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface StoreApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java index ab66c7ba9420..536c4d4942f3 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -22,6 +22,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface UserApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java index 01d1324ff23b..d8694c4f8ba8 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface AnotherFakeApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java index fc8aa14fdf11..e75dc119b29f 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java @@ -28,6 +28,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 733c3da6a214..f169a6d8b243 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface FakeClassnameTags123Api { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java index 1e123cf725a0..8a9cfaa42d4e 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface PetApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java index 6bcb815d5b5a..4a679504dd46 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface StoreApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java index 7adaff82408e..19dd0f698dbe 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") public interface UserApi { From 6771de2e67f91cbbb2289838025b176c69ab1852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Tue, 3 Feb 2026 23:24:12 +0100 Subject: [PATCH 07/17] fix imports --- .../spring-http-interface/api.mustache | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 3 + .../java/org/openapitools/api/FakeApi.java | 3 + .../api/FakeClassnameTags123Api.java | 3 + .../java/org/openapitools/api/PetApi.java | 3 + .../java/org/openapitools/api/StoreApi.java | 3 + .../java/org/openapitools/api/UserApi.java | 3 + .../java/org/openapitools/api/UserApi.java | 180 ---------------- .../java/org/openapitools/api/StoreApi.java | 158 -------------- .../java/org/openapitools/api/StoreApi.java | 194 ------------------ .../configuration/SpringFoxConfiguration.java | 73 ------- 11 files changed, 19 insertions(+), 606 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache index cf346d72d331..bcd24071d13b 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache @@ -16,12 +16,12 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; -{{#reactive}} {{#useBeanValidation}} import {{javaxPackage}}.validation.Valid; import {{javaxPackage}}.validation.constraints.*; {{^useSpringBuiltInValidation}}import org.springframework.validation.annotation.Validated;{{/useSpringBuiltInValidation}} {{/useBeanValidation}} +{{#reactive}} import org.springframework.http.codec.multipart.Part; import reactor.core.publisher.Flux; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9b0b472f2a00..841d0f9a0aab 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java index fa1cdfb8a512..c0fa7fc5c62b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -21,6 +21,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 2158aaa579b5..c73d2afc677f 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java index 0ac83d49c9e3..e594f94348e9 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java @@ -14,6 +14,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java index 1d3480382ef0..dc7be91aa895 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java index 4f34e9cbf598..79715006ec7d 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index dfbd08972b8e..e69de29bb2d1 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -1,180 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import java.time.OffsetDateTime; -import org.openapitools.model.UserDto; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.service.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import jakarta.annotation.Generated; - - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -public interface UserApi { - - /** - * POST /user : Create user - * This can only be done by the logged in user. - * - * @param userDto Created user object (required) - * @return successful operation (status code 200) - */ - @ResponseStatus(HttpStatus.OK) - @HttpExchange( - method = "POST", - value = "/user", - accept = { "application/json" }, - contentType = "application/json" - ) - void createUser( - @RequestBody UserDto userDto - ); - - - /** - * POST /user/createWithArray : Creates list of users with given input array - * - * - * @param userDto List of user object (required) - * @return successful operation (status code 200) - */ - @ResponseStatus(HttpStatus.OK) - @HttpExchange( - method = "POST", - value = "/user/createWithArray", - accept = { "application/json" }, - contentType = "application/json" - ) - void createUsersWithArrayInput( - @RequestBody List userDto - ); - - - /** - * POST /user/createWithList : Creates list of users with given input array - * - * - * @param userDto List of user object (required) - * @return successful operation (status code 200) - */ - @ResponseStatus(HttpStatus.OK) - @HttpExchange( - method = "POST", - value = "/user/createWithList", - accept = { "application/json" }, - contentType = "application/json" - ) - void createUsersWithListInput( - @RequestBody List userDto - ); - - - /** - * DELETE /user/{username} : Delete user - * This can only be done by the logged in user. - * - * @param username The name that needs to be deleted (required) - * @return Invalid username supplied (status code 400) - * or User not found (status code 404) - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @HttpExchange( - method = "DELETE", - value = "/user/{username}", - accept = { "application/json" } - ) - void deleteUser( - @PathVariable("username") String username - ); - - - /** - * GET /user/{username} : Get user by user name - * - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return successful operation (status code 200) - * or Invalid username supplied (status code 400) - * or User not found (status code 404) - */ - @ResponseStatus(HttpStatus.OK) - @HttpExchange( - method = "GET", - value = "/user/{username}", - accept = { "application/json", "application/xml" } - ) - UserDto getUserByName( - @PathVariable("username") String username - ); - - - /** - * GET /user/login : Logs user into the system - * - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @return successful operation (status code 200) - * or Invalid username/password supplied (status code 400) - */ - @ResponseStatus(HttpStatus.OK) - @HttpExchange( - method = "GET", - value = "/user/login", - accept = { "application/json", "application/xml" } - ) - String loginUser( - @RequestParam(value = "username", required = true) String username, - @RequestParam(value = "password", required = true) String password - ); - - - /** - * GET /user/logout : Logs out current logged in user session - * - * - * @return successful operation (status code 200) - */ - @ResponseStatus(HttpStatus.OK) - @HttpExchange( - method = "GET", - value = "/user/logout", - accept = { "application/json" } - ) - void logoutUser( - - ); - - - /** - * PUT /user/{username} : Updated user - * This can only be done by the logged in user. - * - * @param username name that need to be deleted (required) - * @param userDto Updated user object (required) - * @return Invalid user supplied (status code 400) - * or User not found (status code 404) - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @HttpExchange( - method = "PUT", - value = "/user/{username}", - accept = { "application/json" }, - contentType = "application/json" - ) - void updateUser( - @PathVariable("username") String username, - @RequestBody UserDto userDto - ); - -} diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index 4b2be7af2b38..e69de29bb2d1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,158 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import java.util.Map; -import org.openapitools.model.Order; -import io.swagger.annotations.*; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -@Validated -@Api(value = "store", description = "Access to Petstore orders") -public interface StoreApi { - - default StoreApiDelegate getDelegate() { - return new StoreApiDelegate() {}; - } - - String PATH_DELETE_ORDER = "/store/order/{order_id}"; - /** - * DELETE /store/order/{order_id} : Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * @param orderId ID of the order that needs to be deleted (required) - * @return Invalid ID supplied (status code 400) - * or Order not found (status code 404) - */ - @ApiOperation( - tags = { "store" }, - value = "Delete purchase order by ID", - nickname = "deleteOrder", - notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" - ) - @ApiResponses({ - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found") - }) - @RequestMapping( - method = RequestMethod.DELETE, - value = StoreApi.PATH_DELETE_ORDER - ) - default ResponseEntity deleteOrder( - @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - ) { - return getDelegate().deleteOrder(orderId); - } - - - String PATH_GET_INVENTORY = "/store/inventory"; - /** - * GET /store/inventory : Returns pet inventories by status - * Returns a map of status codes to quantities - * - * @return successful operation (status code 200) - */ - @ApiOperation( - tags = { "store" }, - value = "Returns pet inventories by status", - nickname = "getInventory", - notes = "Returns a map of status codes to quantities", - response = Integer.class, - responseContainer = "Map", - authorizations = { - @Authorization(value = "api_key") - } - ) - @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") - }) - @RequestMapping( - method = RequestMethod.GET, - value = StoreApi.PATH_GET_INVENTORY, - produces = { "application/json" } - ) - default ResponseEntity> getInventory( - - ) { - return getDelegate().getInventory(); - } - - - String PATH_GET_ORDER_BY_ID = "/store/order/{order_id}"; - /** - * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - * - * @param orderId ID of pet that needs to be fetched (required) - * @return successful operation (status code 200) - * or Invalid ID supplied (status code 400) - * or Order not found (status code 404) - */ - @ApiOperation( - tags = { "store" }, - value = "Find purchase order by ID", - nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", - response = Order.class - ) - @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found") - }) - @RequestMapping( - method = RequestMethod.GET, - value = StoreApi.PATH_GET_ORDER_BY_ID, - produces = { "application/xml", "application/json" } - ) - default ResponseEntity getOrderById( - @NotNull @Min(value = 1L) @Max(value = 5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - ) { - return getDelegate().getOrderById(orderId); - } - - - String PATH_PLACE_ORDER = "/store/order"; - /** - * POST /store/order : Place an order for a pet - * - * @param body order placed for purchasing the pet (required) - * @return successful operation (status code 200) - * or Invalid Order (status code 400) - */ - @ApiOperation( - tags = { "store" }, - value = "Place an order for a pet", - nickname = "placeOrder", - notes = "", - response = Order.class - ) - @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid Order") - }) - @RequestMapping( - method = RequestMethod.POST, - value = StoreApi.PATH_PLACE_ORDER, - produces = { "application/xml", "application/json" } - ) - default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body - ) { - return getDelegate().placeOrder(body); - } - -} diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 7754463aefde..e69de29bb2d1 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,194 +0,0 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -package org.openapitools.api; - -import java.util.Map; -import org.openapitools.model.Order; -import io.swagger.annotations.*; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -@Validated -@Api(value = "store", description = "Access to Petstore orders") -public interface StoreApi { - - default Optional getRequest() { - return Optional.empty(); - } - - String PATH_DELETE_ORDER = "/store/order/{order_id}"; - /** - * DELETE /store/order/{order_id} : Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * @param orderId ID of the order that needs to be deleted (required) - * @return Invalid ID supplied (status code 400) - * or Order not found (status code 404) - */ - @ApiOperation( - tags = { "store" }, - value = "Delete purchase order by ID", - nickname = "deleteOrder", - notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" - ) - @ApiResponses({ - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found") - }) - @RequestMapping( - method = RequestMethod.DELETE, - value = StoreApi.PATH_DELETE_ORDER - ) - default ResponseEntity deleteOrder( - @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId - ) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - - String PATH_GET_INVENTORY = "/store/inventory"; - /** - * GET /store/inventory : Returns pet inventories by status - * Returns a map of status codes to quantities - * - * @return successful operation (status code 200) - */ - @ApiOperation( - tags = { "store" }, - value = "Returns pet inventories by status", - nickname = "getInventory", - notes = "Returns a map of status codes to quantities", - response = Integer.class, - responseContainer = "Map", - authorizations = { - @Authorization(value = "api_key") - } - ) - @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") - }) - @RequestMapping( - method = RequestMethod.GET, - value = StoreApi.PATH_GET_INVENTORY, - produces = { "application/json" } - ) - default ResponseEntity> getInventory( - - ) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - - String PATH_GET_ORDER_BY_ID = "/store/order/{order_id}"; - /** - * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - * - * @param orderId ID of pet that needs to be fetched (required) - * @return successful operation (status code 200) - * or Invalid ID supplied (status code 400) - * or Order not found (status code 404) - */ - @ApiOperation( - tags = { "store" }, - value = "Find purchase order by ID", - nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", - response = Order.class - ) - @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found") - }) - @RequestMapping( - method = RequestMethod.GET, - value = StoreApi.PATH_GET_ORDER_BY_ID, - produces = { "application/xml", "application/json" } - ) - default ResponseEntity getOrderById( - @NotNull @Min(value = 1L) @Max(value = 5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId - ) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; - ApiUtil.setExampleResponse(request, "application/xml", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - - String PATH_PLACE_ORDER = "/store/order"; - /** - * POST /store/order : Place an order for a pet - * - * @param body order placed for purchasing the pet (required) - * @return successful operation (status code 200) - * or Invalid Order (status code 400) - */ - @ApiOperation( - tags = { "store" }, - value = "Place an order for a pet", - nickname = "placeOrder", - notes = "", - response = Order.class - ) - @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid Order") - }) - @RequestMapping( - method = RequestMethod.POST, - value = StoreApi.PATH_PLACE_ORDER, - produces = { "application/xml", "application/json" } - ) - default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body - ) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { - String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; - ApiUtil.setExampleResponse(request, "application/xml", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/SpringFoxConfiguration.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/SpringFoxConfiguration.java index 4227817178a5..e69de29bb2d1 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/SpringFoxConfiguration.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/SpringFoxConfiguration.java @@ -1,73 +0,0 @@ -package org.openapitools.configuration; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import org.springframework.web.util.UriComponentsBuilder; -import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.ApiInfo; -import springfox.documentation.service.Contact; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spring.web.paths.Paths; -import springfox.documentation.spring.web.paths.RelativePathProvider; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -import java.util.Optional; -import javax.annotation.Generated; -import javax.servlet.ServletContext; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") -@Configuration -@EnableSwagger2 -public class SpringFoxConfiguration { - - ApiInfo apiInfo() { - return new ApiInfoBuilder() - .title("OpenAPI Petstore") - .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") - .license("Apache-2.0") - .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") - .termsOfServiceUrl("") - .version("1.0.0") - .contact(new Contact("","", "")) - .build(); - } - - @Bean - public Docket customImplementation(ServletContext servletContext, @Value("${openapi.openAPIPetstore.base-path:/v2}") String basePath) { - return new Docket(DocumentationType.SWAGGER_2) - .select() - .apis(RequestHandlerSelectors.basePackage("org.openapitools.api")) - .build() - .pathProvider(new BasePathAwareRelativePathProvider(servletContext, basePath)) - .directModelSubstitute(java.time.LocalDate.class, java.sql.Date.class) - .directModelSubstitute(java.time.OffsetDateTime.class, java.util.Date.class) - .genericModelSubstitutes(Optional.class) - .apiInfo(apiInfo()); - } - - class BasePathAwareRelativePathProvider extends RelativePathProvider { - private String basePath; - - public BasePathAwareRelativePathProvider(ServletContext servletContext, String basePath) { - super(servletContext); - this.basePath = basePath; - } - - @Override - protected String applicationPath() { - return Paths.removeAdjacentForwardSlashes(UriComponentsBuilder.fromPath(super.applicationPath()).path(basePath).build().toString()); - } - - @Override - public String getOperationPath(String operationPath) { - UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromPath("/"); - return Paths.removeAdjacentForwardSlashes( - uriComponentsBuilder.path(operationPath.replaceFirst("^" + basePath, "")).build().toString()); - } - } - -} From b9cb91ec5c81277979f163051ae9585d0bad300f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Tue, 3 Feb 2026 23:41:59 +0100 Subject: [PATCH 08/17] fix samples --- .../java/org/openapitools/api/UserApi.java | 180 ++++++++++++++++ .../java/org/openapitools/api/StoreApi.java | 158 ++++++++++++++ .../java/org/openapitools/api/StoreApi.java | 194 ++++++++++++++++++ .../configuration/SpringFoxConfiguration.java | 73 +++++++ 4 files changed, 605 insertions(+) diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index e69de29bb2d1..dfbd08972b8e 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,180 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.time.OffsetDateTime; +import org.openapitools.model.UserDto; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param userDto Created user object (required) + * @return successful operation (status code 200) + */ + @ResponseStatus(HttpStatus.OK) + @HttpExchange( + method = "POST", + value = "/user", + accept = { "application/json" }, + contentType = "application/json" + ) + void createUser( + @RequestBody UserDto userDto + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * + * @param userDto List of user object (required) + * @return successful operation (status code 200) + */ + @ResponseStatus(HttpStatus.OK) + @HttpExchange( + method = "POST", + value = "/user/createWithArray", + accept = { "application/json" }, + contentType = "application/json" + ) + void createUsersWithArrayInput( + @RequestBody List userDto + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * + * @param userDto List of user object (required) + * @return successful operation (status code 200) + */ + @ResponseStatus(HttpStatus.OK) + @HttpExchange( + method = "POST", + value = "/user/createWithList", + accept = { "application/json" }, + contentType = "application/json" + ) + void createUsersWithListInput( + @RequestBody List userDto + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @ResponseStatus(HttpStatus.BAD_REQUEST) + @HttpExchange( + method = "DELETE", + value = "/user/{username}", + accept = { "application/json" } + ) + void deleteUser( + @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @ResponseStatus(HttpStatus.OK) + @HttpExchange( + method = "GET", + value = "/user/{username}", + accept = { "application/json", "application/xml" } + ) + UserDto getUserByName( + @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @ResponseStatus(HttpStatus.OK) + @HttpExchange( + method = "GET", + value = "/user/login", + accept = { "application/json", "application/xml" } + ) + String loginUser( + @RequestParam(value = "username", required = true) String username, + @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * + * @return successful operation (status code 200) + */ + @ResponseStatus(HttpStatus.OK) + @HttpExchange( + method = "GET", + value = "/user/logout", + accept = { "application/json" } + ) + void logoutUser( + + ); + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param userDto Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @ResponseStatus(HttpStatus.BAD_REQUEST) + @HttpExchange( + method = "PUT", + value = "/user/{username}", + accept = { "application/json" }, + contentType = "application/json" + ) + void updateUser( + @PathVariable("username") String username, + @RequestBody UserDto userDto + ); + +} diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index e69de29bb2d1..4b2be7af2b38 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,158 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.annotations.*; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Validated +@Api(value = "store", description = "Access to Petstore orders") +public interface StoreApi { + + default StoreApiDelegate getDelegate() { + return new StoreApiDelegate() {}; + } + + String PATH_DELETE_ORDER = "/store/order/{order_id}"; + /** + * DELETE /store/order/{order_id} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") + }) + @RequestMapping( + method = RequestMethod.DELETE, + value = StoreApi.PATH_DELETE_ORDER + ) + default ResponseEntity deleteOrder( + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { + return getDelegate().deleteOrder(orderId); + } + + + String PATH_GET_INVENTORY = "/store/inventory"; + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) + @RequestMapping( + method = RequestMethod.GET, + value = StoreApi.PATH_GET_INVENTORY, + produces = { "application/json" } + ) + default ResponseEntity> getInventory( + + ) { + return getDelegate().getInventory(); + } + + + String PATH_GET_ORDER_BY_ID = "/store/order/{order_id}"; + /** + * GET /store/order/{order_id} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @ApiOperation( + tags = { "store" }, + value = "Find purchase order by ID", + nickname = "getOrderById", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", + response = Order.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") + }) + @RequestMapping( + method = RequestMethod.GET, + value = StoreApi.PATH_GET_ORDER_BY_ID, + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getOrderById( + @NotNull @Min(value = 1L) @Max(value = 5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { + return getDelegate().getOrderById(orderId); + } + + + String PATH_PLACE_ORDER = "/store/order"; + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") + }) + @RequestMapping( + method = RequestMethod.POST, + value = StoreApi.PATH_PLACE_ORDER, + produces = { "application/xml", "application/json" } + ) + default ResponseEntity placeOrder( + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { + return getDelegate().placeOrder(body); + } + +} diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index e69de29bb2d1..7754463aefde 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,194 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Validated +@Api(value = "store", description = "Access to Petstore orders") +public interface StoreApi { + + default Optional getRequest() { + return Optional.empty(); + } + + String PATH_DELETE_ORDER = "/store/order/{order_id}"; + /** + * DELETE /store/order/{order_id} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @ApiOperation( + tags = { "store" }, + value = "Delete purchase order by ID", + nickname = "deleteOrder", + notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" + ) + @ApiResponses({ + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") + }) + @RequestMapping( + method = RequestMethod.DELETE, + value = StoreApi.PATH_DELETE_ORDER + ) + default ResponseEntity deleteOrder( + @NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + String PATH_GET_INVENTORY = "/store/inventory"; + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "store" }, + value = "Returns pet inventories by status", + nickname = "getInventory", + notes = "Returns a map of status codes to quantities", + response = Integer.class, + responseContainer = "Map", + authorizations = { + @Authorization(value = "api_key") + } + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + }) + @RequestMapping( + method = RequestMethod.GET, + value = StoreApi.PATH_GET_INVENTORY, + produces = { "application/json" } + ) + default ResponseEntity> getInventory( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + String PATH_GET_ORDER_BY_ID = "/store/order/{order_id}"; + /** + * GET /store/order/{order_id} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @ApiOperation( + tags = { "store" }, + value = "Find purchase order by ID", + nickname = "getOrderById", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", + response = Order.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") + }) + @RequestMapping( + method = RequestMethod.GET, + value = StoreApi.PATH_GET_ORDER_BY_ID, + produces = { "application/xml", "application/json" } + ) + default ResponseEntity getOrderById( + @NotNull @Min(value = 1L) @Max(value = 5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + String PATH_PLACE_ORDER = "/store/order"; + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @ApiOperation( + tags = { "store" }, + value = "Place an order for a pet", + nickname = "placeOrder", + notes = "", + response = Order.class + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") + }) + @RequestMapping( + method = RequestMethod.POST, + value = StoreApi.PATH_PLACE_ORDER, + produces = { "application/xml", "application/json" } + ) + default ResponseEntity placeOrder( + @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/SpringFoxConfiguration.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/SpringFoxConfiguration.java index e69de29bb2d1..4227817178a5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/SpringFoxConfiguration.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/SpringFoxConfiguration.java @@ -0,0 +1,73 @@ +package org.openapitools.configuration; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import org.springframework.web.util.UriComponentsBuilder; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.service.Contact; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.paths.Paths; +import springfox.documentation.spring.web.paths.RelativePathProvider; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +import java.util.Optional; +import javax.annotation.Generated; +import javax.servlet.ServletContext; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Configuration +@EnableSwagger2 +public class SpringFoxConfiguration { + + ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title("OpenAPI Petstore") + .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") + .license("Apache-2.0") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") + .termsOfServiceUrl("") + .version("1.0.0") + .contact(new Contact("","", "")) + .build(); + } + + @Bean + public Docket customImplementation(ServletContext servletContext, @Value("${openapi.openAPIPetstore.base-path:/v2}") String basePath) { + return new Docket(DocumentationType.SWAGGER_2) + .select() + .apis(RequestHandlerSelectors.basePackage("org.openapitools.api")) + .build() + .pathProvider(new BasePathAwareRelativePathProvider(servletContext, basePath)) + .directModelSubstitute(java.time.LocalDate.class, java.sql.Date.class) + .directModelSubstitute(java.time.OffsetDateTime.class, java.util.Date.class) + .genericModelSubstitutes(Optional.class) + .apiInfo(apiInfo()); + } + + class BasePathAwareRelativePathProvider extends RelativePathProvider { + private String basePath; + + public BasePathAwareRelativePathProvider(ServletContext servletContext, String basePath) { + super(servletContext); + this.basePath = basePath; + } + + @Override + protected String applicationPath() { + return Paths.removeAdjacentForwardSlashes(UriComponentsBuilder.fromPath(super.applicationPath()).path(basePath).build().toString()); + } + + @Override + public String getOperationPath(String operationPath) { + UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromPath("/"); + return Paths.removeAdjacentForwardSlashes( + uriComponentsBuilder.path(operationPath.replaceFirst("^" + basePath, "")).build().toString()); + } + } + +} From 465c95992227efa2f723d1fe60b444e840cea5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Thu, 5 Mar 2026 21:19:16 +0100 Subject: [PATCH 09/17] add unit tests --- .../java/spring/SpringCodegenTest.java | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index 11ca74f3e534..e8b765360587 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -6223,4 +6223,148 @@ public void testExtensionsOnSchema_issue9183() throws IOException { )); } + @Test + public void testSpringHttpInterfaceWithBeanValidationEnabled() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); + + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.LIBRARY, SpringCodegen.SPRING_HTTP_INTERFACE); + codegen.additionalProperties().put(BeanValidationFeatures.USE_BEANVALIDATION, "true"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + // Verify that @Validated annotation is present in the generated API interface + assertFileContains(files.get("PetApi.java").toPath(), "@Validated"); + // Verify that @Valid annotation is present in method parameters + assertFileContains(files.get("PetApi.java").toPath(), "@Valid"); + } + + @Test + public void testSpringHttpInterfaceWithBeanValidationDisabled() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); + + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.LIBRARY, SpringCodegen.SPRING_HTTP_INTERFACE); + codegen.additionalProperties().put(BeanValidationFeatures.USE_BEANVALIDATION, "false"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + // Verify that @Validated annotation is NOT present in the generated API interface + assertFileNotContains(files.get("PetApi.java").toPath(), "@Validated"); + // Verify that @Valid annotation is NOT present in method parameters + assertFileNotContains(files.get("PetApi.java").toPath(), "@Valid"); + } + + @Test + public void testSpringHttpInterfaceWithBeanValidationNotSpecified() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); + + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.LIBRARY, SpringCodegen.SPRING_HTTP_INTERFACE); + // Don't set USE_BEANVALIDATION, verify it defaults to false + codegen.processOpts(); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + Map files = generator.opts(input).generate().stream().distinct() + .collect(Collectors.toMap(File::getName, Function.identity())); + + // Verify that useBeanValidation defaults to false, so no @Validated annotation + assertFileNotContains(files.get("PetApi.java").toPath(), "@Validated"); + assertFileNotContains(files.get("PetApi.java").toPath(), "@Valid"); + } + + @Test + public void testSpringHttpInterfaceWithBeanValidationEnabledContainsAnnotations() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); + + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.LIBRARY, SpringCodegen.SPRING_HTTP_INTERFACE); + codegen.additionalProperties().put(BeanValidationFeatures.USE_BEANVALIDATION, "true"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + // Check that the generated interface contains @Validated at class level + String apiContent = new String(Files.readAllBytes(files.get("PetApi.java").toPath())); + assertThat(apiContent).contains("@Validated"); + assertThat(apiContent).contains("import jakarta.validation"); + } + + @Test + public void testSpringHttpInterfaceWithBeanValidationDisabledNoValidationImports() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); + + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.LIBRARY, SpringCodegen.SPRING_HTTP_INTERFACE); + codegen.additionalProperties().put(BeanValidationFeatures.USE_BEANVALIDATION, "false"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + // Check that the generated interface does NOT contain @Validated + String apiContent = new String(Files.readAllBytes(files.get("PetApi.java").toPath())); + assertThat(apiContent).doesNotContain("@Validated"); + // Should still have proper formatting + assertThat(apiContent).contains("public interface PetApi"); + } + } From bf26c2a59018a5f744cc389f095f3abad114f5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Thu, 5 Mar 2026 22:29:12 +0100 Subject: [PATCH 10/17] fix after merge of master --- .../.openapi-generator/VERSION | 2 +- .../README.md | 8 +- .../pom.xml | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTags123Api.java | 4 +- .../java/org/openapitools/api/PetApi.java | 16 ++-- .../java/org/openapitools/api/StoreApi.java | 8 +- .../java/org/openapitools/api/UserApi.java | 10 +-- .../HttpInterfacesAbstractConfigurator.java | 24 +++--- .../model/AdditionalPropertiesAnyTypeDto.java | 2 +- .../model/AdditionalPropertiesArrayDto.java | 2 +- .../model/AdditionalPropertiesBooleanDto.java | 2 +- .../model/AdditionalPropertiesClassDto.java | 2 +- .../model/AdditionalPropertiesIntegerDto.java | 2 +- .../model/AdditionalPropertiesNumberDto.java | 2 +- .../model/AdditionalPropertiesObjectDto.java | 2 +- .../model/AdditionalPropertiesStringDto.java | 2 +- .../org/openapitools/model/AnimalDto.java | 2 +- .../openapitools/model/ApiResponseDto.java | 2 +- .../model/ArrayOfArrayOfNumberOnlyDto.java | 2 +- .../model/ArrayOfNumberOnlyDto.java | 2 +- .../org/openapitools/model/ArrayTestDto.java | 2 +- .../org/openapitools/model/BigCatDto.java | 2 +- .../openapitools/model/CapitalizationDto.java | 2 +- .../java/org/openapitools/model/CatDto.java | 2 +- .../org/openapitools/model/CategoryDto.java | 2 +- .../model/ChildWithNullableDto.java | 2 +- .../org/openapitools/model/ClassModelDto.java | 2 +- .../org/openapitools/model/ClientDto.java | 2 +- .../model/ContainerDefaultValueDto.java | 2 +- .../java/org/openapitools/model/DogDto.java | 2 +- .../org/openapitools/model/EnumArraysDto.java | 2 +- .../org/openapitools/model/EnumClassDto.java | 2 +- .../org/openapitools/model/EnumTestDto.java | 2 +- .../java/org/openapitools/model/FileDto.java | 2 +- .../model/FileSchemaTestClassDto.java | 2 +- .../org/openapitools/model/FormatTestDto.java | 2 +- .../model/HasOnlyReadOnlyDto.java | 2 +- .../java/org/openapitools/model/ListDto.java | 2 +- .../org/openapitools/model/MapTestDto.java | 2 +- ...ertiesAndAdditionalPropertiesClassDto.java | 2 +- .../model/Model200ResponseDto.java | 2 +- .../java/org/openapitools/model/NameDto.java | 2 +- .../model/NullableMapPropertyDto.java | 2 +- .../org/openapitools/model/NumberOnlyDto.java | 2 +- .../java/org/openapitools/model/OrderDto.java | 2 +- .../openapitools/model/OuterCompositeDto.java | 2 +- .../org/openapitools/model/OuterEnumDto.java | 2 +- .../model/ParentWithNullableDto.java | 2 +- .../java/org/openapitools/model/PetDto.java | 2 +- .../openapitools/model/ReadOnlyFirstDto.java | 2 +- ...ponseObjectWithDifferentFieldNamesDto.java | 2 +- .../org/openapitools/model/ReturnDto.java | 2 +- .../model/SpecialModelNameDto.java | 2 +- .../java/org/openapitools/model/TagDto.java | 2 +- .../model/TypeHolderDefaultDto.java | 2 +- .../model/TypeHolderExampleDto.java | 2 +- .../java/org/openapitools/model/UserDto.java | 2 +- .../org/openapitools/model/XmlItemDto.java | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../.openapi-generator/VERSION | 2 +- .../README.md | 6 +- .../pom.xml | 4 +- .../org/openapitools/api/AnotherFakeApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTags123Api.java | 4 +- .../java/org/openapitools/api/PetApi.java | 16 ++-- .../java/org/openapitools/api/StoreApi.java | 8 +- .../java/org/openapitools/api/UserApi.java | 10 +-- .../HttpInterfacesAbstractConfigurator.java | 20 ++--- .../model/AdditionalPropertiesAnyType.java | 2 +- .../model/AdditionalPropertiesArray.java | 2 +- .../model/AdditionalPropertiesBoolean.java | 2 +- .../model/AdditionalPropertiesClass.java | 2 +- .../model/AdditionalPropertiesInteger.java | 2 +- .../model/AdditionalPropertiesNumber.java | 2 +- .../model/AdditionalPropertiesObject.java | 2 +- .../model/AdditionalPropertiesString.java | 2 +- .../java/org/openapitools/model/Animal.java | 2 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../openapitools/model/ArrayOfNumberOnly.java | 2 +- .../org/openapitools/model/ArrayTest.java | 2 +- .../java/org/openapitools/model/BigCat.java | 2 +- .../openapitools/model/Capitalization.java | 2 +- .../main/java/org/openapitools/model/Cat.java | 2 +- .../java/org/openapitools/model/Category.java | 2 +- .../openapitools/model/ChildWithNullable.java | 2 +- .../org/openapitools/model/ClassModel.java | 2 +- .../java/org/openapitools/model/Client.java | 2 +- .../model/ContainerDefaultValue.java | 2 +- .../main/java/org/openapitools/model/Dog.java | 2 +- .../org/openapitools/model/EnumArrays.java | 2 +- .../org/openapitools/model/EnumClass.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../java/org/openapitools/model/File.java | 2 +- .../model/FileSchemaTestClass.java | 2 +- .../org/openapitools/model/FormatTest.java | 2 +- .../openapitools/model/HasOnlyReadOnly.java | 2 +- .../java/org/openapitools/model/MapTest.java | 2 +- ...ropertiesAndAdditionalPropertiesClass.java | 2 +- .../openapitools/model/Model200Response.java | 2 +- .../openapitools/model/ModelApiResponse.java | 2 +- .../org/openapitools/model/ModelList.java | 2 +- .../org/openapitools/model/ModelReturn.java | 2 +- .../java/org/openapitools/model/Name.java | 2 +- .../model/NullableMapProperty.java | 2 +- .../org/openapitools/model/NumberOnly.java | 2 +- .../java/org/openapitools/model/Order.java | 2 +- .../openapitools/model/OuterComposite.java | 2 +- .../org/openapitools/model/OuterEnum.java | 2 +- .../model/ParentWithNullable.java | 2 +- .../main/java/org/openapitools/model/Pet.java | 2 +- .../org/openapitools/model/ReadOnlyFirst.java | 2 +- ...ResponseObjectWithDifferentFieldNames.java | 2 +- .../openapitools/model/SpecialModelName.java | 2 +- .../main/java/org/openapitools/model/Tag.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/User.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 6 +- .../java/org/openapitools/api/FakeApi.java | 86 ++++++++++--------- .../api/FakeClassnameTags123Api.java | 6 +- .../java/org/openapitools/api/PetApi.java | 20 +++-- .../java/org/openapitools/api/StoreApi.java | 8 +- .../java/org/openapitools/api/UserApi.java | 16 ++-- .../model/AdditionalPropertiesAnyTypeDto.java | 4 +- .../model/AdditionalPropertiesArrayDto.java | 4 +- .../model/AdditionalPropertiesBooleanDto.java | 4 +- .../model/AdditionalPropertiesClassDto.java | 30 ++++--- .../model/AdditionalPropertiesIntegerDto.java | 4 +- .../model/AdditionalPropertiesNumberDto.java | 4 +- .../model/AdditionalPropertiesObjectDto.java | 4 +- .../model/AdditionalPropertiesStringDto.java | 4 +- .../org/openapitools/model/AnimalDto.java | 6 +- .../openapitools/model/ApiResponseDto.java | 4 +- .../model/ArrayOfArrayOfNumberOnlyDto.java | 8 +- .../model/ArrayOfNumberOnlyDto.java | 8 +- .../org/openapitools/model/ArrayTestDto.java | 24 +++--- .../org/openapitools/model/BigCatDto.java | 4 +- .../openapitools/model/CapitalizationDto.java | 4 +- .../java/org/openapitools/model/CatDto.java | 4 +- .../org/openapitools/model/CategoryDto.java | 6 +- .../model/ChildWithNullableDto.java | 4 +- .../org/openapitools/model/ClassModelDto.java | 4 +- .../org/openapitools/model/ClientDto.java | 4 +- .../model/ContainerDefaultValueDto.java | 16 ++-- .../java/org/openapitools/model/DogDto.java | 4 +- .../org/openapitools/model/EnumArraysDto.java | 6 +- .../org/openapitools/model/EnumClassDto.java | 4 +- .../org/openapitools/model/EnumTestDto.java | 8 +- .../java/org/openapitools/model/FileDto.java | 4 +- .../model/FileSchemaTestClassDto.java | 18 ++-- .../org/openapitools/model/FormatTestDto.java | 30 ++++--- .../model/HasOnlyReadOnlyDto.java | 4 +- .../java/org/openapitools/model/ListDto.java | 4 +- .../org/openapitools/model/MapTestDto.java | 14 +-- ...ertiesAndAdditionalPropertiesClassDto.java | 12 +-- .../model/Model200ResponseDto.java | 4 +- .../java/org/openapitools/model/NameDto.java | 6 +- .../model/NullableMapPropertyDto.java | 6 +- .../org/openapitools/model/NumberOnlyDto.java | 6 +- .../java/org/openapitools/model/OrderDto.java | 6 +- .../openapitools/model/OuterCompositeDto.java | 6 +- .../org/openapitools/model/OuterEnumDto.java | 4 +- .../model/ParentWithNullableDto.java | 4 +- .../java/org/openapitools/model/PetDto.java | 24 +++--- .../openapitools/model/ReadOnlyFirstDto.java | 4 +- ...ponseObjectWithDifferentFieldNamesDto.java | 4 +- .../org/openapitools/model/ReturnDto.java | 4 +- .../model/SpecialModelNameDto.java | 4 +- .../java/org/openapitools/model/TagDto.java | 4 +- .../model/TypeHolderDefaultDto.java | 16 ++-- .../model/TypeHolderExampleDto.java | 18 ++-- .../java/org/openapitools/model/UserDto.java | 4 +- .../org/openapitools/model/XmlItemDto.java | 32 +++---- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + 200 files changed, 548 insertions(+), 400 deletions(-) diff --git a/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION index 193a12d6e891..0610c66bc14f 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.21.0-SNAPSHOT diff --git a/samples/client/petstore/spring-http-interface-bean-validation/README.md b/samples/client/petstore/spring-http-interface-bean-validation/README.md index d947e03a2484..3f489eac9b72 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/README.md +++ b/samples/client/petstore/spring-http-interface-bean-validation/README.md @@ -1,6 +1,6 @@ # OpenAPI generated API stub -[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface) +[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface) ## Overview @@ -9,13 +9,13 @@ By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an AP This is an example of building API stub interfaces in Java using the Spring framework. The stubs generated can be used in your existing Spring application for HTTP integration with other REST services -To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor +To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `RestClient` instance via constructor ```java @Configuration public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { - public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance - super(myWebClient); + public MyConfiguration(RestClient client) { + super(client); } } ``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-bean-validation/pom.xml b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml index 6d581f4de4fb..da42f71e5d16 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/pom.xml +++ b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml @@ -12,7 +12,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.3 + 3.3.13 @@ -46,7 +46,7 @@ org.springframework.boot - spring-boot-starter-webflux + spring-boot-starter-web @@ -65,7 +65,7 @@ org.openapitools jackson-databind-nullable - 0.2.8 + 0.2.9 org.springframework.boot diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 841d0f9a0aab..5252a92627bc 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -21,7 +21,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface AnotherFakeApi { /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java index c0fa7fc5c62b..8a0e275b854e 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -32,7 +32,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeApi { /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index c73d2afc677f..e76bd5f2f8c8 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -21,7 +21,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeClassnameTags123Api { /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java index e594f94348e9..30ff0e228c2e 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -25,7 +25,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface PetApi { /** @@ -62,7 +62,7 @@ ResponseEntity addPet( accept = { "application/json" } ) ResponseEntity deletePet( - @NotNull @PathVariable("petId") Long petId, + @PathVariable("petId") Long petId, @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ); @@ -120,7 +120,7 @@ ResponseEntity> findPetsByTags( accept = { "application/json", "application/xml" } ) ResponseEntity getPetById( - @NotNull @PathVariable("petId") Long petId + @PathVariable("petId") Long petId ); @@ -136,7 +136,7 @@ ResponseEntity getPetById( accept = { "application/json" } ) ResponseEntity responseObjectDifferentNames( - @NotNull @PathVariable("petId") Long petId + @PathVariable("petId") Long petId ); @@ -177,7 +177,7 @@ ResponseEntity updatePet( contentType = "application/x-www-form-urlencoded" ) ResponseEntity updatePetWithForm( - @NotNull @PathVariable("petId") Long petId, + @PathVariable("petId") Long petId, @Valid @RequestParam(value = "name", required = false) String name, @Valid @RequestParam(value = "status", required = false) String status ); @@ -199,7 +199,7 @@ ResponseEntity updatePetWithForm( contentType = "multipart/form-data" ) ResponseEntity uploadFile( - @NotNull @PathVariable("petId") Long petId, + @PathVariable("petId") Long petId, @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ); @@ -221,7 +221,7 @@ ResponseEntity uploadFile( contentType = "multipart/form-data" ) ResponseEntity uploadFileWithRequiredFile( - @NotNull @PathVariable("petId") Long petId, + @PathVariable("petId") Long petId, @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ); diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java index dc7be91aa895..0aa3b2c544df 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -22,7 +22,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface StoreApi { /** @@ -39,7 +39,7 @@ public interface StoreApi { accept = { "application/json" } ) ResponseEntity deleteOrder( - @NotNull @PathVariable("order_id") String orderId + @PathVariable("order_id") String orderId ); @@ -74,7 +74,7 @@ ResponseEntity> getInventory( accept = { "application/json", "application/xml" } ) ResponseEntity getOrderById( - @NotNull @Min(value = 1L) @Max(value = 5L) @PathVariable("order_id") Long orderId + @Min(value = 1L) @Max(value = 5L) @PathVariable("order_id") Long orderId ); diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java index 79715006ec7d..2389a0a80fac 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -22,7 +22,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface UserApi { /** @@ -93,7 +93,7 @@ ResponseEntity createUsersWithListInput( accept = { "application/json" } ) ResponseEntity deleteUser( - @NotNull @PathVariable("username") String username + @PathVariable("username") String username ); @@ -112,7 +112,7 @@ ResponseEntity deleteUser( accept = { "application/json", "application/xml" } ) ResponseEntity getUserByName( - @NotNull @PathVariable("username") String username + @PathVariable("username") String username ); @@ -168,7 +168,7 @@ ResponseEntity logoutUser( contentType = "application/json" ) ResponseEntity updateUser( - @NotNull @PathVariable("username") String username, + @PathVariable("username") String username, @Valid @RequestBody UserDto userDto ); diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index f9e6dca33a9a..95b9249994ad 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -1,5 +1,5 @@ /* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -13,51 +13,51 @@ import org.openapitools.api.UserApi; import org.springframework.context.annotation.Bean; -import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.web.reactive.function.client.support.WebClientAdapter; +import org.springframework.web.client.RestClient; +import org.springframework.web.client.support.RestClientAdapter; import org.springframework.web.service.invoker.HttpServiceProxyFactory; public abstract class HttpInterfacesAbstractConfigurator { - private final WebClient webClient; + private final RestClient client; - public HttpInterfacesAbstractConfigurator(final WebClient webClient) { - this.webClient = webClient; + public HttpInterfacesAbstractConfigurator(final RestClient client) { + this.client = client; } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") AnotherFakeApi anotherFakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build(); return factory.createClient(AnotherFakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") FakeApi fakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build(); return factory.createClient(FakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build(); return factory.createClient(FakeClassnameTags123Api.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") PetApi petHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build(); return factory.createClient(PetApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") StoreApi storeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build(); return factory.createClient(StoreApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") UserApi userHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(client)).build(); return factory.createClient(UserApi.class); } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java index 886970920eb1..7e0c32972b7c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("AdditionalPropertiesAnyType") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesAnyTypeDto { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java index 4197bbea822d..0f02e204e209 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -25,7 +25,7 @@ */ @JsonTypeName("AdditionalPropertiesArray") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesArrayDto { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java index 1977e18d11ed..b92a64c6e06f 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("AdditionalPropertiesBoolean") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesBooleanDto { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 13a840072673..373ca3bda19d 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -27,7 +27,7 @@ */ @JsonTypeName("AdditionalPropertiesClass") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { @Valid diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java index 33b4c4c65fb2..95efbc8ed233 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("AdditionalPropertiesInteger") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesIntegerDto { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java index 38effa5104b2..9dcf2c570eb0 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -25,7 +25,7 @@ */ @JsonTypeName("AdditionalPropertiesNumber") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesNumberDto { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java index 6c87b7e7fc99..fadc0fcd7969 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -25,7 +25,7 @@ */ @JsonTypeName("AdditionalPropertiesObject") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesObjectDto { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java index c9f34e8ffaa5..e6b6e5d0cdc8 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("AdditionalPropertiesString") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesStringDto { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java index 3ddcbf21b31b..eabf65e8ba43 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java @@ -33,7 +33,7 @@ @JsonSubTypes.Type(value = DogDto.class, name = "Dog") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AnimalDto { private String className; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java index bf085b05eda4..a6416a603db6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("ApiResponse") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ApiResponseDto { private @Nullable Integer code; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 15cfbe917bc8..ff8f865f060b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("ArrayOfArrayOfNumberOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { @Valid diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index b61174cf1bdc..9c46b3f2d2a4 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("ArrayOfNumberOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { @Valid diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java index 593114ac41b3..182b1ef715d1 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("ArrayTest") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { @Valid diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java index d2ff6b309852..8508cb1368bb 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java @@ -26,7 +26,7 @@ @JsonTypeName("BigCat") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class BigCatDto extends CatDto { /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java index d8cc493ddf15..0731d6c88fd8 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("Capitalization") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CapitalizationDto { private @Nullable String smallCamel; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java index 3aa992e73ab6..e93bc2217e97 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java @@ -32,7 +32,7 @@ @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CatDto extends AnimalDto { private @Nullable Boolean declawed; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java index 902d5dc87f18..9372a8e0282b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("Category") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CategoryDto { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java index 511a8e92b74c..dc41e0c460e6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -28,7 +28,7 @@ @JsonTypeName("ChildWithNullable") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ChildWithNullableDto extends ParentWithNullableDto { private @Nullable String otherProperty; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java index 1c87aaf53b6f..6c39c7bad4ce 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("ClassModel") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ClassModelDto { private @Nullable String propertyClass; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java index 7981678f9e83..11e1af1fef5c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("Client") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ClientDto { private @Nullable String client; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 93283cfff1c5..e80243fc8510 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -25,7 +25,7 @@ */ @JsonTypeName("ContainerDefaultValue") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValueDto { @Valid diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java index a32df78ef3cc..2b730cc5484b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java @@ -25,7 +25,7 @@ @JsonTypeName("Dog") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class DogDto extends AnimalDto { private @Nullable String breed; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java index bb0d71da9a24..f936acb137a3 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("EnumArrays") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class EnumArraysDto { /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java index 45b32592b12d..ce3e48bc9863 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java @@ -19,7 +19,7 @@ * Gets or Sets EnumClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public enum EnumClassDto { _ABC("_abc"), diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java index b1dbd61aaeaf..804a1ee8085d 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java @@ -22,7 +22,7 @@ */ @JsonTypeName("Enum_Test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class EnumTestDto { /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java index f556f0485ca1..df8d2d72455c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("File") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class FileDto { private @Nullable String sourceURI; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index 41900022c953..3ba111922984 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("FileSchemaTestClass") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class FileSchemaTestClassDto { private @Nullable FileDto file; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java index 98778497e61a..1346c978199c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java @@ -26,7 +26,7 @@ */ @JsonTypeName("format_test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class FormatTestDto { private @Nullable Integer integer; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java index 5280f2a6b4cd..500d2cf3e3bf 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("hasOnlyReadOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class HasOnlyReadOnlyDto { private @Nullable String bar; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java index 75c03c0c5d45..4346edb85bc7 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("List") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ListDto { private @Nullable String _123list; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java index 393ffaa82d9f..5f226c154f66 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java @@ -23,7 +23,7 @@ */ @JsonTypeName("MapTest") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { @Valid diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index ee001161dc60..c789b28301be 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -26,7 +26,7 @@ */ @JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MixedPropertiesAndAdditionalPropertiesClassDto { private @Nullable UUID uuid; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java index 6da351f6cedb..0065969a11e1 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Model200ResponseDto { private @Nullable Integer name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java index d95e2c968f07..84eb192431ec 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("Name") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NameDto { private Integer name; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 2bd9502bcde9..730b5e0cbb64 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -25,7 +25,7 @@ */ @JsonTypeName("NullableMapProperty") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapPropertyDto { @Valid diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java index 69f5ec824231..be0e2f73dad9 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -21,7 +21,7 @@ */ @JsonTypeName("NumberOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NumberOnlyDto { private @Nullable BigDecimal justNumber; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java index 1f918cc2cfe6..ffbbabc29281 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java @@ -23,7 +23,7 @@ */ @JsonTypeName("Order") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class OrderDto { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java index a40688f14daa..ceccde71734e 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -21,7 +21,7 @@ */ @JsonTypeName("OuterComposite") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class OuterCompositeDto { private @Nullable BigDecimal myNumber; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java index 545582c00e48..12d4d2d80d17 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java @@ -19,7 +19,7 @@ * Gets or Sets OuterEnum */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public enum OuterEnumDto { PLACED("placed"), diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java index afdab67a078a..f2d47de277a7 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -35,7 +35,7 @@ @JsonSubTypes.Type(value = ChildWithNullableDto.class, name = "ChildWithNullable") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ParentWithNullableDto { /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java index d7a6158e2c03..a0306ab3c8f9 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java @@ -29,7 +29,7 @@ */ @JsonTypeName("Pet") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class PetDto { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java index 3658a91bea4c..136b49624fa1 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("ReadOnlyFirst") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ReadOnlyFirstDto { private @Nullable String bar; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java index 52ddd241d878..73ac52022a98 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("ResponseObjectWithDifferentFieldNames") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ResponseObjectWithDifferentFieldNamesDto { private @Nullable String normalPropertyName; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java index 732fafa7bad9..64bb5d0cc9a3 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("Return") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ReturnDto { private @Nullable Integer _return; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java index 8794e9221fb4..478782acef00 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("_special_model.name_") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class SpecialModelNameDto { private @Nullable Long $specialPropertyName; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java index 411f9e37d18d..80e4e299da4b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("Tag") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class TagDto { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 986d6fe83a4d..516a41ef1efb 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("TypeHolderDefault") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class TypeHolderDefaultDto { private String stringItem = "what"; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index 3c5877a2c43e..a5a07b71e168 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("TypeHolderExample") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class TypeHolderExampleDto { private String stringItem; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java index a0cc4f95509f..a8fa36598a74 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java @@ -20,7 +20,7 @@ */ @JsonTypeName("User") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class UserDto { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java index 36faf67738e1..087af1c3aa20 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java @@ -24,7 +24,7 @@ */ @JsonTypeName("XmlItem") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class XmlItemDto { private @Nullable String attributeString; diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3f0185e8b816..4f7908934c00 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface AnotherFakeApi { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index 1198afdab02f..f20e7554ca80 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -28,6 +28,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeApi { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 30b8edcf290f..f0b43d654b0f 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeClassnameTags123Api { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java index 7eb100e574a6..205291538b2f 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface PetApi { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java index 735713101414..52ed83ed8800 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface StoreApi { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index 87ef052c900f..8772799576fc 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface UserApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION index 193a12d6e891..0610c66bc14f 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.21.0-SNAPSHOT diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md b/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md index d947e03a2484..64b2b038df20 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md @@ -1,6 +1,6 @@ # OpenAPI generated API stub -[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface) +[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface) ## Overview @@ -14,8 +14,8 @@ To use auto-generated interfaces you have to create your own configuration which @Configuration public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { - public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance - super(myWebClient); + public MyConfiguration(WebClient client) { + super(client); } } ``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml index b17a26ec47fe..d1730827004b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml @@ -12,7 +12,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.3 + 3.3.13 @@ -65,7 +65,7 @@ org.openapitools jackson-databind-nullable - 0.2.8 + 0.2.9 org.springframework.boot diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java index ba0dbe4037e1..14c87ca228ad 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -25,7 +25,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface AnotherFakeApi { /** diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java index 5c2cac6624c1..02f2045ad2d7 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -36,7 +36,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeApi { /** diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index ea55bc0d754a..ec935f0ea1da 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -25,7 +25,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeClassnameTags123Api { /** diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java index a7e64105f8a9..a2a8e59ebf41 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -29,7 +29,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface PetApi { /** @@ -66,7 +66,7 @@ Mono> addPet( accept = { "application/json" } ) Mono> deletePet( - @NotNull @PathVariable("petId") Long petId, + @PathVariable("petId") Long petId, @RequestHeader(value = "api_key", required = false) @Nullable String apiKey ); @@ -124,7 +124,7 @@ Mono>> findPetsByTags( accept = { "application/json", "application/xml" } ) Mono> getPetById( - @NotNull @PathVariable("petId") Long petId + @PathVariable("petId") Long petId ); @@ -140,7 +140,7 @@ Mono> getPetById( accept = { "application/json" } ) Mono> responseObjectDifferentNames( - @NotNull @PathVariable("petId") Long petId + @PathVariable("petId") Long petId ); @@ -181,7 +181,7 @@ Mono> updatePet( contentType = "application/x-www-form-urlencoded" ) Mono> updatePetWithForm( - @NotNull @PathVariable("petId") Long petId, + @PathVariable("petId") Long petId, @Valid @RequestPart(value = "name", required = false) String name, @Valid @RequestPart(value = "status", required = false) String status ); @@ -203,7 +203,7 @@ Mono> updatePetWithForm( contentType = "multipart/form-data" ) Mono> uploadFile( - @NotNull @PathVariable("petId") Long petId, + @PathVariable("petId") Long petId, @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) Part file ); @@ -225,7 +225,7 @@ Mono> uploadFile( contentType = "multipart/form-data" ) Mono> uploadFileWithRequiredFile( - @NotNull @PathVariable("petId") Long petId, + @PathVariable("petId") Long petId, @RequestPart(value = "requiredFile", required = true) Part requiredFile, @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata ); diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java index a9cd27332e44..48e66725f9ca 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -26,7 +26,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface StoreApi { /** @@ -43,7 +43,7 @@ public interface StoreApi { accept = { "application/json" } ) Mono> deleteOrder( - @NotNull @PathVariable("order_id") String orderId + @PathVariable("order_id") String orderId ); @@ -78,7 +78,7 @@ Mono>> getInventory( accept = { "application/json", "application/xml" } ) Mono> getOrderById( - @NotNull @Min(value = 1L) @Max(value = 5L) @PathVariable("order_id") Long orderId + @Min(value = 1L) @Max(value = 5L) @PathVariable("order_id") Long orderId ); diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java index ea75474e271b..5b61d0ab1814 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -26,7 +26,7 @@ @Validated -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface UserApi { /** @@ -97,7 +97,7 @@ Mono> createUsersWithListInput( accept = { "application/json" } ) Mono> deleteUser( - @NotNull @PathVariable("username") String username + @PathVariable("username") String username ); @@ -116,7 +116,7 @@ Mono> deleteUser( accept = { "application/json", "application/xml" } ) Mono> getUserByName( - @NotNull @PathVariable("username") String username + @PathVariable("username") String username ); @@ -172,7 +172,7 @@ Mono> logoutUser( contentType = "application/json" ) Mono> updateUser( - @NotNull @PathVariable("username") String username, + @PathVariable("username") String username, @Valid @RequestBody Mono user ); diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index f9e6dca33a9a..55072775fd39 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -1,5 +1,5 @@ /* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.21.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -19,45 +19,45 @@ public abstract class HttpInterfacesAbstractConfigurator { - private final WebClient webClient; + private final WebClient client; - public HttpInterfacesAbstractConfigurator(final WebClient webClient) { - this.webClient = webClient; + public HttpInterfacesAbstractConfigurator(final WebClient client) { + this.client = client; } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") AnotherFakeApi anotherFakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build(); return factory.createClient(AnotherFakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") FakeApi fakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build(); return factory.createClient(FakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build(); return factory.createClient(FakeClassnameTags123Api.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") PetApi petHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build(); return factory.createClient(PetApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") StoreApi storeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build(); return factory.createClient(StoreApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") UserApi userHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build(); return factory.createClient(UserApi.class); } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ed35bddc0d18..4ef7c07d2b6a 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -22,7 +22,7 @@ * AdditionalPropertiesAnyType */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesAnyType { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 8f5de0a41759..1d97a62feebe 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -23,7 +23,7 @@ * AdditionalPropertiesArray */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesArray { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 9503e53fbea9..41e5adee1543 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -22,7 +22,7 @@ * AdditionalPropertiesBoolean */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesBoolean { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index aee5c12f9d03..8af8e8615a24 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -25,7 +25,7 @@ * AdditionalPropertiesClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { @Valid diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 8b6ab04b721b..9d0a0a680eb5 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -22,7 +22,7 @@ * AdditionalPropertiesInteger */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesInteger { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 31c7c2b2c972..2287fbdf36ad 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -23,7 +23,7 @@ * AdditionalPropertiesNumber */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesNumber { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 2150a3bf5fed..435c0c1750c5 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -23,7 +23,7 @@ * AdditionalPropertiesObject */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesObject { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 2739a9d99484..ebce1cb3bd20 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -22,7 +22,7 @@ * AdditionalPropertiesString */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesString { private @Nullable String name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java index fab9704c9ac7..b8d75ecc2ee6 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java @@ -32,7 +32,7 @@ @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Animal { private String className; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 1ccce206ee09..bcb9b84d4895 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ * ArrayOfArrayOfNumberOnly */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { @Valid diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3bcc6b8da18c..2b31d9e56a5e 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ * ArrayOfNumberOnly */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { @Valid diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java index c017bcc07631..ae9fce80ee65 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ * ArrayTest */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { @Valid diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java index 1e138a1f3ceb..d4455545f223 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java @@ -24,7 +24,7 @@ */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class BigCat extends Cat { /** diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java index 8c514dd279d7..adc9d1840559 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java @@ -18,7 +18,7 @@ * Capitalization */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Capitalization { private @Nullable String smallCamel; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java index 306d5a91b2cc..02e7a5c6d8e4 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java @@ -31,7 +31,7 @@ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Cat extends Animal { private @Nullable Boolean declawed; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java index f89fb2c0f72a..9c692f7d99f6 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java @@ -18,7 +18,7 @@ * Category */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Category { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java index da45bd694351..32c91c42edde 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -26,7 +26,7 @@ */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ChildWithNullable extends ParentWithNullable { private @Nullable String otherProperty; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java index a6030e38a119..542dfbf2f681 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java @@ -18,7 +18,7 @@ * Model for testing model with \"_class\" property */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ClassModel { private @Nullable String propertyClass; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java index 8a48ed1f1de0..db0c6556fd46 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java @@ -18,7 +18,7 @@ * Client */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Client { private @Nullable String client; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 1eea6aa88458..8c528b040e92 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -23,7 +23,7 @@ * ContainerDefaultValue */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { @Valid diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java index 10979248b9f6..dcfc17d0ae2c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java @@ -23,7 +23,7 @@ */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Dog extends Animal { private @Nullable String breed; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java index 1449b56a4ec2..88271623de7b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java @@ -22,7 +22,7 @@ * EnumArrays */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class EnumArrays { /** diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java index bc592d0da188..e479b3ada7d8 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java @@ -19,7 +19,7 @@ * Gets or Sets EnumClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public enum EnumClass { _ABC("_abc"), diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java index 437130821b1c..6d051b377303 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java @@ -22,7 +22,7 @@ */ @JsonTypeName("Enum_Test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class EnumTest { /** diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java index 702f775da7cf..11b33636ab67 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java @@ -18,7 +18,7 @@ * Must be named `File` for test. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class File { private @Nullable String sourceURI; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 3dbed6086f1c..8e0be4f028d7 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -22,7 +22,7 @@ * FileSchemaTestClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class FileSchemaTestClass { private @Nullable File file; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java index 53ff8580e2ef..92c47358f0ac 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java @@ -26,7 +26,7 @@ */ @JsonTypeName("format_test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class FormatTest { private @Nullable Integer integer; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index fb34bd778685..778559306bd1 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -20,7 +20,7 @@ */ @JsonTypeName("hasOnlyReadOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class HasOnlyReadOnly { private @Nullable String bar; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java index 45b414fb171b..5875cddbc733 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java @@ -21,7 +21,7 @@ * MapTest */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { @Valid diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03dab8989e56..2bffebe278b4 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,7 +24,7 @@ * MixedPropertiesAndAdditionalPropertiesClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MixedPropertiesAndAdditionalPropertiesClass { private @Nullable UUID uuid; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java index 098f09aa5709..5a5d339fd8ee 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java @@ -20,7 +20,7 @@ */ @JsonTypeName("200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Model200Response { private @Nullable Integer name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java index 84955e435ac4..a4de294111f3 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -20,7 +20,7 @@ */ @JsonTypeName("ApiResponse") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ModelApiResponse { private @Nullable Integer code; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java index 0aa52a9c108a..826ae4bd0e89 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java @@ -20,7 +20,7 @@ */ @JsonTypeName("List") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ModelList { private @Nullable String _123list; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java index 7e05d08e86e4..baff2133f891 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java @@ -20,7 +20,7 @@ */ @JsonTypeName("Return") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ModelReturn { private @Nullable Integer _return; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java index c8897b7a6f56..08dc71ea6d10 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java @@ -18,7 +18,7 @@ * Model for testing model name same as property name */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Name { private Integer name; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java index 9ed6125cfc94..39adf1f3cd47 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -23,7 +23,7 @@ * NullableMapProperty */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { @Valid diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java index e7d1648b0667..805876ee124f 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java @@ -19,7 +19,7 @@ * NumberOnly */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NumberOnly { private @Nullable BigDecimal justNumber; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java index 3c25b6d5fbd3..c448cc07678e 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java @@ -21,7 +21,7 @@ * Order */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Order { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java index bd54d1fcd677..7fe171307a2c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java @@ -19,7 +19,7 @@ * OuterComposite */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class OuterComposite { private @Nullable BigDecimal myNumber; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java index d97fb288a82f..cfa226eddcdd 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java @@ -19,7 +19,7 @@ * Gets or Sets OuterEnum */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public enum OuterEnum { PLACED("placed"), diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java index d34d68475655..97146804b925 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -34,7 +34,7 @@ @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ParentWithNullable { /** diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java index 07201903da42..13b3b2822c80 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java @@ -27,7 +27,7 @@ * Pet */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Pet { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 2cc6e59e137e..8d998f554274 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -18,7 +18,7 @@ * ReadOnlyFirst */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ReadOnlyFirst { private @Nullable String bar; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 797e1875ae5d..d97baed71ff3 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -18,7 +18,7 @@ * ResponseObjectWithDifferentFieldNames */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ResponseObjectWithDifferentFieldNames { private @Nullable String normalPropertyName; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java index 6cd368fd9ace..c743354bc076 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -20,7 +20,7 @@ */ @JsonTypeName("_special_model.name_") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class SpecialModelName { private @Nullable Long $specialPropertyName; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java index 86e3dd2f21df..f127cfe7cfa1 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java @@ -18,7 +18,7 @@ * Tag */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class Tag { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java index fa13f5becf27..229b0b3981d5 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -22,7 +22,7 @@ * TypeHolderDefault */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class TypeHolderDefault { private String stringItem = "what"; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java index bf037b841615..87cd7beb5e91 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -22,7 +22,7 @@ * TypeHolderExample */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class TypeHolderExample { private String stringItem; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java index b8f5a380fd00..a1f34be0ba82 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java @@ -18,7 +18,7 @@ * User */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class User { private @Nullable Long id; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java index a12501876451..8bda62b0a221 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java @@ -22,7 +22,7 @@ * XmlItem */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class XmlItem { private @Nullable String attributeString; diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java index e1d8e8fbb409..944b6e6496bb 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface AnotherFakeApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index 7bfb53949792..e2d79e006bd5 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -32,6 +32,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 82111b8af857..efe259f9fbf0 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeClassnameTags123Api { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java index 998eef7c0941..e35687675811 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java @@ -25,6 +25,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface PetApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java index 433e4155feb3..4aeda355d4d7 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java @@ -22,6 +22,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface StoreApi { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index 0c6a6aab6b05..0c3ec56f0e90 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -22,6 +22,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface UserApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index dd98f350e560..84a8e4df089e 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface AnotherFakeApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java index 03febb38d38e..e9a5b543f480 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -32,6 +32,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index a4aa499c9a24..9cfaeeb6ced5 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeClassnameTags123Api { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java index 5d47e2021539..55eb1f34d5c4 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -25,6 +25,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface PetApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java index 1b5a9f37785b..5e516ef435c6 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -22,6 +22,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface StoreApi { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java index 2816eea64126..4386d98836a1 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -22,6 +22,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface UserApi { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/AnotherFakeApi.java index 761042a4ea9b..5252a92627bc 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -17,6 +20,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface AnotherFakeApi { @@ -34,7 +38,7 @@ public interface AnotherFakeApi { contentType = "application/json" ) ResponseEntity call123testSpecialTags( - @RequestBody ClientDto clientDto + @Valid @RequestBody ClientDto clientDto ); } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java index d226da16948e..8a0e275b854e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java @@ -21,6 +21,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -28,6 +31,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeApi { @@ -45,7 +49,7 @@ public interface FakeApi { contentType = "application/xml" ) ResponseEntity createXmlItem( - @RequestBody XmlItemDto xmlItemDto + @Valid @RequestBody XmlItemDto xmlItemDto ); @@ -63,7 +67,7 @@ ResponseEntity createXmlItem( contentType = "application/json" ) ResponseEntity fakeOuterBooleanSerialize( - @RequestBody(required = false) @Nullable Boolean body + @Valid @RequestBody(required = false) @Nullable Boolean body ); @@ -81,7 +85,7 @@ ResponseEntity fakeOuterBooleanSerialize( contentType = "application/json" ) ResponseEntity fakeOuterCompositeSerialize( - @RequestBody(required = false) @Nullable OuterCompositeDto outerCompositeDto + @Valid @RequestBody(required = false) @Nullable OuterCompositeDto outerCompositeDto ); @@ -99,7 +103,7 @@ ResponseEntity fakeOuterCompositeSerialize( contentType = "application/json" ) ResponseEntity fakeOuterNumberSerialize( - @RequestBody(required = false) @Nullable BigDecimal body + @Valid @RequestBody(required = false) @Nullable BigDecimal body ); @@ -117,7 +121,7 @@ ResponseEntity fakeOuterNumberSerialize( contentType = "application/json" ) ResponseEntity fakeOuterStringSerialize( - @RequestBody(required = false) @Nullable String body + @Valid @RequestBody(required = false) @Nullable String body ); @@ -135,7 +139,7 @@ ResponseEntity fakeOuterStringSerialize( contentType = "application/json" ) ResponseEntity testBodyWithFileSchema( - @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto + @Valid @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto ); @@ -153,8 +157,8 @@ ResponseEntity testBodyWithFileSchema( contentType = "application/json" ) ResponseEntity testBodyWithQueryParams( - @RequestParam(value = "query", required = true) String query, - @RequestBody UserDto userDto + @NotNull @Valid @RequestParam(value = "query", required = true) String query, + @Valid @RequestBody UserDto userDto ); @@ -172,7 +176,7 @@ ResponseEntity testBodyWithQueryParams( contentType = "application/json" ) ResponseEntity testClientModel( - @RequestBody ClientDto clientDto + @Valid @RequestBody ClientDto clientDto ); @@ -204,20 +208,20 @@ ResponseEntity testClientModel( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testEndpointParameters( - @RequestParam(value = "number", required = true) BigDecimal number, - @RequestParam(value = "double", required = true) Double _double, - @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @RequestParam(value = "byte", required = true) byte[] _byte, - @RequestParam(value = "integer", required = false) Integer integer, - @RequestParam(value = "int32", required = false) Integer int32, - @RequestParam(value = "int64", required = false) Long int64, - @RequestParam(value = "float", required = false) Float _float, - @RequestParam(value = "string", required = false) String string, + @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") @Valid @RequestParam(value = "number", required = true) BigDecimal number, + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") @Valid @RequestParam(value = "double", required = true) Double _double, + @Pattern(regexp = "^[A-Z].*") @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Valid @RequestParam(value = "byte", required = true) byte[] _byte, + @Min(value = 10) @Max(value = 100) @Valid @RequestParam(value = "integer", required = false) Integer integer, + @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, + @Valid @RequestParam(value = "int64", required = false) Long int64, + @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, + @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, @RequestPart(value = "binary", required = false) MultipartFile binary, - @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @RequestParam(value = "password", required = false) String password, - @RequestParam(value = "callback", required = false) String paramCallback + @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Size(min = 10, max = 64) @Valid @RequestParam(value = "password", required = false) String password, + @Valid @RequestParam(value = "callback", required = false) String paramCallback ); @@ -245,12 +249,12 @@ ResponseEntity testEndpointParameters( ResponseEntity testEnumParameters( @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray, @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, - @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, - @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, - @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Valid @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, + @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Valid @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, + @Valid @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, + @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ); @@ -272,12 +276,12 @@ ResponseEntity testEnumParameters( accept = { "application/json" } ) ResponseEntity testGroupParameters( - @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, + @NotNull @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @NotNull @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Valid @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup, - @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group + @Valid @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group ); @@ -295,7 +299,7 @@ ResponseEntity testGroupParameters( contentType = "application/json" ) ResponseEntity testInlineAdditionalProperties( - @RequestBody Map requestBody + @Valid @RequestBody Map requestBody ); @@ -314,8 +318,8 @@ ResponseEntity testInlineAdditionalProperties( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testJsonFormData( - @RequestParam(value = "param", required = true) String param, - @RequestParam(value = "param2", required = true) String param2 + @Valid @RequestParam(value = "param", required = true) String param, + @Valid @RequestParam(value = "param2", required = true) String param2 ); @@ -333,7 +337,7 @@ ResponseEntity testJsonFormData( contentType = "application/json" ) ResponseEntity testNullable( - @RequestBody ChildWithNullableDto childWithNullableDto + @Valid @RequestBody ChildWithNullableDto childWithNullableDto ); @@ -353,10 +357,10 @@ ResponseEntity testNullable( accept = { "application/json" } ) ResponseEntity testQueryParameterCollectionFormat( - @RequestParam(value = "pipe", required = true) List pipe, - @RequestParam(value = "http", required = true) List http, - @RequestParam(value = "url", required = true) List url, - @RequestParam(value = "context", required = true) List context + @NotNull @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Valid @RequestParam(value = "context", required = true) List context ); diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 93610580c016..e76bd5f2f8c8 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -17,6 +20,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeClassnameTags123Api { @@ -34,7 +38,7 @@ public interface FakeClassnameTags123Api { contentType = "application/json" ) ResponseEntity testClassname( - @RequestBody ClientDto clientDto + @Valid @RequestBody ClientDto clientDto ); } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java index dd7c3d5d2d09..30ff0e228c2e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java @@ -14,6 +14,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -21,6 +24,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface PetApi { @@ -39,7 +43,7 @@ public interface PetApi { contentType = "application/json" ) ResponseEntity addPet( - @RequestBody PetDto petDto + @Valid @RequestBody PetDto petDto ); @@ -77,7 +81,7 @@ ResponseEntity deletePet( accept = { "application/json", "application/xml" } ) ResponseEntity> findPetsByStatus( - @RequestParam(value = "status", required = true) List status + @NotNull @Valid @RequestParam(value = "status", required = true) List status ); @@ -97,7 +101,7 @@ ResponseEntity> findPetsByStatus( accept = { "application/json", "application/xml" } ) ResponseEntity> findPetsByTags( - @RequestParam(value = "tags", required = true) Set tags + @NotNull @Valid @RequestParam(value = "tags", required = true) Set tags ); @@ -153,7 +157,7 @@ ResponseEntity responseObjectDifferent contentType = "application/json" ) ResponseEntity updatePet( - @RequestBody PetDto petDto + @Valid @RequestBody PetDto petDto ); @@ -174,8 +178,8 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( @PathVariable("petId") Long petId, - @RequestParam(value = "name", required = false) String name, - @RequestParam(value = "status", required = false) String status + @Valid @RequestParam(value = "name", required = false) String name, + @Valid @RequestParam(value = "status", required = false) String status ); @@ -196,7 +200,7 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( @PathVariable("petId") Long petId, - @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ); @@ -219,7 +223,7 @@ ResponseEntity uploadFile( ResponseEntity uploadFileWithRequiredFile( @PathVariable("petId") Long petId, @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ); } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/StoreApi.java index 4fbe17b28f5d..0aa3b2c544df 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/StoreApi.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -18,6 +21,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface StoreApi { @@ -70,7 +74,7 @@ ResponseEntity> getInventory( accept = { "application/json", "application/xml" } ) ResponseEntity getOrderById( - @PathVariable("order_id") Long orderId + @Min(value = 1L) @Max(value = 5L) @PathVariable("order_id") Long orderId ); @@ -89,7 +93,7 @@ ResponseEntity getOrderById( contentType = "application/json" ) ResponseEntity placeOrder( - @RequestBody OrderDto orderDto + @Valid @RequestBody OrderDto orderDto ); } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/UserApi.java index 453937b4130b..2389a0a80fac 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/UserApi.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -18,6 +21,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface UserApi { @@ -35,7 +39,7 @@ public interface UserApi { contentType = "application/json" ) ResponseEntity createUser( - @RequestBody UserDto userDto + @Valid @RequestBody UserDto userDto ); @@ -53,7 +57,7 @@ ResponseEntity createUser( contentType = "application/json" ) ResponseEntity createUsersWithArrayInput( - @RequestBody List userDto + @Valid @RequestBody List<@Valid UserDto> userDto ); @@ -71,7 +75,7 @@ ResponseEntity createUsersWithArrayInput( contentType = "application/json" ) ResponseEntity createUsersWithListInput( - @RequestBody List userDto + @Valid @RequestBody List<@Valid UserDto> userDto ); @@ -127,8 +131,8 @@ ResponseEntity getUserByName( accept = { "application/json", "application/xml" } ) ResponseEntity loginUser( - @RequestParam(value = "username", required = true) String username, - @RequestParam(value = "password", required = true) String password + @NotNull @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Valid @RequestParam(value = "password", required = true) String password ); @@ -165,7 +169,7 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( @PathVariable("username") String username, - @RequestBody UserDto userDto + @Valid @RequestBody UserDto userDto ); } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java index f7bdbff25882..4f8ebf4134f7 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java index 5d39c94b168b..f6be3d980051 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -8,7 +8,9 @@ import java.util.List; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java index 2326e023305d..21a168c52f10 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index a9f76217e1a8..ad73c9a2cb2c 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -11,7 +11,9 @@ import java.util.Map; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -25,28 +27,28 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - + @Valid private Map mapString = new HashMap<>(); - + @Valid private Map mapNumber = new HashMap<>(); - + @Valid private Map mapInteger = new HashMap<>(); - + @Valid private Map mapBoolean = new HashMap<>(); - + @Valid private Map> mapArrayInteger = new HashMap<>(); - + @Valid private Map> mapArrayAnytype = new HashMap<>(); - + @Valid private Map> mapMapString = new HashMap<>(); - + @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; @@ -99,7 +101,7 @@ public AdditionalPropertiesClassDto putMapNumberItem(String key, BigDecimal mapN * Get mapNumber * @return mapNumber */ - + @Valid @JsonProperty("map_number") public Map getMapNumber() { return mapNumber; @@ -180,7 +182,7 @@ public AdditionalPropertiesClassDto putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; @@ -207,7 +209,7 @@ public AdditionalPropertiesClassDto putMapArrayAnytypeItem(String key, List> getMapArrayAnytype() { return mapArrayAnytype; @@ -234,7 +236,7 @@ public AdditionalPropertiesClassDto putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; @@ -261,7 +263,7 @@ public AdditionalPropertiesClassDto putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java index bc3f224c29ce..d53386fca735 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java index ba61548c3f96..eae002a40988 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -8,7 +8,9 @@ import java.math.BigDecimal; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java index 75905c21995f..d098b93ba8b8 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -8,7 +8,9 @@ import java.util.Map; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java index fb02f671b4c2..22cf2deca507 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java index f00f33985dea..da6a40a0a94c 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -51,7 +53,7 @@ public AnimalDto className(String className) { * Get className * @return className */ - @NotNull + @NotNull @JsonProperty("className") public String getClassName() { return className; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java index 31365bef748e..b92f51c68f80 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 1c6fbd60ae04..80f664d7476c 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -11,7 +11,9 @@ import java.util.List; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -25,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - + @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { @@ -45,7 +47,7 @@ public ArrayOfArrayOfNumberOnlyDto addArrayArrayNumberItem(List arra * Get arrayArrayNumber * @return arrayArrayNumber */ - + @Valid @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { return arrayArrayNumber; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index 681e84a1c135..ca1626905c00 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -11,7 +11,9 @@ import java.util.List; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -25,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - + @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { @@ -45,7 +47,7 @@ public ArrayOfNumberOnlyDto addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - + @Valid @JsonProperty("ArrayNumber") public List getArrayNumber() { return arrayNumber; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java index 3fec84126570..b575074a393d 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -11,7 +11,9 @@ import org.openapitools.model.ReadOnlyFirstDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -25,14 +27,14 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - + @Valid private List arrayOfString = new ArrayList<>(); - + @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - - private List> arrayArrayOfModel = new ArrayList<>(); + @Valid + private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -78,7 +80,7 @@ public ArrayTestDto addArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - + @Valid @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; @@ -88,12 +90,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTestDto addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -105,13 +107,13 @@ public ArrayTestDto addArrayArrayOfModelItem(List arrayArrayOf * Get arrayArrayOfModel * @return arrayArrayOfModel */ - + @Valid @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java index dddd910b5dfe..eacff3563462 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java @@ -12,7 +12,9 @@ import org.openapitools.model.CatDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java index 82d3055a8c73..e7e4676375af 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java index 0951df4f86fc..30efa1c0c8d1 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java @@ -11,7 +11,9 @@ import org.openapitools.model.AnimalDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java index ec7fe8360802..c25e93e1ee60 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -57,7 +59,7 @@ public CategoryDto name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java index a050b17fe813..8bc61831ba5f 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -12,7 +12,9 @@ import org.openapitools.model.ParentWithNullableDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java index e4faa4dcdc34..92f39e8ee1d3 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java index 26fc6aae3ec0..44545af4d541 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index e9187bc2de56..e886ca5c9e11 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -10,7 +10,9 @@ import java.util.List; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -24,16 +26,16 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValueDto { - + @Valid private @Nullable List nullableArray; - + @Valid private List nullableRequiredArray; - + @Valid private List requiredArray = new ArrayList<>(); - + @Valid private @Nullable List nullableArrayWithDefault = new ArrayList<>(Arrays.asList("foo", "bar")); public ContainerDefaultValueDto() { @@ -84,7 +86,7 @@ public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequ * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull + @NotNull @JsonProperty("nullable_required_array") public List getNullableRequiredArray() { return nullableRequiredArray; @@ -111,7 +113,7 @@ public ContainerDefaultValueDto addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull + @NotNull @JsonProperty("required_array") public List getRequiredArray() { return requiredArray; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java index 8f5ffde9574c..adbaa6953a9e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java @@ -11,7 +11,9 @@ import org.openapitools.model.AnimalDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java index 6e037cc3ab39..6150ad05f1d0 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -11,7 +11,9 @@ import java.util.List; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -97,7 +99,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - + @Valid private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumClassDto.java index d5a75962229d..218a667a3692 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumClassDto.java @@ -4,7 +4,9 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java index a362f23c1be7..3f24ed6c8265 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java @@ -9,7 +9,9 @@ import org.openapitools.model.OuterEnumDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -209,7 +211,7 @@ public EnumTestDto enumStringRequired(EnumStringRequiredEnum enumStringRequired) * Get enumStringRequired * @return enumStringRequired */ - @NotNull + @NotNull @JsonProperty("enum_string_required") public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; @@ -266,7 +268,7 @@ public EnumTestDto outerEnum(@Nullable OuterEnumDto outerEnum) { * Get outerEnum * @return outerEnum */ - + @Valid @JsonProperty("outerEnum") public @Nullable OuterEnumDto getOuterEnum() { return outerEnum; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java index c97c208c8c9a..e7bb293f9936 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index af3a75bc3bb6..d2cc09e8e720 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -11,7 +11,9 @@ import org.openapitools.model.FileDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -27,8 +29,8 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - - private List files = new ArrayList<>(); + @Valid + private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { this.file = file; @@ -39,7 +41,7 @@ public FileSchemaTestClassDto file(@Nullable FileDto file) { * Get file * @return file */ - + @Valid @JsonProperty("file") public @Nullable FileDto getFile() { return file; @@ -49,7 +51,7 @@ public void setFile(@Nullable FileDto file) { this.file = file; } - public FileSchemaTestClassDto files(List files) { + public FileSchemaTestClassDto files(List<@Valid FileDto> files) { this.files = files; return this; } @@ -66,13 +68,13 @@ public FileSchemaTestClassDto addFilesItem(FileDto filesItem) { * Get files * @return files */ - + @Valid @JsonProperty("files") - public List getFiles() { + public List<@Valid FileDto> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid FileDto> files) { this.files = files; } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java index cd68bbba7344..db2b9566568e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java @@ -13,7 +13,9 @@ import org.springframework.format.annotation.DateTimeFormat; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -72,7 +74,7 @@ public FormatTestDto integer(@Nullable Integer integer) { * maximum: 100 * @return integer */ - + @Min(value = 10) @Max(value = 100) @JsonProperty("integer") public @Nullable Integer getInteger() { return integer; @@ -93,7 +95,7 @@ public FormatTestDto int32(@Nullable Integer int32) { * maximum: 200 * @return int32 */ - + @Min(value = 20) @Max(value = 200) @JsonProperty("int32") public @Nullable Integer getInt32() { return int32; @@ -133,7 +135,7 @@ public FormatTestDto number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull + @NotNull @Valid @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") @JsonProperty("number") public BigDecimal getNumber() { return number; @@ -154,7 +156,7 @@ public FormatTestDto _float(@Nullable Float _float) { * maximum: 987.6 * @return _float */ - + @DecimalMin(value = "54.3") @DecimalMax(value = "987.6") @JsonProperty("float") public @Nullable Float getFloat() { return _float; @@ -175,7 +177,7 @@ public FormatTestDto _double(@Nullable Double _double) { * maximum: 123.4 * @return _double */ - + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") @JsonProperty("double") public @Nullable Double getDouble() { return _double; @@ -194,7 +196,7 @@ public FormatTestDto string(@Nullable String string) { * Get string * @return string */ - + @Pattern(regexp = "/[a-z]/i") @JsonProperty("string") public @Nullable String getString() { return string; @@ -213,7 +215,7 @@ public FormatTestDto _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull + @NotNull @JsonProperty("byte") public byte[] getByte() { return _byte; @@ -232,7 +234,7 @@ public FormatTestDto binary(@Nullable org.springframework.core.io.Resource binar * Get binary * @return binary */ - + @Valid @JsonProperty("binary") public @Nullable org.springframework.core.io.Resource getBinary() { return binary; @@ -251,7 +253,7 @@ public FormatTestDto date(LocalDate date) { * Get date * @return date */ - @NotNull + @NotNull @Valid @JsonProperty("date") public LocalDate getDate() { return date; @@ -270,7 +272,7 @@ public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -289,7 +291,7 @@ public FormatTestDto uuid(@Nullable UUID uuid) { * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -308,7 +310,7 @@ public FormatTestDto password(String password) { * Get password * @return password */ - @NotNull + @NotNull @Size(min = 10, max = 64) @JsonProperty("password") public String getPassword() { return password; @@ -327,7 +329,7 @@ public FormatTestDto bigDecimal(@Nullable BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - + @Valid @JsonProperty("BigDecimal") public @Nullable BigDecimal getBigDecimal() { return bigDecimal; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java index ef734ab6b7a8..715f2ef99324 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java index f31e6ae2f1c0..c9d79f350c1f 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java index 89249c94a00d..bf926d282875 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java @@ -10,7 +10,9 @@ import java.util.Map; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -24,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { - + @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +64,13 @@ public static InnerEnum fromValue(String value) { } } - + @Valid private Map mapOfEnumString = new HashMap<>(); - + @Valid private Map directMap = new HashMap<>(); - + @Valid private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { @@ -88,7 +90,7 @@ public MapTestDto putMapMapOfStringItem(String key, Map mapMapOf * Get mapMapOfString * @return mapMapOfString */ - + @Valid @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { return mapMapOfString; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index ddc3438af111..33892a32fc68 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -13,7 +13,9 @@ import org.springframework.format.annotation.DateTimeFormat; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -32,7 +34,7 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - + @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { @@ -44,7 +46,7 @@ public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -63,7 +65,7 @@ public MixedPropertiesAndAdditionalPropertiesClassDto dateTime(@Nullable OffsetD * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -90,7 +92,7 @@ public MixedPropertiesAndAdditionalPropertiesClassDto putMapItem(String key, Ani * Get map * @return map */ - + @Valid @JsonProperty("map") public Map getMap() { return map; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java index 6a0139b2a140..97754b0366db 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java index 1baedfb4fd2d..7a21ca6b9fd1 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -42,7 +44,7 @@ public NameDto name(Integer name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public Integer getName() { return name; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index b2624478c8e2..8b3dde961179 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -9,7 +9,9 @@ import java.util.Map; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -23,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapPropertyDto { - + @Valid private @Nullable Map languageValues; public NullableMapPropertyDto languageValues(@Nullable Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java index dfb22e2991d0..7de1e1452a93 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -8,7 +8,9 @@ import java.math.BigDecimal; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -33,7 +35,7 @@ public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) { * Get justNumber * @return justNumber */ - + @Valid @JsonProperty("JustNumber") public @Nullable BigDecimal getJustNumber() { return justNumber; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java index f0ba8cc384c3..0a6f6a9183aa 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java @@ -10,7 +10,9 @@ import org.springframework.format.annotation.DateTimeFormat; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -140,7 +142,7 @@ public OrderDto shipDate(@Nullable OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - + @Valid @JsonProperty("shipDate") public @Nullable OffsetDateTime getShipDate() { return shipDate; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java index 0568eb7bbc0b..d46aa106f6de 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -8,7 +8,9 @@ import java.math.BigDecimal; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -37,7 +39,7 @@ public OuterCompositeDto myNumber(@Nullable BigDecimal myNumber) { * Get myNumber * @return myNumber */ - + @Valid @JsonProperty("my_number") public @Nullable BigDecimal getMyNumber() { return myNumber; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterEnumDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterEnumDto.java index eaadc46e8b9f..e1576471c02f 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterEnumDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterEnumDto.java @@ -4,7 +4,9 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java index 897fc576d514..cf7ede2907c9 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java index d1d62f9b3fb8..c067758e5b92 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java @@ -16,7 +16,9 @@ import org.springframework.lang.Nullable; import tools.jackson.databind.annotation.JsonDeserialize; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -36,11 +38,11 @@ public class PetDto { private String name; - + @Valid private Set photoUrls = new LinkedHashSet<>(); - - private List tags = new ArrayList<>(); + @Valid + private List<@Valid TagDto> tags = new ArrayList<>(); /** * pet status in the store @@ -114,7 +116,7 @@ public PetDto category(@Nullable CategoryDto category) { * Get category * @return category */ - + @Valid @JsonProperty("category") public @Nullable CategoryDto getCategory() { return category; @@ -133,7 +135,7 @@ public PetDto name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; @@ -160,7 +162,7 @@ public PetDto addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull + @NotNull @JsonProperty("photoUrls") public Set getPhotoUrls() { return photoUrls; @@ -171,7 +173,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public PetDto tags(List tags) { + public PetDto tags(List<@Valid TagDto> tags) { this.tags = tags; return this; } @@ -188,13 +190,13 @@ public PetDto addTagsItem(TagDto tagsItem) { * Get tags * @return tags */ - + @Valid @JsonProperty("tags") - public List getTags() { + public List<@Valid TagDto> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java index 475637f48d76..17f5c752e9c0 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java index 599fa788f084..37b0b58c9279 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java index 1a9b689772b6..55b1590fe4e9 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java index 87c559700414..8fc057c05381 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java index 7e5e2f0b6674..d74620dc2f1e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index c0bc6aa3099f..3b54f691af59 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -11,7 +11,9 @@ import java.util.List; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -33,7 +35,7 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - + @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { @@ -49,7 +51,7 @@ public TypeHolderDefaultDto stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull + @NotNull @JsonProperty("string_item") public String getStringItem() { return stringItem; @@ -68,7 +70,7 @@ public TypeHolderDefaultDto numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -87,7 +89,7 @@ public TypeHolderDefaultDto integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -106,7 +108,7 @@ public TypeHolderDefaultDto boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -133,7 +135,7 @@ public TypeHolderDefaultDto addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull + @NotNull @JsonProperty("array_item") public List getArrayItem() { return arrayItem; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index d40d47809e02..e55bd8955d23 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -11,7 +11,9 @@ import java.util.List; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -35,7 +37,7 @@ public class TypeHolderExampleDto { private Boolean boolItem; - + @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { @@ -51,7 +53,7 @@ public TypeHolderExampleDto stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull + @NotNull @JsonProperty("string_item") public String getStringItem() { return stringItem; @@ -70,7 +72,7 @@ public TypeHolderExampleDto numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -89,7 +91,7 @@ public TypeHolderExampleDto floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull + @NotNull @JsonProperty("float_item") public Float getFloatItem() { return floatItem; @@ -108,7 +110,7 @@ public TypeHolderExampleDto integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -127,7 +129,7 @@ public TypeHolderExampleDto boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -154,7 +156,7 @@ public TypeHolderExampleDto addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull + @NotNull @JsonProperty("array_item") public List getArrayItem() { return arrayItem; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java index 061d784ce310..12704c0fe29f 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java @@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java index 0bb19419f4e2..6c6edbdcac83 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java @@ -11,7 +11,9 @@ import java.util.List; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -33,7 +35,7 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - + @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -44,10 +46,10 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - + @Valid private List nameArray = new ArrayList<>(); - + @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -58,10 +60,10 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - + @Valid private List prefixArray = new ArrayList<>(); - + @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -72,10 +74,10 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - + @Valid private List namespaceArray = new ArrayList<>(); - + @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -86,10 +88,10 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - + @Valid private List prefixNsArray = new ArrayList<>(); - + @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { @@ -120,7 +122,7 @@ public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - + @Valid @JsonProperty("attribute_number") public @Nullable BigDecimal getAttributeNumber() { return attributeNumber; @@ -223,7 +225,7 @@ public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - + @Valid @JsonProperty("name_number") public @Nullable BigDecimal getNameNumber() { return nameNumber; @@ -353,7 +355,7 @@ public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - + @Valid @JsonProperty("prefix_number") public @Nullable BigDecimal getPrefixNumber() { return prefixNumber; @@ -483,7 +485,7 @@ public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - + @Valid @JsonProperty("namespace_number") public @Nullable BigDecimal getNamespaceNumber() { return namespaceNumber; @@ -613,7 +615,7 @@ public XmlItemDto prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - + @Valid @JsonProperty("prefix_ns_number") public @Nullable BigDecimal getPrefixNsNumber() { return prefixNsNumber; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java index 761042a4ea9b..0d99e8bb989f 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface AnotherFakeApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java index d226da16948e..0ba6705c9a87 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java @@ -28,6 +28,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 93610580c016..a9258bd241c1 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -17,6 +17,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeClassnameTags123Api { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java index dd7c3d5d2d09..cd922ae80bd5 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java @@ -21,6 +21,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface PetApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java index 4fbe17b28f5d..f4b23c4b0a74 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface StoreApi { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java index 453937b4130b..7eb72678a437 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java @@ -18,6 +18,7 @@ import jakarta.annotation.Generated; + @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface UserApi { From d4cccfefa96da728205e57345dc374ce7c7f499c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Metli=C4=8Dka?= Date: Thu, 5 Mar 2026 22:55:54 +0100 Subject: [PATCH 11/17] fix validation import --- bin/configs/spring-http-interface-springboot-4.yaml | 1 - .../libraries/spring-http-interface/pom-sb4.mustache | 6 ++++++ .../JavaSpring/libraries/spring-http-interface/pom.mustache | 6 ++++++ .../petstore/spring-http-interface-bean-validation/pom.xml | 4 ++++ .../spring-http-interface-reactive-bean-validation/pom.xml | 4 ++++ .../petstore/spring-http-interface-springboot-4/pom.xml | 4 ++++ 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/bin/configs/spring-http-interface-springboot-4.yaml b/bin/configs/spring-http-interface-springboot-4.yaml index 6bfd197f0f60..e9cee278abc9 100644 --- a/bin/configs/spring-http-interface-springboot-4.yaml +++ b/bin/configs/spring-http-interface-springboot-4.yaml @@ -13,7 +13,6 @@ additionalProperties: documentationProvider: "springdoc" # annotation provider should be ignored annotationLibrary: "swagger2" - # validation should be ignored useBeanValidation: "true" performBeanValidation: "true" useSpringBoot4: "true" diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache index e617a22895ac..215a634d064c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache @@ -98,6 +98,12 @@ true {{/lombok}} + {{#useBeanValidation}} + + org.springframework.boot + spring-boot-starter-validation + + {{/useBeanValidation}} org.springframework.boot spring-boot-starter-{{#reactive}}web{{/reactive}}{{^reactive}}rest{{/reactive}}client-test diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom.mustache index 7a131774517c..3f043bafe2ba 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom.mustache @@ -96,6 +96,12 @@ true {{/lombok}} + {{#useBeanValidation}} + + org.springframework.boot + spring-boot-starter-validation + + {{/useBeanValidation}} org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-bean-validation/pom.xml b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml index da42f71e5d16..70659c693ce6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/pom.xml +++ b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml @@ -67,6 +67,10 @@ jackson-databind-nullable 0.2.9 + + org.springframework.boot + spring-boot-starter-validation + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml index d1730827004b..e4f704fcbb5c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml @@ -67,6 +67,10 @@ jackson-databind-nullable 0.2.9 + + org.springframework.boot + spring-boot-starter-validation + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-springboot-4/pom.xml b/samples/client/petstore/spring-http-interface-springboot-4/pom.xml index a93c0ff47b6b..c056f32dd505 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/pom.xml +++ b/samples/client/petstore/spring-http-interface-springboot-4/pom.xml @@ -58,6 +58,10 @@ jakarta.validation jakarta.validation-api + + org.springframework.boot + spring-boot-starter-validation + org.springframework.boot spring-boot-starter-restclient-test From 8b25a3a61d34e599d078439d0dc8c70bf1d2c625 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Wed, 18 Mar 2026 13:08:44 +0100 Subject: [PATCH 12/17] regenerate samples after merge of master --- ...spring-http-interface-bean-validation.yaml | 1 + ...tp-interface-reactive-bean-validation.yaml | 2 +- .../README.md | 6 +- .../model/AdditionalPropertiesAnyTypeDto.java | 6 +- .../model/AdditionalPropertiesArrayDto.java | 6 +- .../model/AdditionalPropertiesBooleanDto.java | 6 +- .../model/AdditionalPropertiesClassDto.java | 15 +++- .../model/AdditionalPropertiesIntegerDto.java | 6 +- .../model/AdditionalPropertiesNumberDto.java | 6 +- .../model/AdditionalPropertiesObjectDto.java | 6 +- .../model/AdditionalPropertiesStringDto.java | 6 +- .../org/openapitools/model/AnimalDto.java | 7 +- .../openapitools/model/ApiResponseDto.java | 8 +- .../model/ArrayOfArrayOfNumberOnlyDto.java | 6 +- .../model/ArrayOfNumberOnlyDto.java | 6 +- .../org/openapitools/model/ArrayTestDto.java | 8 +- .../org/openapitools/model/BigCatDto.java | 6 +- .../openapitools/model/CapitalizationDto.java | 11 ++- .../java/org/openapitools/model/CatDto.java | 6 +- .../org/openapitools/model/CategoryDto.java | 7 +- .../model/ChildWithNullableDto.java | 6 +- .../org/openapitools/model/ClassModelDto.java | 6 +- .../org/openapitools/model/ClientDto.java | 6 +- .../model/ContainerDefaultValueDto.java | 7 +- .../java/org/openapitools/model/DogDto.java | 6 +- .../org/openapitools/model/EnumArraysDto.java | 7 +- .../org/openapitools/model/EnumTestDto.java | 10 ++- .../java/org/openapitools/model/FileDto.java | 6 +- .../model/FileSchemaTestClassDto.java | 7 +- .../org/openapitools/model/FormatTestDto.java | 19 +++- .../model/HasOnlyReadOnlyDto.java | 7 +- .../java/org/openapitools/model/ListDto.java | 6 +- .../org/openapitools/model/MapTestDto.java | 9 +- ...ertiesAndAdditionalPropertiesClassDto.java | 8 +- .../model/Model200ResponseDto.java | 7 +- .../java/org/openapitools/model/NameDto.java | 9 +- .../model/NullableMapPropertyDto.java | 5 +- .../org/openapitools/model/NumberOnlyDto.java | 6 +- .../java/org/openapitools/model/OrderDto.java | 11 ++- .../openapitools/model/OuterCompositeDto.java | 8 +- .../model/ParentWithNullableDto.java | 6 +- .../java/org/openapitools/model/PetDto.java | 13 +-- .../openapitools/model/ReadOnlyFirstDto.java | 7 +- ...ponseObjectWithDifferentFieldNamesDto.java | 9 +- .../org/openapitools/model/ReturnDto.java | 6 +- .../model/SpecialModelNameDto.java | 6 +- .../java/org/openapitools/model/TagDto.java | 7 +- .../model/TypeHolderDefaultDto.java | 10 ++- .../model/TypeHolderExampleDto.java | 11 ++- .../java/org/openapitools/model/UserDto.java | 13 ++- .../org/openapitools/model/XmlItemDto.java | 34 +++++++- .../README.md | 6 +- .../model/AdditionalPropertiesAnyType.java | 6 +- .../model/AdditionalPropertiesArray.java | 6 +- .../model/AdditionalPropertiesBoolean.java | 6 +- .../model/AdditionalPropertiesClass.java | 15 +++- .../model/AdditionalPropertiesInteger.java | 6 +- .../model/AdditionalPropertiesNumber.java | 6 +- .../model/AdditionalPropertiesObject.java | 6 +- .../model/AdditionalPropertiesString.java | 6 +- .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 6 +- .../openapitools/model/ArrayOfNumberOnly.java | 6 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 11 ++- .../main/java/org/openapitools/model/Cat.java | 6 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 6 +- .../org/openapitools/model/ClassModel.java | 6 +- .../java/org/openapitools/model/Client.java | 6 +- .../model/ContainerDefaultValue.java | 7 +- .../main/java/org/openapitools/model/Dog.java | 6 +- .../org/openapitools/model/EnumArrays.java | 7 +- .../java/org/openapitools/model/EnumTest.java | 10 ++- .../java/org/openapitools/model/File.java | 6 +- .../model/FileSchemaTestClass.java | 7 +- .../org/openapitools/model/FormatTest.java | 19 +++- .../openapitools/model/HasOnlyReadOnly.java | 7 +- .../java/org/openapitools/model/MapTest.java | 9 +- ...ropertiesAndAdditionalPropertiesClass.java | 8 +- .../openapitools/model/Model200Response.java | 7 +- .../openapitools/model/ModelApiResponse.java | 8 +- .../org/openapitools/model/ModelList.java | 6 +- .../org/openapitools/model/ModelReturn.java | 6 +- .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 5 +- .../org/openapitools/model/NumberOnly.java | 6 +- .../java/org/openapitools/model/Order.java | 11 ++- .../openapitools/model/OuterComposite.java | 8 +- .../model/ParentWithNullable.java | 6 +- .../main/java/org/openapitools/model/Pet.java | 13 +-- .../org/openapitools/model/ReadOnlyFirst.java | 7 +- ...ResponseObjectWithDifferentFieldNames.java | 9 +- .../openapitools/model/SpecialModelName.java | 6 +- .../main/java/org/openapitools/model/Tag.java | 7 +- .../openapitools/model/TypeHolderDefault.java | 10 ++- .../openapitools/model/TypeHolderExample.java | 11 ++- .../java/org/openapitools/model/User.java | 13 ++- .../java/org/openapitools/model/XmlItem.java | 34 +++++++- .../org/openapitools/model/ArrayTestDto.java | 24 +++--- .../model/FileSchemaTestClassDto.java | 18 ++-- .../java/org/openapitools/model/PetDto.java | 24 +++--- .../pom.xml | 4 + .../org/openapitools/api/AnotherFakeApi.java | 6 +- .../java/org/openapitools/api/FakeApi.java | 86 ++++++++++--------- .../api/FakeClassnameTags123Api.java | 6 +- .../java/org/openapitools/api/PetApi.java | 20 +++-- .../java/org/openapitools/api/StoreApi.java | 8 +- .../java/org/openapitools/api/UserApi.java | 16 ++-- .../model/AdditionalPropertiesAnyType.java | 4 +- .../model/AdditionalPropertiesArray.java | 4 +- .../model/AdditionalPropertiesBoolean.java | 4 +- .../model/AdditionalPropertiesClass.java | 30 ++++--- .../model/AdditionalPropertiesInteger.java | 4 +- .../model/AdditionalPropertiesNumber.java | 4 +- .../model/AdditionalPropertiesObject.java | 4 +- .../model/AdditionalPropertiesString.java | 4 +- .../java/org/openapitools/model/Animal.java | 6 +- .../model/ArrayOfArrayOfNumberOnly.java | 8 +- .../openapitools/model/ArrayOfNumberOnly.java | 8 +- .../org/openapitools/model/ArrayTest.java | 24 +++--- .../java/org/openapitools/model/BigCat.java | 4 +- .../openapitools/model/Capitalization.java | 4 +- .../main/java/org/openapitools/model/Cat.java | 4 +- .../java/org/openapitools/model/Category.java | 6 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 4 +- .../java/org/openapitools/model/Client.java | 4 +- .../model/ContainerDefaultValue.java | 16 ++-- .../main/java/org/openapitools/model/Dog.java | 4 +- .../org/openapitools/model/EnumArrays.java | 6 +- .../org/openapitools/model/EnumClass.java | 4 +- .../java/org/openapitools/model/EnumTest.java | 8 +- .../java/org/openapitools/model/File.java | 4 +- .../model/FileSchemaTestClass.java | 18 ++-- .../org/openapitools/model/FormatTest.java | 30 ++++--- .../openapitools/model/HasOnlyReadOnly.java | 4 +- .../java/org/openapitools/model/MapTest.java | 14 +-- ...ropertiesAndAdditionalPropertiesClass.java | 12 +-- .../openapitools/model/Model200Response.java | 4 +- .../openapitools/model/ModelApiResponse.java | 4 +- .../org/openapitools/model/ModelList.java | 4 +- .../org/openapitools/model/ModelReturn.java | 4 +- .../java/org/openapitools/model/Name.java | 6 +- .../model/NullableMapProperty.java | 6 +- .../org/openapitools/model/NumberOnly.java | 6 +- .../java/org/openapitools/model/Order.java | 6 +- .../openapitools/model/OuterComposite.java | 6 +- .../org/openapitools/model/OuterEnum.java | 4 +- .../model/ParentWithNullable.java | 4 +- .../main/java/org/openapitools/model/Pet.java | 24 +++--- .../org/openapitools/model/ReadOnlyFirst.java | 4 +- ...ResponseObjectWithDifferentFieldNames.java | 4 +- .../openapitools/model/SpecialModelName.java | 4 +- .../main/java/org/openapitools/model/Tag.java | 4 +- .../openapitools/model/TypeHolderDefault.java | 16 ++-- .../openapitools/model/TypeHolderExample.java | 18 ++-- .../java/org/openapitools/model/User.java | 4 +- .../java/org/openapitools/model/XmlItem.java | 32 +++---- 160 files changed, 804 insertions(+), 641 deletions(-) diff --git a/bin/configs/spring-http-interface-bean-validation.yaml b/bin/configs/spring-http-interface-bean-validation.yaml index 2385ff974479..9d3aca960b59 100644 --- a/bin/configs/spring-http-interface-bean-validation.yaml +++ b/bin/configs/spring-http-interface-bean-validation.yaml @@ -15,3 +15,4 @@ additionalProperties: documentationProvider: "springdoc" # annotation provider should be ignored annotationLibrary: "swagger2" + useSpringBoot3: "true" \ No newline at end of file diff --git a/bin/configs/spring-http-interface-reactive-bean-validation.yaml b/bin/configs/spring-http-interface-reactive-bean-validation.yaml index 45b2ced1d097..6040068f931b 100644 --- a/bin/configs/spring-http-interface-reactive-bean-validation.yaml +++ b/bin/configs/spring-http-interface-reactive-bean-validation.yaml @@ -14,4 +14,4 @@ additionalProperties: documentationProvider: "springfox" # annotation provider should be ignored annotationLibrary: "swagger1" - + useSpringBoot3: "true" diff --git a/samples/client/petstore/spring-http-interface-bean-validation/README.md b/samples/client/petstore/spring-http-interface-bean-validation/README.md index 3f489eac9b72..c80e3e2424cb 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/README.md +++ b/samples/client/petstore/spring-http-interface-bean-validation/README.md @@ -1,6 +1,6 @@ # OpenAPI generated API stub -[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface) +[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface) ## Overview @@ -14,8 +14,8 @@ To use auto-generated interfaces you have to create your own configuration which @Configuration public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { - public MyConfiguration(RestClient client) { - super(client); + public MyConfiguration(RestClient myRestClient) { // separately created RestClient instance + super(myRestClient); } } ``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java index 7e0c32972b7c..2e115a8a294c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -44,6 +44,7 @@ public AdditionalPropertiesAnyTypeDto name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -119,10 +120,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java index 0f02e204e209..e1a96002c31b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -45,6 +45,7 @@ public AdditionalPropertiesArrayDto name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -120,10 +121,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java index b92a64c6e06f..0b68f0ee1249 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -44,6 +44,7 @@ public AdditionalPropertiesBooleanDto name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -119,10 +120,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 373ca3bda19d..1bb37b8ce0d6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -83,6 +83,7 @@ public Map getMapString() { return mapString; } + @JsonProperty("map_string") public void setMapString(Map mapString) { this.mapString = mapString; } @@ -110,6 +111,7 @@ public Map getMapNumber() { return mapNumber; } + @JsonProperty("map_number") public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -137,6 +139,7 @@ public Map getMapInteger() { return mapInteger; } + @JsonProperty("map_integer") public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -164,6 +167,7 @@ public Map getMapBoolean() { return mapBoolean; } + @JsonProperty("map_boolean") public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -191,6 +195,7 @@ public Map> getMapArrayInteger() { return mapArrayInteger; } + @JsonProperty("map_array_integer") public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -218,6 +223,7 @@ public Map> getMapArrayAnytype() { return mapArrayAnytype; } + @JsonProperty("map_array_anytype") public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -245,6 +251,7 @@ public Map> getMapMapString() { return mapMapString; } + @JsonProperty("map_map_string") public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -272,6 +279,7 @@ public Map> getMapMapAnytype() { return mapMapAnytype; } + @JsonProperty("map_map_anytype") public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -291,6 +299,7 @@ public AdditionalPropertiesClassDto anytype1(@Nullable Object anytype1) { return anytype1; } + @JsonProperty("anytype_1") public void setAnytype1(@Nullable Object anytype1) { this.anytype1 = anytype1; } @@ -329,6 +338,7 @@ public AdditionalPropertiesClassDto anytype3(@Nullable Object anytype3) { return anytype3; } + @JsonProperty("anytype_3") public void setAnytype3(@Nullable Object anytype3) { this.anytype3 = anytype3; } @@ -395,10 +405,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java index 95efbc8ed233..1ef42f5c27ab 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -44,6 +44,7 @@ public AdditionalPropertiesIntegerDto name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -119,10 +120,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java index 9dcf2c570eb0..9e8ca065e26e 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -45,6 +45,7 @@ public AdditionalPropertiesNumberDto name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -120,10 +121,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java index fadc0fcd7969..e21cd7e2c8ac 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -45,6 +45,7 @@ public AdditionalPropertiesObjectDto name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -120,10 +121,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java index e6b6e5d0cdc8..af1bae8e48d9 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -44,6 +44,7 @@ public AdditionalPropertiesStringDto name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -119,10 +120,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java index eabf65e8ba43..6baf9f4a9bed 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java @@ -59,6 +59,7 @@ public String getClassName() { return className; } + @JsonProperty("className") public void setClassName(String className) { this.className = className; } @@ -78,6 +79,7 @@ public String getColor() { return color; } + @JsonProperty("color") public void setColor(String color) { this.color = color; } @@ -115,10 +117,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java index a6416a603db6..0a816d72ff5f 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -44,6 +44,7 @@ public ApiResponseDto code(@Nullable Integer code) { return code; } + @JsonProperty("code") public void setCode(@Nullable Integer code) { this.code = code; } @@ -63,6 +64,7 @@ public ApiResponseDto type(@Nullable String type) { return type; } + @JsonProperty("type") public void setType(@Nullable String type) { this.type = type; } @@ -82,6 +84,7 @@ public ApiResponseDto message(@Nullable String message) { return message; } + @JsonProperty("message") public void setMessage(@Nullable String message) { this.message = message; } @@ -121,10 +124,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index ff8f865f060b..65bba6dae4b8 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -53,6 +53,7 @@ public List> getArrayArrayNumber() { return arrayArrayNumber; } + @JsonProperty("ArrayArrayNumber") public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } @@ -88,10 +89,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index 9c46b3f2d2a4..17b7905a72d8 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -53,6 +53,7 @@ public List getArrayNumber() { return arrayNumber; } + @JsonProperty("ArrayNumber") public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } @@ -88,10 +89,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java index 182b1ef715d1..7ab609f9d5b2 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -59,6 +59,7 @@ public List getArrayOfString() { return arrayOfString; } + @JsonProperty("array_of_string") public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -86,6 +87,7 @@ public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } + @JsonProperty("array_array_of_integer") public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -113,6 +115,7 @@ public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> array return arrayArrayOfModel; } + @JsonProperty("array_array_of_model") public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -152,10 +155,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java index 8508cb1368bb..5045b54ff31a 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java @@ -89,6 +89,7 @@ public BigCatDto kind(@Nullable KindEnum kind) { return kind; } + @JsonProperty("kind") public void setKind(@Nullable KindEnum kind) { this.kind = kind; } @@ -141,10 +142,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java index 0731d6c88fd8..fa80211ff442 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -50,6 +50,7 @@ public CapitalizationDto smallCamel(@Nullable String smallCamel) { return smallCamel; } + @JsonProperty("smallCamel") public void setSmallCamel(@Nullable String smallCamel) { this.smallCamel = smallCamel; } @@ -69,6 +70,7 @@ public CapitalizationDto capitalCamel(@Nullable String capitalCamel) { return capitalCamel; } + @JsonProperty("CapitalCamel") public void setCapitalCamel(@Nullable String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -88,6 +90,7 @@ public CapitalizationDto smallSnake(@Nullable String smallSnake) { return smallSnake; } + @JsonProperty("small_Snake") public void setSmallSnake(@Nullable String smallSnake) { this.smallSnake = smallSnake; } @@ -107,6 +110,7 @@ public CapitalizationDto capitalSnake(@Nullable String capitalSnake) { return capitalSnake; } + @JsonProperty("Capital_Snake") public void setCapitalSnake(@Nullable String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -126,6 +130,7 @@ public CapitalizationDto scAETHFlowPoints(@Nullable String scAETHFlowPoints) { return scAETHFlowPoints; } + @JsonProperty("SCA_ETH_Flow_Points") public void setScAETHFlowPoints(@Nullable String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -145,6 +150,7 @@ public CapitalizationDto ATT_NAME(@Nullable String ATT_NAME) { return ATT_NAME; } + @JsonProperty("ATT_NAME") public void setATTNAME(@Nullable String ATT_NAME) { this.ATT_NAME = ATT_NAME; } @@ -190,10 +196,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java index e93bc2217e97..0bc8d14312ad 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java @@ -56,6 +56,7 @@ public CatDto declawed(@Nullable Boolean declawed) { return declawed; } + @JsonProperty("declawed") public void setDeclawed(@Nullable Boolean declawed) { this.declawed = declawed; } @@ -103,10 +104,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java index 9372a8e0282b..b7594166b6e7 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java @@ -46,6 +46,7 @@ public CategoryDto id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -65,6 +66,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } @@ -102,10 +104,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java index dc41e0c460e6..3e5c95201fba 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -48,6 +48,7 @@ public ChildWithNullableDto otherProperty(@Nullable String otherProperty) { return otherProperty; } + @JsonProperty("otherProperty") public void setOtherProperty(@Nullable String otherProperty) { this.otherProperty = otherProperty; } @@ -106,10 +107,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java index 6c39c7bad4ce..1b6230e42fde 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.java @@ -40,6 +40,7 @@ public ClassModelDto propertyClass(@Nullable String propertyClass) { return propertyClass; } + @JsonProperty("_class") public void setPropertyClass(@Nullable String propertyClass) { this.propertyClass = propertyClass; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java index 11e1af1fef5c..bd240165e654 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.java @@ -40,6 +40,7 @@ public ClientDto client(@Nullable String client) { return client; } + @JsonProperty("client") public void setClient(@Nullable String client) { this.client = client; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index e80243fc8510..b0ed0b431015 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -94,6 +94,7 @@ public JsonNullable> getNullableRequiredArray() { return nullableRequiredArray; } + @JsonProperty("nullable_required_array") public void setNullableRequiredArray(JsonNullable> nullableRequiredArray) { this.nullableRequiredArray = nullableRequiredArray; } @@ -121,6 +122,7 @@ public List getRequiredArray() { return requiredArray; } + @JsonProperty("required_array") public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } @@ -200,10 +202,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java index 2b730cc5484b..6c87bece5a7a 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java @@ -49,6 +49,7 @@ public DogDto breed(@Nullable String breed) { return breed; } + @JsonProperty("breed") public void setBreed(@Nullable String breed) { this.breed = breed; } @@ -96,10 +97,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java index f936acb137a3..a17c392bf06a 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -117,6 +117,7 @@ public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { return justSymbol; } + @JsonProperty("just_symbol") public void setJustSymbol(@Nullable JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -144,6 +145,7 @@ public List getArrayEnum() { return arrayEnum; } + @JsonProperty("array_enum") public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } @@ -181,10 +183,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java index 804a1ee8085d..0b8e88fb04a2 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java @@ -198,6 +198,7 @@ public EnumTestDto enumString(@Nullable EnumStringEnum enumString) { return enumString; } + @JsonProperty("enum_string") public void setEnumString(@Nullable EnumStringEnum enumString) { this.enumString = enumString; } @@ -217,6 +218,7 @@ public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } + @JsonProperty("enum_string_required") public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -236,6 +238,7 @@ public EnumTestDto enumInteger(@Nullable EnumIntegerEnum enumInteger) { return enumInteger; } + @JsonProperty("enum_integer") public void setEnumInteger(@Nullable EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -255,6 +258,7 @@ public EnumTestDto enumNumber(@Nullable EnumNumberEnum enumNumber) { return enumNumber; } + @JsonProperty("enum_number") public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -274,6 +278,7 @@ public EnumTestDto outerEnum(@Nullable OuterEnumDto outerEnum) { return outerEnum; } + @JsonProperty("outerEnum") public void setOuterEnum(@Nullable OuterEnumDto outerEnum) { this.outerEnum = outerEnum; } @@ -317,10 +322,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java index df8d2d72455c..a10a4e17202c 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.java @@ -40,6 +40,7 @@ public FileDto sourceURI(@Nullable String sourceURI) { return sourceURI; } + @JsonProperty("sourceURI") public void setSourceURI(@Nullable String sourceURI) { this.sourceURI = sourceURI; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index 3ba111922984..8dacb47b7983 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -47,6 +47,7 @@ public FileSchemaTestClassDto file(@Nullable FileDto file) { return file; } + @JsonProperty("file") public void setFile(@Nullable FileDto file) { this.file = file; } @@ -74,6 +75,7 @@ public FileSchemaTestClassDto addFilesItem(FileDto filesItem) { return files; } + @JsonProperty("files") public void setFiles(List<@Valid FileDto> files) { this.files = files; } @@ -111,10 +113,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java index 1346c978199c..ae14eabdfc48 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java @@ -80,6 +80,7 @@ public FormatTestDto integer(@Nullable Integer integer) { return integer; } + @JsonProperty("integer") public void setInteger(@Nullable Integer integer) { this.integer = integer; } @@ -101,6 +102,7 @@ public FormatTestDto int32(@Nullable Integer int32) { return int32; } + @JsonProperty("int32") public void setInt32(@Nullable Integer int32) { this.int32 = int32; } @@ -120,6 +122,7 @@ public FormatTestDto int64(@Nullable Long int64) { return int64; } + @JsonProperty("int64") public void setInt64(@Nullable Long int64) { this.int64 = int64; } @@ -141,6 +144,7 @@ public BigDecimal getNumber() { return number; } + @JsonProperty("number") public void setNumber(BigDecimal number) { this.number = number; } @@ -162,6 +166,7 @@ public FormatTestDto _float(@Nullable Float _float) { return _float; } + @JsonProperty("float") public void setFloat(@Nullable Float _float) { this._float = _float; } @@ -183,6 +188,7 @@ public FormatTestDto _double(@Nullable Double _double) { return _double; } + @JsonProperty("double") public void setDouble(@Nullable Double _double) { this._double = _double; } @@ -202,6 +208,7 @@ public FormatTestDto string(@Nullable String string) { return string; } + @JsonProperty("string") public void setString(@Nullable String string) { this.string = string; } @@ -221,6 +228,7 @@ public byte[] getByte() { return _byte; } + @JsonProperty("byte") public void setByte(byte[] _byte) { this._byte = _byte; } @@ -240,6 +248,7 @@ public FormatTestDto binary(@Nullable org.springframework.core.io.Resource binar return binary; } + @JsonProperty("binary") public void setBinary(@Nullable org.springframework.core.io.Resource binary) { this.binary = binary; } @@ -259,6 +268,7 @@ public LocalDate getDate() { return date; } + @JsonProperty("date") public void setDate(LocalDate date) { this.date = date; } @@ -278,6 +288,7 @@ public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) { return dateTime; } + @JsonProperty("dateTime") public void setDateTime(@Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -297,6 +308,7 @@ public FormatTestDto uuid(@Nullable UUID uuid) { return uuid; } + @JsonProperty("uuid") public void setUuid(@Nullable UUID uuid) { this.uuid = uuid; } @@ -316,6 +328,7 @@ public String getPassword() { return password; } + @JsonProperty("password") public void setPassword(String password) { this.password = password; } @@ -335,6 +348,7 @@ public FormatTestDto bigDecimal(@Nullable BigDecimal bigDecimal) { return bigDecimal; } + @JsonProperty("BigDecimal") public void setBigDecimal(@Nullable BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } @@ -396,10 +410,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java index 500d2cf3e3bf..33acd6c509a9 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -42,6 +42,7 @@ public HasOnlyReadOnlyDto bar(@Nullable String bar) { return bar; } + @JsonProperty("bar") public void setBar(@Nullable String bar) { this.bar = bar; } @@ -61,6 +62,7 @@ public HasOnlyReadOnlyDto foo(@Nullable String foo) { return foo; } + @JsonProperty("foo") public void setFoo(@Nullable String foo) { this.foo = foo; } @@ -98,10 +100,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java index 4346edb85bc7..ed822fe74463 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.java @@ -40,6 +40,7 @@ public ListDto _123list(@Nullable String _123list) { return _123list; } + @JsonProperty("123-list") public void set123list(@Nullable String _123list) { this._123list = _123list; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java index 5f226c154f66..ae5f9e49463e 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java @@ -96,6 +96,7 @@ public Map> getMapMapOfString() { return mapMapOfString; } + @JsonProperty("map_map_of_string") public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -123,6 +124,7 @@ public Map getMapOfEnumString() { return mapOfEnumString; } + @JsonProperty("map_of_enum_string") public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -150,6 +152,7 @@ public Map getDirectMap() { return directMap; } + @JsonProperty("direct_map") public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -177,6 +180,7 @@ public Map getIndirectMap() { return indirectMap; } + @JsonProperty("indirect_map") public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } @@ -218,10 +222,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index c789b28301be..d0a312f0ee30 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -52,6 +52,7 @@ public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) return uuid; } + @JsonProperty("uuid") public void setUuid(@Nullable UUID uuid) { this.uuid = uuid; } @@ -71,6 +72,7 @@ public MixedPropertiesAndAdditionalPropertiesClassDto dateTime(@Nullable OffsetD return dateTime; } + @JsonProperty("dateTime") public void setDateTime(@Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -98,6 +100,7 @@ public Map getMap() { return map; } + @JsonProperty("map") public void setMap(Map map) { this.map = map; } @@ -137,10 +140,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java index 0065969a11e1..61652ddc1779 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -42,6 +42,7 @@ public Model200ResponseDto name(@Nullable Integer name) { return name; } + @JsonProperty("name") public void setName(@Nullable Integer name) { this.name = name; } @@ -61,6 +62,7 @@ public Model200ResponseDto propertyClass(@Nullable String propertyClass) { return propertyClass; } + @JsonProperty("class") public void setPropertyClass(@Nullable String propertyClass) { this.propertyClass = propertyClass; } @@ -98,10 +100,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java index 84eb192431ec..6390c9183250 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java @@ -50,6 +50,7 @@ public Integer getName() { return name; } + @JsonProperty("name") public void setName(Integer name) { this.name = name; } @@ -69,6 +70,7 @@ public NameDto snakeCase(@Nullable Integer snakeCase) { return snakeCase; } + @JsonProperty("snake_case") public void setSnakeCase(@Nullable Integer snakeCase) { this.snakeCase = snakeCase; } @@ -88,6 +90,7 @@ public NameDto property(@Nullable String property) { return property; } + @JsonProperty("property") public void setProperty(@Nullable String property) { this.property = property; } @@ -107,6 +110,7 @@ public NameDto _123number(@Nullable Integer _123number) { return _123number; } + @JsonProperty("123Number") public void set123number(@Nullable Integer _123number) { this._123number = _123number; } @@ -148,10 +152,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 730b5e0cbb64..8ec0fb4e8482 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -100,10 +100,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java index be0e2f73dad9..c95b83c16056 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -41,6 +41,7 @@ public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) { return justNumber; } + @JsonProperty("JustNumber") public void setJustNumber(@Nullable BigDecimal justNumber) { this.justNumber = justNumber; } @@ -76,10 +77,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java index ffbbabc29281..e05560eb2e42 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java @@ -91,6 +91,7 @@ public OrderDto id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -110,6 +111,7 @@ public OrderDto petId(@Nullable Long petId) { return petId; } + @JsonProperty("petId") public void setPetId(@Nullable Long petId) { this.petId = petId; } @@ -129,6 +131,7 @@ public OrderDto quantity(@Nullable Integer quantity) { return quantity; } + @JsonProperty("quantity") public void setQuantity(@Nullable Integer quantity) { this.quantity = quantity; } @@ -148,6 +151,7 @@ public OrderDto shipDate(@Nullable OffsetDateTime shipDate) { return shipDate; } + @JsonProperty("shipDate") public void setShipDate(@Nullable OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -167,6 +171,7 @@ public OrderDto status(@Nullable StatusEnum status) { return status; } + @JsonProperty("status") public void setStatus(@Nullable StatusEnum status) { this.status = status; } @@ -186,6 +191,7 @@ public Boolean getComplete() { return complete; } + @JsonProperty("complete") public void setComplete(Boolean complete) { this.complete = complete; } @@ -231,10 +237,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java index ceccde71734e..e237288a4f2a 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -45,6 +45,7 @@ public OuterCompositeDto myNumber(@Nullable BigDecimal myNumber) { return myNumber; } + @JsonProperty("my_number") public void setMyNumber(@Nullable BigDecimal myNumber) { this.myNumber = myNumber; } @@ -64,6 +65,7 @@ public OuterCompositeDto myString(@Nullable String myString) { return myString; } + @JsonProperty("my_string") public void setMyString(@Nullable String myString) { this.myString = myString; } @@ -83,6 +85,7 @@ public OuterCompositeDto myBoolean(@Nullable Boolean myBoolean) { return myBoolean; } + @JsonProperty("my_boolean") public void setMyBoolean(@Nullable Boolean myBoolean) { this.myBoolean = myBoolean; } @@ -122,10 +125,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java index f2d47de277a7..f2dab67e5ffd 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -90,6 +90,7 @@ public ParentWithNullableDto type(@Nullable TypeEnum type) { return type; } + @JsonProperty("type") public void setType(@Nullable TypeEnum type) { this.type = type; } @@ -157,10 +158,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java index a0306ab3c8f9..e11364245746 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java @@ -103,6 +103,7 @@ public PetDto id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -122,6 +123,7 @@ public PetDto category(@Nullable CategoryDto category) { return category; } + @JsonProperty("category") public void setCategory(@Nullable CategoryDto category) { this.category = category; } @@ -141,6 +143,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } @@ -169,6 +172,7 @@ public Set getPhotoUrls() { } @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty("photoUrls") public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } @@ -196,6 +200,7 @@ public PetDto addTagsItem(TagDto tagsItem) { return tags; } + @JsonProperty("tags") public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } @@ -211,8 +216,8 @@ public PetDto status(@Nullable StatusEnum status) { * @deprecated */ - @JsonProperty("status") @Deprecated + @JsonProperty("status") public @Nullable StatusEnum getStatus() { return status; } @@ -221,6 +226,7 @@ public PetDto status(@Nullable StatusEnum status) { * @deprecated */ @Deprecated + @JsonProperty("status") public void setStatus(@Nullable StatusEnum status) { this.status = status; } @@ -266,10 +272,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java index 136b49624fa1..76125a908f23 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -42,6 +42,7 @@ public ReadOnlyFirstDto bar(@Nullable String bar) { return bar; } + @JsonProperty("bar") public void setBar(@Nullable String bar) { this.bar = bar; } @@ -61,6 +62,7 @@ public ReadOnlyFirstDto baz(@Nullable String baz) { return baz; } + @JsonProperty("baz") public void setBaz(@Nullable String baz) { this.baz = baz; } @@ -98,10 +100,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java index 73ac52022a98..0c8839d1b9f7 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -46,6 +46,7 @@ public ResponseObjectWithDifferentFieldNamesDto normalPropertyName(@Nullable Str return normalPropertyName; } + @JsonProperty("normalPropertyName") public void setNormalPropertyName(@Nullable String normalPropertyName) { this.normalPropertyName = normalPropertyName; } @@ -65,6 +66,7 @@ public ResponseObjectWithDifferentFieldNamesDto UPPER_CASE_PROPERTY_SNAKE(@Nulla return UPPER_CASE_PROPERTY_SNAKE; } + @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public void setUPPERCASEPROPERTYSNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; } @@ -84,6 +86,7 @@ public ResponseObjectWithDifferentFieldNamesDto lowerCasePropertyDashes(@Nullabl return lowerCasePropertyDashes; } + @JsonProperty("lower-case-property-dashes") public void setLowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { this.lowerCasePropertyDashes = lowerCasePropertyDashes; } @@ -103,6 +106,7 @@ public ResponseObjectWithDifferentFieldNamesDto propertyNameWithSpaces(@Nullable return propertyNameWithSpaces; } + @JsonProperty("property name with spaces") public void setPropertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { this.propertyNameWithSpaces = propertyNameWithSpaces; } @@ -144,10 +148,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java index 64bb5d0cc9a3..592216116a7a 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.java @@ -40,6 +40,7 @@ public ReturnDto _return(@Nullable Integer _return) { return _return; } + @JsonProperty("return") public void setReturn(@Nullable Integer _return) { this._return = _return; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java index 478782acef00..d21d23980c4e 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -40,6 +40,7 @@ public class SpecialModelNameDto { return $specialPropertyName; } + @JsonProperty("$special[property.name]") public void set$SpecialPropertyName(@Nullable Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java index 80e4e299da4b..383eaad703b4 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TagDto.java @@ -42,6 +42,7 @@ public TagDto id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -61,6 +62,7 @@ public TagDto name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -98,10 +100,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 516a41ef1efb..6d32f5d0c97b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -57,6 +57,7 @@ public String getStringItem() { return stringItem; } + @JsonProperty("string_item") public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -76,6 +77,7 @@ public BigDecimal getNumberItem() { return numberItem; } + @JsonProperty("number_item") public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -95,6 +97,7 @@ public Integer getIntegerItem() { return integerItem; } + @JsonProperty("integer_item") public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -114,6 +117,7 @@ public Boolean getBoolItem() { return boolItem; } + @JsonProperty("bool_item") public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -141,6 +145,7 @@ public List getArrayItem() { return arrayItem; } + @JsonProperty("array_item") public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } @@ -184,10 +189,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index a5a07b71e168..e8033ec7e6c6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -59,6 +59,7 @@ public String getStringItem() { return stringItem; } + @JsonProperty("string_item") public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -78,6 +79,7 @@ public BigDecimal getNumberItem() { return numberItem; } + @JsonProperty("number_item") public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -97,6 +99,7 @@ public Float getFloatItem() { return floatItem; } + @JsonProperty("float_item") public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -116,6 +119,7 @@ public Integer getIntegerItem() { return integerItem; } + @JsonProperty("integer_item") public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -135,6 +139,7 @@ public Boolean getBoolItem() { return boolItem; } + @JsonProperty("bool_item") public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -162,6 +167,7 @@ public List getArrayItem() { return arrayItem; } + @JsonProperty("array_item") public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } @@ -207,10 +213,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java index a8fa36598a74..b64986a66c0a 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java @@ -54,6 +54,7 @@ public UserDto id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -73,6 +74,7 @@ public UserDto username(@Nullable String username) { return username; } + @JsonProperty("username") public void setUsername(@Nullable String username) { this.username = username; } @@ -92,6 +94,7 @@ public UserDto firstName(@Nullable String firstName) { return firstName; } + @JsonProperty("firstName") public void setFirstName(@Nullable String firstName) { this.firstName = firstName; } @@ -111,6 +114,7 @@ public UserDto lastName(@Nullable String lastName) { return lastName; } + @JsonProperty("lastName") public void setLastName(@Nullable String lastName) { this.lastName = lastName; } @@ -130,6 +134,7 @@ public UserDto email(@Nullable String email) { return email; } + @JsonProperty("email") public void setEmail(@Nullable String email) { this.email = email; } @@ -149,6 +154,7 @@ public UserDto password(@Nullable String password) { return password; } + @JsonProperty("password") public void setPassword(@Nullable String password) { this.password = password; } @@ -168,6 +174,7 @@ public UserDto phone(@Nullable String phone) { return phone; } + @JsonProperty("phone") public void setPhone(@Nullable String phone) { this.phone = phone; } @@ -187,6 +194,7 @@ public UserDto userStatus(@Nullable Integer userStatus) { return userStatus; } + @JsonProperty("userStatus") public void setUserStatus(@Nullable Integer userStatus) { this.userStatus = userStatus; } @@ -236,10 +244,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java index 087af1c3aa20..513e6c363b6d 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java @@ -109,6 +109,7 @@ public XmlItemDto attributeString(@Nullable String attributeString) { return attributeString; } + @JsonProperty("attribute_string") public void setAttributeString(@Nullable String attributeString) { this.attributeString = attributeString; } @@ -128,6 +129,7 @@ public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) { return attributeNumber; } + @JsonProperty("attribute_number") public void setAttributeNumber(@Nullable BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -147,6 +149,7 @@ public XmlItemDto attributeInteger(@Nullable Integer attributeInteger) { return attributeInteger; } + @JsonProperty("attribute_integer") public void setAttributeInteger(@Nullable Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -166,6 +169,7 @@ public XmlItemDto attributeBoolean(@Nullable Boolean attributeBoolean) { return attributeBoolean; } + @JsonProperty("attribute_boolean") public void setAttributeBoolean(@Nullable Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -193,6 +197,7 @@ public List getWrappedArray() { return wrappedArray; } + @JsonProperty("wrapped_array") public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -212,6 +217,7 @@ public XmlItemDto nameString(@Nullable String nameString) { return nameString; } + @JsonProperty("name_string") public void setNameString(@Nullable String nameString) { this.nameString = nameString; } @@ -231,6 +237,7 @@ public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) { return nameNumber; } + @JsonProperty("name_number") public void setNameNumber(@Nullable BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -250,6 +257,7 @@ public XmlItemDto nameInteger(@Nullable Integer nameInteger) { return nameInteger; } + @JsonProperty("name_integer") public void setNameInteger(@Nullable Integer nameInteger) { this.nameInteger = nameInteger; } @@ -269,6 +277,7 @@ public XmlItemDto nameBoolean(@Nullable Boolean nameBoolean) { return nameBoolean; } + @JsonProperty("name_boolean") public void setNameBoolean(@Nullable Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -296,6 +305,7 @@ public List getNameArray() { return nameArray; } + @JsonProperty("name_array") public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -323,6 +333,7 @@ public List getNameWrappedArray() { return nameWrappedArray; } + @JsonProperty("name_wrapped_array") public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -342,6 +353,7 @@ public XmlItemDto prefixString(@Nullable String prefixString) { return prefixString; } + @JsonProperty("prefix_string") public void setPrefixString(@Nullable String prefixString) { this.prefixString = prefixString; } @@ -361,6 +373,7 @@ public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) { return prefixNumber; } + @JsonProperty("prefix_number") public void setPrefixNumber(@Nullable BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -380,6 +393,7 @@ public XmlItemDto prefixInteger(@Nullable Integer prefixInteger) { return prefixInteger; } + @JsonProperty("prefix_integer") public void setPrefixInteger(@Nullable Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -399,6 +413,7 @@ public XmlItemDto prefixBoolean(@Nullable Boolean prefixBoolean) { return prefixBoolean; } + @JsonProperty("prefix_boolean") public void setPrefixBoolean(@Nullable Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -426,6 +441,7 @@ public List getPrefixArray() { return prefixArray; } + @JsonProperty("prefix_array") public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -453,6 +469,7 @@ public List getPrefixWrappedArray() { return prefixWrappedArray; } + @JsonProperty("prefix_wrapped_array") public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -472,6 +489,7 @@ public XmlItemDto namespaceString(@Nullable String namespaceString) { return namespaceString; } + @JsonProperty("namespace_string") public void setNamespaceString(@Nullable String namespaceString) { this.namespaceString = namespaceString; } @@ -491,6 +509,7 @@ public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) { return namespaceNumber; } + @JsonProperty("namespace_number") public void setNamespaceNumber(@Nullable BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -510,6 +529,7 @@ public XmlItemDto namespaceInteger(@Nullable Integer namespaceInteger) { return namespaceInteger; } + @JsonProperty("namespace_integer") public void setNamespaceInteger(@Nullable Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -529,6 +549,7 @@ public XmlItemDto namespaceBoolean(@Nullable Boolean namespaceBoolean) { return namespaceBoolean; } + @JsonProperty("namespace_boolean") public void setNamespaceBoolean(@Nullable Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -556,6 +577,7 @@ public List getNamespaceArray() { return namespaceArray; } + @JsonProperty("namespace_array") public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -583,6 +605,7 @@ public List getNamespaceWrappedArray() { return namespaceWrappedArray; } + @JsonProperty("namespace_wrapped_array") public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -602,6 +625,7 @@ public XmlItemDto prefixNsString(@Nullable String prefixNsString) { return prefixNsString; } + @JsonProperty("prefix_ns_string") public void setPrefixNsString(@Nullable String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -621,6 +645,7 @@ public XmlItemDto prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { return prefixNsNumber; } + @JsonProperty("prefix_ns_number") public void setPrefixNsNumber(@Nullable BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -640,6 +665,7 @@ public XmlItemDto prefixNsInteger(@Nullable Integer prefixNsInteger) { return prefixNsInteger; } + @JsonProperty("prefix_ns_integer") public void setPrefixNsInteger(@Nullable Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -659,6 +685,7 @@ public XmlItemDto prefixNsBoolean(@Nullable Boolean prefixNsBoolean) { return prefixNsBoolean; } + @JsonProperty("prefix_ns_boolean") public void setPrefixNsBoolean(@Nullable Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -686,6 +713,7 @@ public List getPrefixNsArray() { return prefixNsArray; } + @JsonProperty("prefix_ns_array") public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -713,6 +741,7 @@ public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } + @JsonProperty("prefix_ns_wrapped_array") public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } @@ -804,10 +833,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md b/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md index 64b2b038df20..a356b5d34378 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/README.md @@ -1,6 +1,6 @@ # OpenAPI generated API stub -[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.1.0/reference/html/integration.html#rest-http-interface) +[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface) ## Overview @@ -14,8 +14,8 @@ To use auto-generated interfaces you have to create your own configuration which @Configuration public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { - public MyConfiguration(WebClient client) { - super(client); + public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance + super(myWebClient); } } ``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 4ef7c07d2b6a..847e25f19253 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -42,6 +42,7 @@ public AdditionalPropertiesAnyType name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -117,10 +118,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 1d97a62feebe..eef158bde57f 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -43,6 +43,7 @@ public AdditionalPropertiesArray name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -118,10 +119,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 41e5adee1543..897604390034 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -42,6 +42,7 @@ public AdditionalPropertiesBoolean name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -117,10 +118,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 8af8e8615a24..dfed02769a70 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -81,6 +81,7 @@ public Map getMapString() { return mapString; } + @JsonProperty("map_string") public void setMapString(Map mapString) { this.mapString = mapString; } @@ -108,6 +109,7 @@ public Map getMapNumber() { return mapNumber; } + @JsonProperty("map_number") public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -135,6 +137,7 @@ public Map getMapInteger() { return mapInteger; } + @JsonProperty("map_integer") public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -162,6 +165,7 @@ public Map getMapBoolean() { return mapBoolean; } + @JsonProperty("map_boolean") public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -189,6 +193,7 @@ public Map> getMapArrayInteger() { return mapArrayInteger; } + @JsonProperty("map_array_integer") public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -216,6 +221,7 @@ public Map> getMapArrayAnytype() { return mapArrayAnytype; } + @JsonProperty("map_array_anytype") public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -243,6 +249,7 @@ public Map> getMapMapString() { return mapMapString; } + @JsonProperty("map_map_string") public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -270,6 +277,7 @@ public Map> getMapMapAnytype() { return mapMapAnytype; } + @JsonProperty("map_map_anytype") public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -289,6 +297,7 @@ public AdditionalPropertiesClass anytype1(@Nullable Object anytype1) { return anytype1; } + @JsonProperty("anytype_1") public void setAnytype1(@Nullable Object anytype1) { this.anytype1 = anytype1; } @@ -327,6 +336,7 @@ public AdditionalPropertiesClass anytype3(@Nullable Object anytype3) { return anytype3; } + @JsonProperty("anytype_3") public void setAnytype3(@Nullable Object anytype3) { this.anytype3 = anytype3; } @@ -393,10 +403,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 9d0a0a680eb5..7ac1f6d696fa 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -42,6 +42,7 @@ public AdditionalPropertiesInteger name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -117,10 +118,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 2287fbdf36ad..ef04e542a4ec 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -43,6 +43,7 @@ public AdditionalPropertiesNumber name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -118,10 +119,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 435c0c1750c5..0f616f50cb91 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -43,6 +43,7 @@ public AdditionalPropertiesObject name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -118,10 +119,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index ebce1cb3bd20..ff9bb5ef70b2 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -42,6 +42,7 @@ public AdditionalPropertiesString name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -117,10 +118,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java index b8d75ecc2ee6..1b933e642cce 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java @@ -65,6 +65,7 @@ public String getClassName() { return className; } + @JsonProperty("className") public void setClassName(String className) { this.className = className; } @@ -84,6 +85,7 @@ public String getColor() { return color; } + @JsonProperty("color") public void setColor(String color) { this.color = color; } @@ -121,10 +123,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bcb9b84d4895..163c4f34c17c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -51,6 +51,7 @@ public List> getArrayArrayNumber() { return arrayArrayNumber; } + @JsonProperty("ArrayArrayNumber") public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } @@ -86,10 +87,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 2b31d9e56a5e..555737e47ace 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -51,6 +51,7 @@ public List getArrayNumber() { return arrayNumber; } + @JsonProperty("ArrayNumber") public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } @@ -86,10 +87,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java index ae9fce80ee65..b05b1469edef 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java @@ -57,6 +57,7 @@ public List getArrayOfString() { return arrayOfString; } + @JsonProperty("array_of_string") public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -84,6 +85,7 @@ public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } + @JsonProperty("array_array_of_integer") public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -111,6 +113,7 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO return arrayArrayOfModel; } + @JsonProperty("array_array_of_model") public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -150,10 +153,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java index d4455545f223..f9fb0e198214 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java @@ -94,6 +94,7 @@ public BigCat kind(@Nullable KindEnum kind) { return kind; } + @JsonProperty("kind") public void setKind(@Nullable KindEnum kind) { this.kind = kind; } @@ -146,10 +147,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java index adc9d1840559..20f418e1fca7 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java @@ -48,6 +48,7 @@ public Capitalization smallCamel(@Nullable String smallCamel) { return smallCamel; } + @JsonProperty("smallCamel") public void setSmallCamel(@Nullable String smallCamel) { this.smallCamel = smallCamel; } @@ -67,6 +68,7 @@ public Capitalization capitalCamel(@Nullable String capitalCamel) { return capitalCamel; } + @JsonProperty("CapitalCamel") public void setCapitalCamel(@Nullable String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -86,6 +88,7 @@ public Capitalization smallSnake(@Nullable String smallSnake) { return smallSnake; } + @JsonProperty("small_Snake") public void setSmallSnake(@Nullable String smallSnake) { this.smallSnake = smallSnake; } @@ -105,6 +108,7 @@ public Capitalization capitalSnake(@Nullable String capitalSnake) { return capitalSnake; } + @JsonProperty("Capital_Snake") public void setCapitalSnake(@Nullable String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -124,6 +128,7 @@ public Capitalization scAETHFlowPoints(@Nullable String scAETHFlowPoints) { return scAETHFlowPoints; } + @JsonProperty("SCA_ETH_Flow_Points") public void setScAETHFlowPoints(@Nullable String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -143,6 +148,7 @@ public Capitalization ATT_NAME(@Nullable String ATT_NAME) { return ATT_NAME; } + @JsonProperty("ATT_NAME") public void setATTNAME(@Nullable String ATT_NAME) { this.ATT_NAME = ATT_NAME; } @@ -188,10 +194,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java index 02e7a5c6d8e4..a5f97087136f 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java @@ -62,6 +62,7 @@ public Cat declawed(@Nullable Boolean declawed) { return declawed; } + @JsonProperty("declawed") public void setDeclawed(@Nullable Boolean declawed) { this.declawed = declawed; } @@ -109,10 +110,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java index 9c692f7d99f6..7470fb6b6740 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java @@ -51,6 +51,7 @@ public Category id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -70,6 +71,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } @@ -107,10 +109,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java index 32c91c42edde..a5a384b24146 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -46,6 +46,7 @@ public ChildWithNullable otherProperty(@Nullable String otherProperty) { return otherProperty; } + @JsonProperty("otherProperty") public void setOtherProperty(@Nullable String otherProperty) { this.otherProperty = otherProperty; } @@ -104,10 +105,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java index 542dfbf2f681..74cd127deb0d 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java @@ -38,6 +38,7 @@ public ClassModel propertyClass(@Nullable String propertyClass) { return propertyClass; } + @JsonProperty("_class") public void setPropertyClass(@Nullable String propertyClass) { this.propertyClass = propertyClass; } @@ -73,10 +74,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java index db0c6556fd46..af04024934c0 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java @@ -38,6 +38,7 @@ public Client client(@Nullable String client) { return client; } + @JsonProperty("client") public void setClient(@Nullable String client) { this.client = client; } @@ -73,10 +74,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 8c528b040e92..7850d535fac2 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -100,6 +100,7 @@ public JsonNullable> getNullableRequiredArray() { return nullableRequiredArray; } + @JsonProperty("nullable_required_array") public void setNullableRequiredArray(JsonNullable> nullableRequiredArray) { this.nullableRequiredArray = nullableRequiredArray; } @@ -127,6 +128,7 @@ public List getRequiredArray() { return requiredArray; } + @JsonProperty("required_array") public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } @@ -206,10 +208,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java index dcfc17d0ae2c..ded6e4290ef5 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java @@ -54,6 +54,7 @@ public Dog breed(@Nullable String breed) { return breed; } + @JsonProperty("breed") public void setBreed(@Nullable String breed) { this.breed = breed; } @@ -101,10 +102,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java index 88271623de7b..62071fddd645 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java @@ -115,6 +115,7 @@ public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { return justSymbol; } + @JsonProperty("just_symbol") public void setJustSymbol(@Nullable JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -142,6 +143,7 @@ public List getArrayEnum() { return arrayEnum; } + @JsonProperty("array_enum") public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } @@ -179,10 +181,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java index 6d051b377303..583bd83f00c5 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java @@ -205,6 +205,7 @@ public EnumTest enumString(@Nullable EnumStringEnum enumString) { return enumString; } + @JsonProperty("enum_string") public void setEnumString(@Nullable EnumStringEnum enumString) { this.enumString = enumString; } @@ -224,6 +225,7 @@ public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } + @JsonProperty("enum_string_required") public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -243,6 +245,7 @@ public EnumTest enumInteger(@Nullable EnumIntegerEnum enumInteger) { return enumInteger; } + @JsonProperty("enum_integer") public void setEnumInteger(@Nullable EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -262,6 +265,7 @@ public EnumTest enumNumber(@Nullable EnumNumberEnum enumNumber) { return enumNumber; } + @JsonProperty("enum_number") public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -281,6 +285,7 @@ public EnumTest outerEnum(@Nullable OuterEnum outerEnum) { return outerEnum; } + @JsonProperty("outerEnum") public void setOuterEnum(@Nullable OuterEnum outerEnum) { this.outerEnum = outerEnum; } @@ -324,10 +329,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java index 11b33636ab67..a0b2928f4e72 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java @@ -38,6 +38,7 @@ public File sourceURI(@Nullable String sourceURI) { return sourceURI; } + @JsonProperty("sourceURI") public void setSourceURI(@Nullable String sourceURI) { this.sourceURI = sourceURI; } @@ -73,10 +74,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e0be4f028d7..c328c0252411 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -45,6 +45,7 @@ public FileSchemaTestClass file(@Nullable File file) { return file; } + @JsonProperty("file") public void setFile(@Nullable File file) { this.file = file; } @@ -72,6 +73,7 @@ public FileSchemaTestClass addFilesItem(File filesItem) { return files; } + @JsonProperty("files") public void setFiles(List<@Valid File> files) { this.files = files; } @@ -109,10 +111,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java index 92c47358f0ac..1d5e407f88a9 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java @@ -90,6 +90,7 @@ public FormatTest integer(@Nullable Integer integer) { return integer; } + @JsonProperty("integer") public void setInteger(@Nullable Integer integer) { this.integer = integer; } @@ -111,6 +112,7 @@ public FormatTest int32(@Nullable Integer int32) { return int32; } + @JsonProperty("int32") public void setInt32(@Nullable Integer int32) { this.int32 = int32; } @@ -130,6 +132,7 @@ public FormatTest int64(@Nullable Long int64) { return int64; } + @JsonProperty("int64") public void setInt64(@Nullable Long int64) { this.int64 = int64; } @@ -151,6 +154,7 @@ public BigDecimal getNumber() { return number; } + @JsonProperty("number") public void setNumber(BigDecimal number) { this.number = number; } @@ -172,6 +176,7 @@ public FormatTest _float(@Nullable Float _float) { return _float; } + @JsonProperty("float") public void setFloat(@Nullable Float _float) { this._float = _float; } @@ -193,6 +198,7 @@ public FormatTest _double(@Nullable Double _double) { return _double; } + @JsonProperty("double") public void setDouble(@Nullable Double _double) { this._double = _double; } @@ -212,6 +218,7 @@ public FormatTest string(@Nullable String string) { return string; } + @JsonProperty("string") public void setString(@Nullable String string) { this.string = string; } @@ -231,6 +238,7 @@ public byte[] getByte() { return _byte; } + @JsonProperty("byte") public void setByte(byte[] _byte) { this._byte = _byte; } @@ -250,6 +258,7 @@ public FormatTest binary(@Nullable org.springframework.core.io.Resource binary) return binary; } + @JsonProperty("binary") public void setBinary(@Nullable org.springframework.core.io.Resource binary) { this.binary = binary; } @@ -269,6 +278,7 @@ public LocalDate getDate() { return date; } + @JsonProperty("date") public void setDate(LocalDate date) { this.date = date; } @@ -288,6 +298,7 @@ public FormatTest dateTime(@Nullable OffsetDateTime dateTime) { return dateTime; } + @JsonProperty("dateTime") public void setDateTime(@Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -307,6 +318,7 @@ public FormatTest uuid(@Nullable UUID uuid) { return uuid; } + @JsonProperty("uuid") public void setUuid(@Nullable UUID uuid) { this.uuid = uuid; } @@ -326,6 +338,7 @@ public String getPassword() { return password; } + @JsonProperty("password") public void setPassword(String password) { this.password = password; } @@ -345,6 +358,7 @@ public FormatTest bigDecimal(@Nullable BigDecimal bigDecimal) { return bigDecimal; } + @JsonProperty("BigDecimal") public void setBigDecimal(@Nullable BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } @@ -406,10 +420,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 778559306bd1..dc5a1815f696 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -42,6 +42,7 @@ public HasOnlyReadOnly bar(@Nullable String bar) { return bar; } + @JsonProperty("bar") public void setBar(@Nullable String bar) { this.bar = bar; } @@ -61,6 +62,7 @@ public HasOnlyReadOnly foo(@Nullable String foo) { return foo; } + @JsonProperty("foo") public void setFoo(@Nullable String foo) { this.foo = foo; } @@ -98,10 +100,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java index 5875cddbc733..bc5042b64bd4 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java @@ -94,6 +94,7 @@ public Map> getMapMapOfString() { return mapMapOfString; } + @JsonProperty("map_map_of_string") public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -121,6 +122,7 @@ public Map getMapOfEnumString() { return mapOfEnumString; } + @JsonProperty("map_of_enum_string") public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -148,6 +150,7 @@ public Map getDirectMap() { return directMap; } + @JsonProperty("direct_map") public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -175,6 +178,7 @@ public Map getIndirectMap() { return indirectMap; } + @JsonProperty("indirect_map") public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } @@ -216,10 +220,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 2bffebe278b4..d99e4a6f6178 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -50,6 +50,7 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { return uuid; } + @JsonProperty("uuid") public void setUuid(@Nullable UUID uuid) { this.uuid = uuid; } @@ -69,6 +70,7 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(@Nullable OffsetDate return dateTime; } + @JsonProperty("dateTime") public void setDateTime(@Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -96,6 +98,7 @@ public Map getMap() { return map; } + @JsonProperty("map") public void setMap(Map map) { this.map = map; } @@ -135,10 +138,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java index 5a5d339fd8ee..0f2fc0f94f0f 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Model200Response.java @@ -42,6 +42,7 @@ public Model200Response name(@Nullable Integer name) { return name; } + @JsonProperty("name") public void setName(@Nullable Integer name) { this.name = name; } @@ -61,6 +62,7 @@ public Model200Response propertyClass(@Nullable String propertyClass) { return propertyClass; } + @JsonProperty("class") public void setPropertyClass(@Nullable String propertyClass) { this.propertyClass = propertyClass; } @@ -98,10 +100,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java index a4de294111f3..3ef2b3f0e256 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -44,6 +44,7 @@ public ModelApiResponse code(@Nullable Integer code) { return code; } + @JsonProperty("code") public void setCode(@Nullable Integer code) { this.code = code; } @@ -63,6 +64,7 @@ public ModelApiResponse type(@Nullable String type) { return type; } + @JsonProperty("type") public void setType(@Nullable String type) { this.type = type; } @@ -82,6 +84,7 @@ public ModelApiResponse message(@Nullable String message) { return message; } + @JsonProperty("message") public void setMessage(@Nullable String message) { this.message = message; } @@ -121,10 +124,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java index 826ae4bd0e89..154168ced7bb 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.java @@ -40,6 +40,7 @@ public ModelList _123list(@Nullable String _123list) { return _123list; } + @JsonProperty("123-list") public void set123list(@Nullable String _123list) { this._123list = _123list; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java index baff2133f891..a2d88c565477 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.java @@ -40,6 +40,7 @@ public ModelReturn _return(@Nullable Integer _return) { return _return; } + @JsonProperty("return") public void setReturn(@Nullable Integer _return) { this._return = _return; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java index 08dc71ea6d10..9dab3fb1a3de 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java @@ -55,6 +55,7 @@ public Integer getName() { return name; } + @JsonProperty("name") public void setName(Integer name) { this.name = name; } @@ -74,6 +75,7 @@ public Name snakeCase(@Nullable Integer snakeCase) { return snakeCase; } + @JsonProperty("snake_case") public void setSnakeCase(@Nullable Integer snakeCase) { this.snakeCase = snakeCase; } @@ -93,6 +95,7 @@ public Name property(@Nullable String property) { return property; } + @JsonProperty("property") public void setProperty(@Nullable String property) { this.property = property; } @@ -112,6 +115,7 @@ public Name _123number(@Nullable Integer _123number) { return _123number; } + @JsonProperty("123Number") public void set123number(@Nullable Integer _123number) { this._123number = _123number; } @@ -153,10 +157,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java index 39adf1f3cd47..8e8815254789 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -98,10 +98,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java index 805876ee124f..8f39e39805dd 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.java @@ -39,6 +39,7 @@ public NumberOnly justNumber(@Nullable BigDecimal justNumber) { return justNumber; } + @JsonProperty("JustNumber") public void setJustNumber(@Nullable BigDecimal justNumber) { this.justNumber = justNumber; } @@ -74,10 +75,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java index c448cc07678e..4aa7dba9a583 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java @@ -89,6 +89,7 @@ public Order id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -108,6 +109,7 @@ public Order petId(@Nullable Long petId) { return petId; } + @JsonProperty("petId") public void setPetId(@Nullable Long petId) { this.petId = petId; } @@ -127,6 +129,7 @@ public Order quantity(@Nullable Integer quantity) { return quantity; } + @JsonProperty("quantity") public void setQuantity(@Nullable Integer quantity) { this.quantity = quantity; } @@ -146,6 +149,7 @@ public Order shipDate(@Nullable OffsetDateTime shipDate) { return shipDate; } + @JsonProperty("shipDate") public void setShipDate(@Nullable OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -165,6 +169,7 @@ public Order status(@Nullable StatusEnum status) { return status; } + @JsonProperty("status") public void setStatus(@Nullable StatusEnum status) { this.status = status; } @@ -184,6 +189,7 @@ public Boolean getComplete() { return complete; } + @JsonProperty("complete") public void setComplete(Boolean complete) { this.complete = complete; } @@ -229,10 +235,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java index 7fe171307a2c..7eb17387eafe 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.java @@ -43,6 +43,7 @@ public OuterComposite myNumber(@Nullable BigDecimal myNumber) { return myNumber; } + @JsonProperty("my_number") public void setMyNumber(@Nullable BigDecimal myNumber) { this.myNumber = myNumber; } @@ -62,6 +63,7 @@ public OuterComposite myString(@Nullable String myString) { return myString; } + @JsonProperty("my_string") public void setMyString(@Nullable String myString) { this.myString = myString; } @@ -81,6 +83,7 @@ public OuterComposite myBoolean(@Nullable Boolean myBoolean) { return myBoolean; } + @JsonProperty("my_boolean") public void setMyBoolean(@Nullable Boolean myBoolean) { this.myBoolean = myBoolean; } @@ -120,10 +123,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java index 97146804b925..158cd0f55a2e 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -89,6 +89,7 @@ public ParentWithNullable type(@Nullable TypeEnum type) { return type; } + @JsonProperty("type") public void setType(@Nullable TypeEnum type) { this.type = type; } @@ -156,10 +157,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java index 13b3b2822c80..30459ad6b39c 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java @@ -109,6 +109,7 @@ public Pet id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -128,6 +129,7 @@ public Pet category(@Nullable Category category) { return category; } + @JsonProperty("category") public void setCategory(@Nullable Category category) { this.category = category; } @@ -147,6 +149,7 @@ public String getName() { return name; } + @JsonProperty("name") public void setName(String name) { this.name = name; } @@ -175,6 +178,7 @@ public Set getPhotoUrls() { } @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty("photoUrls") public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } @@ -202,6 +206,7 @@ public Pet addTagsItem(Tag tagsItem) { return tags; } + @JsonProperty("tags") public void setTags(List<@Valid Tag> tags) { this.tags = tags; } @@ -217,8 +222,8 @@ public Pet status(@Nullable StatusEnum status) { * @deprecated */ - @JsonProperty("status") @Deprecated + @JsonProperty("status") public @Nullable StatusEnum getStatus() { return status; } @@ -227,6 +232,7 @@ public Pet status(@Nullable StatusEnum status) { * @deprecated */ @Deprecated + @JsonProperty("status") public void setStatus(@Nullable StatusEnum status) { this.status = status; } @@ -272,10 +278,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 8d998f554274..6562e173cd05 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -40,6 +40,7 @@ public ReadOnlyFirst bar(@Nullable String bar) { return bar; } + @JsonProperty("bar") public void setBar(@Nullable String bar) { this.bar = bar; } @@ -59,6 +60,7 @@ public ReadOnlyFirst baz(@Nullable String baz) { return baz; } + @JsonProperty("baz") public void setBaz(@Nullable String baz) { this.baz = baz; } @@ -96,10 +98,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index d97baed71ff3..2287c155d5e1 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -44,6 +44,7 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(@Nullable String return normalPropertyName; } + @JsonProperty("normalPropertyName") public void setNormalPropertyName(@Nullable String normalPropertyName) { this.normalPropertyName = normalPropertyName; } @@ -63,6 +64,7 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(@Nullable return UPPER_CASE_PROPERTY_SNAKE; } + @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public void setUPPERCASEPROPERTYSNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) { this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; } @@ -82,6 +84,7 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(@Nullable S return lowerCasePropertyDashes; } + @JsonProperty("lower-case-property-dashes") public void setLowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) { this.lowerCasePropertyDashes = lowerCasePropertyDashes; } @@ -101,6 +104,7 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(@Nullable St return propertyNameWithSpaces; } + @JsonProperty("property name with spaces") public void setPropertyNameWithSpaces(@Nullable String propertyNameWithSpaces) { this.propertyNameWithSpaces = propertyNameWithSpaces; } @@ -142,10 +146,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java index c743354bc076..5f16622a53de 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -40,6 +40,7 @@ public class SpecialModelName { return $specialPropertyName; } + @JsonProperty("$special[property.name]") public void set$SpecialPropertyName(@Nullable Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } @@ -75,10 +76,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java index f127cfe7cfa1..3b971814d6d6 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Tag.java @@ -40,6 +40,7 @@ public Tag id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -59,6 +60,7 @@ public Tag name(@Nullable String name) { return name; } + @JsonProperty("name") public void setName(@Nullable String name) { this.name = name; } @@ -96,10 +98,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java index 229b0b3981d5..c42dc5da2439 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -66,6 +66,7 @@ public String getStringItem() { return stringItem; } + @JsonProperty("string_item") public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -85,6 +86,7 @@ public BigDecimal getNumberItem() { return numberItem; } + @JsonProperty("number_item") public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -104,6 +106,7 @@ public Integer getIntegerItem() { return integerItem; } + @JsonProperty("integer_item") public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -123,6 +126,7 @@ public Boolean getBoolItem() { return boolItem; } + @JsonProperty("bool_item") public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -150,6 +154,7 @@ public List getArrayItem() { return arrayItem; } + @JsonProperty("array_item") public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } @@ -193,10 +198,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java index 87cd7beb5e91..0b02ebb4c5ae 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -69,6 +69,7 @@ public String getStringItem() { return stringItem; } + @JsonProperty("string_item") public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -88,6 +89,7 @@ public BigDecimal getNumberItem() { return numberItem; } + @JsonProperty("number_item") public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -107,6 +109,7 @@ public Float getFloatItem() { return floatItem; } + @JsonProperty("float_item") public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -126,6 +129,7 @@ public Integer getIntegerItem() { return integerItem; } + @JsonProperty("integer_item") public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -145,6 +149,7 @@ public Boolean getBoolItem() { return boolItem; } + @JsonProperty("bool_item") public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -172,6 +177,7 @@ public List getArrayItem() { return arrayItem; } + @JsonProperty("array_item") public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } @@ -217,10 +223,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java index a1f34be0ba82..804bc86a6c8a 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java @@ -52,6 +52,7 @@ public User id(@Nullable Long id) { return id; } + @JsonProperty("id") public void setId(@Nullable Long id) { this.id = id; } @@ -71,6 +72,7 @@ public User username(@Nullable String username) { return username; } + @JsonProperty("username") public void setUsername(@Nullable String username) { this.username = username; } @@ -90,6 +92,7 @@ public User firstName(@Nullable String firstName) { return firstName; } + @JsonProperty("firstName") public void setFirstName(@Nullable String firstName) { this.firstName = firstName; } @@ -109,6 +112,7 @@ public User lastName(@Nullable String lastName) { return lastName; } + @JsonProperty("lastName") public void setLastName(@Nullable String lastName) { this.lastName = lastName; } @@ -128,6 +132,7 @@ public User email(@Nullable String email) { return email; } + @JsonProperty("email") public void setEmail(@Nullable String email) { this.email = email; } @@ -147,6 +152,7 @@ public User password(@Nullable String password) { return password; } + @JsonProperty("password") public void setPassword(@Nullable String password) { this.password = password; } @@ -166,6 +172,7 @@ public User phone(@Nullable String phone) { return phone; } + @JsonProperty("phone") public void setPhone(@Nullable String phone) { this.phone = phone; } @@ -185,6 +192,7 @@ public User userStatus(@Nullable Integer userStatus) { return userStatus; } + @JsonProperty("userStatus") public void setUserStatus(@Nullable Integer userStatus) { this.userStatus = userStatus; } @@ -234,10 +242,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java index 8bda62b0a221..cfb9f948a335 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java @@ -107,6 +107,7 @@ public XmlItem attributeString(@Nullable String attributeString) { return attributeString; } + @JsonProperty("attribute_string") public void setAttributeString(@Nullable String attributeString) { this.attributeString = attributeString; } @@ -126,6 +127,7 @@ public XmlItem attributeNumber(@Nullable BigDecimal attributeNumber) { return attributeNumber; } + @JsonProperty("attribute_number") public void setAttributeNumber(@Nullable BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -145,6 +147,7 @@ public XmlItem attributeInteger(@Nullable Integer attributeInteger) { return attributeInteger; } + @JsonProperty("attribute_integer") public void setAttributeInteger(@Nullable Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -164,6 +167,7 @@ public XmlItem attributeBoolean(@Nullable Boolean attributeBoolean) { return attributeBoolean; } + @JsonProperty("attribute_boolean") public void setAttributeBoolean(@Nullable Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -191,6 +195,7 @@ public List getWrappedArray() { return wrappedArray; } + @JsonProperty("wrapped_array") public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -210,6 +215,7 @@ public XmlItem nameString(@Nullable String nameString) { return nameString; } + @JsonProperty("name_string") public void setNameString(@Nullable String nameString) { this.nameString = nameString; } @@ -229,6 +235,7 @@ public XmlItem nameNumber(@Nullable BigDecimal nameNumber) { return nameNumber; } + @JsonProperty("name_number") public void setNameNumber(@Nullable BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -248,6 +255,7 @@ public XmlItem nameInteger(@Nullable Integer nameInteger) { return nameInteger; } + @JsonProperty("name_integer") public void setNameInteger(@Nullable Integer nameInteger) { this.nameInteger = nameInteger; } @@ -267,6 +275,7 @@ public XmlItem nameBoolean(@Nullable Boolean nameBoolean) { return nameBoolean; } + @JsonProperty("name_boolean") public void setNameBoolean(@Nullable Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -294,6 +303,7 @@ public List getNameArray() { return nameArray; } + @JsonProperty("name_array") public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -321,6 +331,7 @@ public List getNameWrappedArray() { return nameWrappedArray; } + @JsonProperty("name_wrapped_array") public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -340,6 +351,7 @@ public XmlItem prefixString(@Nullable String prefixString) { return prefixString; } + @JsonProperty("prefix_string") public void setPrefixString(@Nullable String prefixString) { this.prefixString = prefixString; } @@ -359,6 +371,7 @@ public XmlItem prefixNumber(@Nullable BigDecimal prefixNumber) { return prefixNumber; } + @JsonProperty("prefix_number") public void setPrefixNumber(@Nullable BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -378,6 +391,7 @@ public XmlItem prefixInteger(@Nullable Integer prefixInteger) { return prefixInteger; } + @JsonProperty("prefix_integer") public void setPrefixInteger(@Nullable Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -397,6 +411,7 @@ public XmlItem prefixBoolean(@Nullable Boolean prefixBoolean) { return prefixBoolean; } + @JsonProperty("prefix_boolean") public void setPrefixBoolean(@Nullable Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -424,6 +439,7 @@ public List getPrefixArray() { return prefixArray; } + @JsonProperty("prefix_array") public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -451,6 +467,7 @@ public List getPrefixWrappedArray() { return prefixWrappedArray; } + @JsonProperty("prefix_wrapped_array") public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -470,6 +487,7 @@ public XmlItem namespaceString(@Nullable String namespaceString) { return namespaceString; } + @JsonProperty("namespace_string") public void setNamespaceString(@Nullable String namespaceString) { this.namespaceString = namespaceString; } @@ -489,6 +507,7 @@ public XmlItem namespaceNumber(@Nullable BigDecimal namespaceNumber) { return namespaceNumber; } + @JsonProperty("namespace_number") public void setNamespaceNumber(@Nullable BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -508,6 +527,7 @@ public XmlItem namespaceInteger(@Nullable Integer namespaceInteger) { return namespaceInteger; } + @JsonProperty("namespace_integer") public void setNamespaceInteger(@Nullable Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -527,6 +547,7 @@ public XmlItem namespaceBoolean(@Nullable Boolean namespaceBoolean) { return namespaceBoolean; } + @JsonProperty("namespace_boolean") public void setNamespaceBoolean(@Nullable Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -554,6 +575,7 @@ public List getNamespaceArray() { return namespaceArray; } + @JsonProperty("namespace_array") public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -581,6 +603,7 @@ public List getNamespaceWrappedArray() { return namespaceWrappedArray; } + @JsonProperty("namespace_wrapped_array") public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -600,6 +623,7 @@ public XmlItem prefixNsString(@Nullable String prefixNsString) { return prefixNsString; } + @JsonProperty("prefix_ns_string") public void setPrefixNsString(@Nullable String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -619,6 +643,7 @@ public XmlItem prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { return prefixNsNumber; } + @JsonProperty("prefix_ns_number") public void setPrefixNsNumber(@Nullable BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -638,6 +663,7 @@ public XmlItem prefixNsInteger(@Nullable Integer prefixNsInteger) { return prefixNsInteger; } + @JsonProperty("prefix_ns_integer") public void setPrefixNsInteger(@Nullable Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -657,6 +683,7 @@ public XmlItem prefixNsBoolean(@Nullable Boolean prefixNsBoolean) { return prefixNsBoolean; } + @JsonProperty("prefix_ns_boolean") public void setPrefixNsBoolean(@Nullable Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -684,6 +711,7 @@ public List getPrefixNsArray() { return prefixNsArray; } + @JsonProperty("prefix_ns_array") public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -711,6 +739,7 @@ public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } + @JsonProperty("prefix_ns_wrapped_array") public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } @@ -802,10 +831,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(@Nullable Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java index 20fc796f00f7..c95df50aec86 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -11,7 +11,9 @@ import org.openapitools.model.ReadOnlyFirstDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -25,14 +27,14 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - + @Valid private List arrayOfString = new ArrayList<>(); - + @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - - private List> arrayArrayOfModel = new ArrayList<>(); + @Valid + private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -79,7 +81,7 @@ public ArrayTestDto addArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - + @Valid @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; @@ -90,12 +92,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTestDto addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -107,14 +109,14 @@ public ArrayTestDto addArrayArrayOfModelItem(List arrayArrayOf * Get arrayArrayOfModel * @return arrayArrayOfModel */ - + @Valid @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index fd779ee0be7b..5433077b863f 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -11,7 +11,9 @@ import org.openapitools.model.FileDto; import org.springframework.lang.Nullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -27,8 +29,8 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - - private List files = new ArrayList<>(); + @Valid + private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { this.file = file; @@ -39,7 +41,7 @@ public FileSchemaTestClassDto file(@Nullable FileDto file) { * Get file * @return file */ - + @Valid @JsonProperty("file") public @Nullable FileDto getFile() { return file; @@ -50,7 +52,7 @@ public void setFile(@Nullable FileDto file) { this.file = file; } - public FileSchemaTestClassDto files(List files) { + public FileSchemaTestClassDto files(List<@Valid FileDto> files) { this.files = files; return this; } @@ -67,14 +69,14 @@ public FileSchemaTestClassDto addFilesItem(FileDto filesItem) { * Get files * @return files */ - + @Valid @JsonProperty("files") - public List getFiles() { + public List<@Valid FileDto> getFiles() { return files; } @JsonProperty("files") - public void setFiles(List files) { + public void setFiles(List<@Valid FileDto> files) { this.files = files; } diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java index 46576a0e0b99..30546ed17076 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java @@ -16,7 +16,9 @@ import org.springframework.lang.Nullable; import tools.jackson.databind.annotation.JsonDeserialize; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -36,11 +38,11 @@ public class PetDto { private String name; - + @Valid private Set photoUrls = new LinkedHashSet<>(); - - private List tags = new ArrayList<>(); + @Valid + private List<@Valid TagDto> tags = new ArrayList<>(); /** * pet status in the store @@ -115,7 +117,7 @@ public PetDto category(@Nullable CategoryDto category) { * Get category * @return category */ - + @Valid @JsonProperty("category") public @Nullable CategoryDto getCategory() { return category; @@ -135,7 +137,7 @@ public PetDto name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; @@ -163,7 +165,7 @@ public PetDto addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull + @NotNull @JsonProperty("photoUrls") public Set getPhotoUrls() { return photoUrls; @@ -175,7 +177,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public PetDto tags(List tags) { + public PetDto tags(List<@Valid TagDto> tags) { this.tags = tags; return this; } @@ -192,14 +194,14 @@ public PetDto addTagsItem(TagDto tagsItem) { * Get tags * @return tags */ - + @Valid @JsonProperty("tags") - public List getTags() { + public List<@Valid TagDto> getTags() { return tags; } @JsonProperty("tags") - public void setTags(List tags) { + public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml index c760ff228884..d16a81e73f46 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml @@ -67,6 +67,10 @@ jackson-databind-nullable 0.2.9 + + org.springframework.boot + spring-boot-starter-validation + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java index df29a4816ba4..7bc368f49161 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -17,6 +20,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface AnotherFakeApi { @@ -34,7 +38,7 @@ public interface AnotherFakeApi { contentType = "application/json" ) ResponseEntity call123testSpecialTags( - @RequestBody Client client + @Valid @RequestBody Client client ); } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java index f36d842dce7f..5a93f379a13e 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java @@ -21,6 +21,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -28,6 +31,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeApi { @@ -45,7 +49,7 @@ public interface FakeApi { contentType = "application/xml" ) ResponseEntity createXmlItem( - @RequestBody XmlItem xmlItem + @Valid @RequestBody XmlItem xmlItem ); @@ -63,7 +67,7 @@ ResponseEntity createXmlItem( contentType = "application/json" ) ResponseEntity fakeOuterBooleanSerialize( - @RequestBody(required = false) @Nullable Boolean body + @Valid @RequestBody(required = false) @Nullable Boolean body ); @@ -81,7 +85,7 @@ ResponseEntity fakeOuterBooleanSerialize( contentType = "application/json" ) ResponseEntity fakeOuterCompositeSerialize( - @RequestBody(required = false) @Nullable OuterComposite outerComposite + @Valid @RequestBody(required = false) @Nullable OuterComposite outerComposite ); @@ -99,7 +103,7 @@ ResponseEntity fakeOuterCompositeSerialize( contentType = "application/json" ) ResponseEntity fakeOuterNumberSerialize( - @RequestBody(required = false) @Nullable BigDecimal body + @Valid @RequestBody(required = false) @Nullable BigDecimal body ); @@ -117,7 +121,7 @@ ResponseEntity fakeOuterNumberSerialize( contentType = "application/json" ) ResponseEntity fakeOuterStringSerialize( - @RequestBody(required = false) @Nullable String body + @Valid @RequestBody(required = false) @Nullable String body ); @@ -135,7 +139,7 @@ ResponseEntity fakeOuterStringSerialize( contentType = "application/json" ) ResponseEntity testBodyWithFileSchema( - @RequestBody FileSchemaTestClass fileSchemaTestClass + @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ); @@ -153,8 +157,8 @@ ResponseEntity testBodyWithFileSchema( contentType = "application/json" ) ResponseEntity testBodyWithQueryParams( - @RequestParam(value = "query", required = true) String query, - @RequestBody User user + @NotNull @Valid @RequestParam(value = "query", required = true) String query, + @Valid @RequestBody User user ); @@ -172,7 +176,7 @@ ResponseEntity testBodyWithQueryParams( contentType = "application/json" ) ResponseEntity testClientModel( - @RequestBody Client client + @Valid @RequestBody Client client ); @@ -204,20 +208,20 @@ ResponseEntity testClientModel( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testEndpointParameters( - @RequestParam(value = "number", required = true) BigDecimal number, - @RequestParam(value = "double", required = true) Double _double, - @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @RequestParam(value = "byte", required = true) byte[] _byte, - @RequestParam(value = "integer", required = false) Integer integer, - @RequestParam(value = "int32", required = false) Integer int32, - @RequestParam(value = "int64", required = false) Long int64, - @RequestParam(value = "float", required = false) Float _float, - @RequestParam(value = "string", required = false) String string, + @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") @Valid @RequestParam(value = "number", required = true) BigDecimal number, + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") @Valid @RequestParam(value = "double", required = true) Double _double, + @Pattern(regexp = "^[A-Z].*") @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @Valid @RequestParam(value = "byte", required = true) byte[] _byte, + @Min(value = 10) @Max(value = 100) @Valid @RequestParam(value = "integer", required = false) Integer integer, + @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, + @Valid @RequestParam(value = "int64", required = false) Long int64, + @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, + @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, @RequestPart(value = "binary", required = false) MultipartFile binary, - @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @RequestParam(value = "password", required = false) String password, - @RequestParam(value = "callback", required = false) String paramCallback + @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Size(min = 10, max = 64) @Valid @RequestParam(value = "password", required = false) String password, + @Valid @RequestParam(value = "callback", required = false) String paramCallback ); @@ -245,12 +249,12 @@ ResponseEntity testEndpointParameters( ResponseEntity testEnumParameters( @RequestHeader(value = "enum_header_string_array", required = false) @Nullable List enumHeaderStringArray, @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, - @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, - @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, - @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Valid @RequestParam(value = "enum_query_string_array", required = false) @Nullable List enumQueryStringArray, + @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Valid @RequestParam(value = "enum_query_integer", required = false) @Nullable Integer enumQueryInteger, + @Valid @RequestParam(value = "enum_query_double", required = false) @Nullable Double enumQueryDouble, + @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString ); @@ -272,12 +276,12 @@ ResponseEntity testEnumParameters( accept = { "application/json" } ) ResponseEntity testGroupParameters( - @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, + @NotNull @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @NotNull @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @NotNull @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @Valid @RequestParam(value = "string_group", required = false) @Nullable Integer stringGroup, @RequestHeader(value = "boolean_group", required = false) @Nullable Boolean booleanGroup, - @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group + @Valid @RequestParam(value = "int64_group", required = false) @Nullable Long int64Group ); @@ -295,7 +299,7 @@ ResponseEntity testGroupParameters( contentType = "application/json" ) ResponseEntity testInlineAdditionalProperties( - @RequestBody Map requestBody + @Valid @RequestBody Map requestBody ); @@ -314,8 +318,8 @@ ResponseEntity testInlineAdditionalProperties( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testJsonFormData( - @RequestParam(value = "param", required = true) String param, - @RequestParam(value = "param2", required = true) String param2 + @Valid @RequestParam(value = "param", required = true) String param, + @Valid @RequestParam(value = "param2", required = true) String param2 ); @@ -333,7 +337,7 @@ ResponseEntity testJsonFormData( contentType = "application/json" ) ResponseEntity testNullable( - @RequestBody ChildWithNullable childWithNullable + @Valid @RequestBody ChildWithNullable childWithNullable ); @@ -353,10 +357,10 @@ ResponseEntity testNullable( accept = { "application/json" } ) ResponseEntity testQueryParameterCollectionFormat( - @RequestParam(value = "pipe", required = true) List pipe, - @RequestParam(value = "http", required = true) List http, - @RequestParam(value = "url", required = true) List url, - @RequestParam(value = "context", required = true) List context + @NotNull @Valid @RequestParam(value = "pipe", required = true) List pipe, + @NotNull @Valid @RequestParam(value = "http", required = true) List http, + @NotNull @Valid @RequestParam(value = "url", required = true) List url, + @NotNull @Valid @RequestParam(value = "context", required = true) List context ); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index be4dd33a2a9a..866215965177 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -17,6 +20,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface FakeClassnameTags123Api { @@ -34,7 +38,7 @@ public interface FakeClassnameTags123Api { contentType = "application/json" ) ResponseEntity testClassname( - @RequestBody Client client + @Valid @RequestBody Client client ); } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java index 9cf1fbc8a242..af4b5afa77a5 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java @@ -14,6 +14,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -21,6 +24,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface PetApi { @@ -39,7 +43,7 @@ public interface PetApi { contentType = "application/json" ) ResponseEntity addPet( - @RequestBody Pet pet + @Valid @RequestBody Pet pet ); @@ -77,7 +81,7 @@ ResponseEntity deletePet( accept = { "application/json", "application/xml" } ) ResponseEntity> findPetsByStatus( - @RequestParam(value = "status", required = true) List status + @NotNull @Valid @RequestParam(value = "status", required = true) List status ); @@ -97,7 +101,7 @@ ResponseEntity> findPetsByStatus( accept = { "application/json", "application/xml" } ) ResponseEntity> findPetsByTags( - @RequestParam(value = "tags", required = true) Set tags + @NotNull @Valid @RequestParam(value = "tags", required = true) Set tags ); @@ -153,7 +157,7 @@ ResponseEntity responseObjectDifferentNam contentType = "application/json" ) ResponseEntity updatePet( - @RequestBody Pet pet + @Valid @RequestBody Pet pet ); @@ -174,8 +178,8 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( @PathVariable("petId") Long petId, - @RequestParam(value = "name", required = false) String name, - @RequestParam(value = "status", required = false) String status + @Valid @RequestParam(value = "name", required = false) String name, + @Valid @RequestParam(value = "status", required = false) String status ); @@ -196,7 +200,7 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( @PathVariable("petId") Long petId, - @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ); @@ -219,7 +223,7 @@ ResponseEntity uploadFile( ResponseEntity uploadFileWithRequiredFile( @PathVariable("petId") Long petId, @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ); } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java index ec6f95085a58..6d95afad769a 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -18,6 +21,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface StoreApi { @@ -70,7 +74,7 @@ ResponseEntity> getInventory( accept = { "application/json", "application/xml" } ) ResponseEntity getOrderById( - @PathVariable("order_id") Long orderId + @Min(value = 1L) @Max(value = 5L) @PathVariable("order_id") Long orderId ); @@ -89,7 +93,7 @@ ResponseEntity getOrderById( contentType = "application/json" ) ResponseEntity placeOrder( - @RequestBody Order order + @Valid @RequestBody Order order ); } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java index c460aa0a89ca..34f371bc03a8 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; @@ -18,6 +21,7 @@ import jakarta.annotation.Generated; +@Validated @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public interface UserApi { @@ -35,7 +39,7 @@ public interface UserApi { contentType = "application/json" ) ResponseEntity createUser( - @RequestBody User user + @Valid @RequestBody User user ); @@ -53,7 +57,7 @@ ResponseEntity createUser( contentType = "application/json" ) ResponseEntity createUsersWithArrayInput( - @RequestBody List user + @Valid @RequestBody List<@Valid User> user ); @@ -71,7 +75,7 @@ ResponseEntity createUsersWithArrayInput( contentType = "application/json" ) ResponseEntity createUsersWithListInput( - @RequestBody List user + @Valid @RequestBody List<@Valid User> user ); @@ -127,8 +131,8 @@ ResponseEntity getUserByName( accept = { "application/json", "application/xml" } ) ResponseEntity loginUser( - @RequestParam(value = "username", required = true) String username, - @RequestParam(value = "password", required = true) String password + @NotNull @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Valid @RequestParam(value = "password", required = true) String password ); @@ -165,7 +169,7 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( @PathVariable("username") String username, - @RequestBody User user + @Valid @RequestBody User user ); } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 7e91f16d54db..b304236b0378 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 5bceba169811..c4c2c87988cc 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 7352896bfda4..e41c39d755bb 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 79f0d803e95d..7b035d34d2e6 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -14,7 +14,9 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -27,28 +29,28 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - + @Valid private Map mapString = new HashMap<>(); - + @Valid private Map mapNumber = new HashMap<>(); - + @Valid private Map mapInteger = new HashMap<>(); - + @Valid private Map mapBoolean = new HashMap<>(); - + @Valid private Map> mapArrayInteger = new HashMap<>(); - + @Valid private Map> mapArrayAnytype = new HashMap<>(); - + @Valid private Map> mapMapString = new HashMap<>(); - + @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; @@ -102,7 +104,7 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - + @Valid @JsonProperty("map_number") public Map getMapNumber() { return mapNumber; @@ -186,7 +188,7 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; @@ -214,7 +216,7 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - + @Valid @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { return mapArrayAnytype; @@ -242,7 +244,7 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; @@ -270,7 +272,7 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index a75cbc653296..530434d58823 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index c53b1c7859e4..2a132b063745 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b9966c0f410f..ca34f27401bf 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 5ac90441d825..aecdec44af72 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java index 565c92b87617..c84f3df098f8 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java @@ -10,7 +10,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -58,7 +60,7 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull + @NotNull @JsonProperty("className") public String getClassName() { return className; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 18a388023448..116141647a71 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -24,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - + @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -44,7 +46,7 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - + @Valid @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { return arrayArrayNumber; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 0950f897120e..8c554fc1f868 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -24,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - + @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -44,7 +46,7 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - + @Valid @JsonProperty("ArrayNumber") public List getArrayNumber() { return arrayNumber; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java index a7ed1c8651d7..11f483cf5001 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -24,14 +26,14 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - + @Valid private List arrayOfString = new ArrayList<>(); - + @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - - private List> arrayArrayOfModel = new ArrayList<>(); + @Valid + private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -78,7 +80,7 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - + @Valid @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; @@ -89,12 +91,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -106,14 +108,14 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - + @Valid @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java index 6c8523bc81cf..f7c6daa6ff06 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java @@ -12,7 +12,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java index d2d8d98e720d..3a30941e4e84 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java index a79c8ecc5516..d0146df6321c 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java index 9dfb4caa7b52..925cedc44c18 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -64,7 +66,7 @@ public Category name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java index 326c28e87672..d165c9955a7b 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -14,7 +14,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java index 501b93612a4c..1b384b1bc132 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java index 9492dc94929a..0ee6af11c551 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 49c05354cc12..e41eebc6322f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -12,7 +12,9 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -25,16 +27,16 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - + @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - + @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - + @Valid private List requiredArray = new ArrayList<>(); - + @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { @@ -93,7 +95,7 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull + @NotNull @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { return nullableRequiredArray; @@ -121,7 +123,7 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull + @NotNull @JsonProperty("required_array") public List getRequiredArray() { return requiredArray; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java index 86870095d0f0..9d8beb5d8e22 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java index e3d6d1d01adb..f3dd3e44b9db 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -96,7 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - + @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java index 39e06c0915e8..5b623fbb9a5b 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java @@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java index 6909c78712cb..fdd648d78292 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java @@ -10,7 +10,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -218,7 +220,7 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull + @NotNull @JsonProperty("enum_string_required") public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; @@ -278,7 +280,7 @@ public EnumTest outerEnum(@Nullable OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - + @Valid @JsonProperty("outerEnum") public @Nullable OuterEnum getOuterEnum() { return outerEnum; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java index 5b774fefc30a..571d276ccac8 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 75c3385d02d5..8507f1bebd2c 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -26,8 +28,8 @@ public class FileSchemaTestClass { private @Nullable File file; - - private List files = new ArrayList<>(); + @Valid + private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { this.file = file; @@ -38,7 +40,7 @@ public FileSchemaTestClass file(@Nullable File file) { * Get file * @return file */ - + @Valid @JsonProperty("file") public @Nullable File getFile() { return file; @@ -49,7 +51,7 @@ public void setFile(@Nullable File file) { this.file = file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid File> files) { this.files = files; return this; } @@ -66,14 +68,14 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - + @Valid @JsonProperty("files") - public List getFiles() { + public List<@Valid File> getFiles() { return files; } @JsonProperty("files") - public void setFiles(List files) { + public void setFiles(List<@Valid File> files) { this.files = files; } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java index a6dd3413ee7d..7d941e9dc189 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java @@ -14,7 +14,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -83,7 +85,7 @@ public FormatTest integer(@Nullable Integer integer) { * maximum: 100 * @return integer */ - + @Min(value = 10) @Max(value = 100) @JsonProperty("integer") public @Nullable Integer getInteger() { return integer; @@ -105,7 +107,7 @@ public FormatTest int32(@Nullable Integer int32) { * maximum: 200 * @return int32 */ - + @Min(value = 20) @Max(value = 200) @JsonProperty("int32") public @Nullable Integer getInt32() { return int32; @@ -147,7 +149,7 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull + @NotNull @Valid @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") @JsonProperty("number") public BigDecimal getNumber() { return number; @@ -169,7 +171,7 @@ public FormatTest _float(@Nullable Float _float) { * maximum: 987.6 * @return _float */ - + @DecimalMin(value = "54.3") @DecimalMax(value = "987.6") @JsonProperty("float") public @Nullable Float getFloat() { return _float; @@ -191,7 +193,7 @@ public FormatTest _double(@Nullable Double _double) { * maximum: 123.4 * @return _double */ - + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") @JsonProperty("double") public @Nullable Double getDouble() { return _double; @@ -211,7 +213,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - + @Pattern(regexp = "/[a-z]/i") @JsonProperty("string") public @Nullable String getString() { return string; @@ -231,7 +233,7 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull + @NotNull @JsonProperty("byte") public byte[] getByte() { return _byte; @@ -251,7 +253,7 @@ public FormatTest binary(@Nullable org.springframework.core.io.Resource binary) * Get binary * @return binary */ - + @Valid @JsonProperty("binary") public @Nullable org.springframework.core.io.Resource getBinary() { return binary; @@ -271,7 +273,7 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull + @NotNull @Valid @JsonProperty("date") public LocalDate getDate() { return date; @@ -291,7 +293,7 @@ public FormatTest dateTime(@Nullable OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -311,7 +313,7 @@ public FormatTest uuid(@Nullable UUID uuid) { * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -331,7 +333,7 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull + @NotNull @Size(min = 10, max = 64) @JsonProperty("password") public String getPassword() { return password; @@ -351,7 +353,7 @@ public FormatTest bigDecimal(@Nullable BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - + @Valid @JsonProperty("BigDecimal") public @Nullable BigDecimal getBigDecimal() { return bigDecimal; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 7dbcdddfa6aa..4e130b25a2ab 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java index 95d30de86bb9..f9cd434aacc7 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java @@ -10,7 +10,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -23,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - + @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -61,13 +63,13 @@ public static InnerEnum fromValue(String value) { } } - + @Valid private Map mapOfEnumString = new HashMap<>(); - + @Valid private Map directMap = new HashMap<>(); - + @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -87,7 +89,7 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - + @Valid @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { return mapMapOfString; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6e681ebeddf3..c4545b491c3f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -13,7 +13,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -31,7 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - + @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { @@ -43,7 +45,7 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -63,7 +65,7 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(@Nullable OffsetDate * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -91,7 +93,7 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - + @Valid @JsonProperty("map") public Map getMap() { return map; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java index 36169b151aa4..a361e0741315 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java index f9aea2a7d56d..7a38b7309413 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java index 2e8b5ef481e6..f14c7a237bc1 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java index 30f0b4da5688..84073b2e0e6b 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java index 5a2e4e45da41..60b1c7a20220 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -48,7 +50,7 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public Integer getName() { return name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java index 0012f126580c..a2c86dff63b3 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -12,7 +12,9 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -25,7 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - + @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java index 53098f5998c5..df0332ed62fd 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -32,7 +34,7 @@ public NumberOnly justNumber(@Nullable BigDecimal justNumber) { * Get justNumber * @return justNumber */ - + @Valid @JsonProperty("JustNumber") public @Nullable BigDecimal getJustNumber() { return justNumber; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java index c055b3741b06..fa36c6193d8d 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java @@ -10,7 +10,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -142,7 +144,7 @@ public Order shipDate(@Nullable OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - + @Valid @JsonProperty("shipDate") public @Nullable OffsetDateTime getShipDate() { return shipDate; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java index c181df7b7a37..e55c9f3e82e6 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -36,7 +38,7 @@ public OuterComposite myNumber(@Nullable BigDecimal myNumber) { * Get myNumber * @return myNumber */ - + @Valid @JsonProperty("my_number") public @Nullable BigDecimal getMyNumber() { return myNumber; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java index 046e72a300f0..1a5936023d5f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java @@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java index e25d99b16c09..cf2d50939730 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -14,7 +14,9 @@ import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java index a90496ee0ab1..f5c928265b23 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java @@ -16,7 +16,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -35,11 +37,11 @@ public class Pet { private String name; - + @Valid private Set photoUrls = new LinkedHashSet<>(); - - private List tags = new ArrayList<>(); + @Valid + private List<@Valid Tag> tags = new ArrayList<>(); /** * pet status in the store @@ -122,7 +124,7 @@ public Pet category(@Nullable Category category) { * Get category * @return category */ - + @Valid @JsonProperty("category") public @Nullable Category getCategory() { return category; @@ -142,7 +144,7 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; @@ -170,7 +172,7 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull + @NotNull @JsonProperty("photoUrls") public Set getPhotoUrls() { return photoUrls; @@ -182,7 +184,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -199,14 +201,14 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - + @Valid @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } @JsonProperty("tags") - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2d634c9b61c..80564f3a5be2 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index e4816ae9d185..5ae2f199668f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java index b53f1e998ced..d97e23150291 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java @@ -8,7 +8,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java index 60070f1058ac..b998490999cb 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java index 84f05c9549d2..db0a1a614d8f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -32,7 +34,7 @@ public class TypeHolderDefault { private Boolean boolItem = true; - + @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { @@ -59,7 +61,7 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull + @NotNull @JsonProperty("string_item") public String getStringItem() { return stringItem; @@ -79,7 +81,7 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -99,7 +101,7 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -119,7 +121,7 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -147,7 +149,7 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull + @NotNull @JsonProperty("array_item") public List getArrayItem() { return arrayItem; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java index f6a571f7a059..3f03a89f8aa9 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -34,7 +36,7 @@ public class TypeHolderExample { private Boolean boolItem; - + @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { @@ -62,7 +64,7 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull + @NotNull @JsonProperty("string_item") public String getStringItem() { return stringItem; @@ -82,7 +84,7 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -102,7 +104,7 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull + @NotNull @JsonProperty("float_item") public Float getFloatItem() { return floatItem; @@ -122,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -142,7 +144,7 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -170,7 +172,7 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull + @NotNull @JsonProperty("array_item") public List getArrayItem() { return arrayItem; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java index 6804a2c4c7fd..e1f91ca69689 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java @@ -7,7 +7,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java index d48283aeff89..9db26dbddb5c 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java @@ -11,7 +11,9 @@ import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.hibernate.validator.constraints.*; import java.util.*; @@ -32,7 +34,7 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - + @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -43,10 +45,10 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - + @Valid private List nameArray = new ArrayList<>(); - + @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -57,10 +59,10 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - + @Valid private List prefixArray = new ArrayList<>(); - + @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -71,10 +73,10 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - + @Valid private List namespaceArray = new ArrayList<>(); - + @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -85,10 +87,10 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - + @Valid private List prefixNsArray = new ArrayList<>(); - + @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { @@ -120,7 +122,7 @@ public XmlItem attributeNumber(@Nullable BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - + @Valid @JsonProperty("attribute_number") public @Nullable BigDecimal getAttributeNumber() { return attributeNumber; @@ -228,7 +230,7 @@ public XmlItem nameNumber(@Nullable BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - + @Valid @JsonProperty("name_number") public @Nullable BigDecimal getNameNumber() { return nameNumber; @@ -364,7 +366,7 @@ public XmlItem prefixNumber(@Nullable BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - + @Valid @JsonProperty("prefix_number") public @Nullable BigDecimal getPrefixNumber() { return prefixNumber; @@ -500,7 +502,7 @@ public XmlItem namespaceNumber(@Nullable BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - + @Valid @JsonProperty("namespace_number") public @Nullable BigDecimal getNamespaceNumber() { return namespaceNumber; @@ -636,7 +638,7 @@ public XmlItem prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - + @Valid @JsonProperty("prefix_ns_number") public @Nullable BigDecimal getPrefixNsNumber() { return prefixNsNumber; From dcf3e8fbf8bc73c1a49d4580cac3335ca814afb8 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Wed, 18 Mar 2026 13:30:07 +0100 Subject: [PATCH 13/17] add conditional dependency for spring-boot-starter-validation based on performBeanValidation flag --- .../libraries/spring-http-interface/pom-sb3.mustache | 6 ++++++ .../libraries/spring-http-interface/pom-sb4.mustache | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb3.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb3.mustache index 3f043bafe2ba..8a386a869e0a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb3.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb3.mustache @@ -102,6 +102,12 @@ spring-boot-starter-validation {{/useBeanValidation}} + {{^useBeanValidation}}{{#performBeanValidation}} + + org.springframework.boot + spring-boot-starter-validation + + {{/performBeanValidation}}{{/useBeanValidation}} org.springframework.boot spring-boot-starter-test diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache index 215a634d064c..3d42e48338a3 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/pom-sb4.mustache @@ -104,6 +104,12 @@ spring-boot-starter-validation {{/useBeanValidation}} + {{^useBeanValidation}}{{#performBeanValidation}} + + org.springframework.boot + spring-boot-starter-validation + + {{/performBeanValidation}}{{/useBeanValidation}} org.springframework.boot spring-boot-starter-{{#reactive}}web{{/reactive}}{{^reactive}}rest{{/reactive}}client-test From ac13f638d5f652c33afa51f5d04cd1ee131b15c6 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Wed, 18 Mar 2026 13:49:17 +0100 Subject: [PATCH 14/17] remove unnecessary @Valid annotations from model classes --- .../src/main/resources/JavaSpring/pojo.mustache | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../spring-http-interface-bean-validation/pom.xml | 1 + .../openapitools/model/AdditionalPropertiesClassDto.java | 8 -------- .../openapitools/model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayOfNumberOnlyDto.java | 1 - .../main/java/org/openapitools/model/ArrayTestDto.java | 3 --- .../org/openapitools/model/ContainerDefaultValueDto.java | 4 ---- .../main/java/org/openapitools/model/EnumArraysDto.java | 1 - .../org/openapitools/model/FileSchemaTestClassDto.java | 1 - .../src/main/java/org/openapitools/model/MapTestDto.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClassDto.java | 1 - .../org/openapitools/model/NullableMapPropertyDto.java | 1 - .../src/main/java/org/openapitools/model/PetDto.java | 2 -- .../org/openapitools/model/TypeHolderDefaultDto.java | 1 - .../org/openapitools/model/TypeHolderExampleDto.java | 1 - .../src/main/java/org/openapitools/model/XmlItemDto.java | 9 --------- .../spring-http-interface-noResponseEntity/pom.xml | 1 + .../openapitools/model/AdditionalPropertiesClassDto.java | 8 -------- .../openapitools/model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayOfNumberOnlyDto.java | 1 - .../main/java/org/openapitools/model/ArrayTestDto.java | 3 --- .../org/openapitools/model/ContainerDefaultValueDto.java | 4 ---- .../main/java/org/openapitools/model/EnumArraysDto.java | 1 - .../org/openapitools/model/FileSchemaTestClassDto.java | 1 - .../src/main/java/org/openapitools/model/MapTestDto.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClassDto.java | 1 - .../org/openapitools/model/NullableMapPropertyDto.java | 1 - .../src/main/java/org/openapitools/model/PetDto.java | 2 -- .../org/openapitools/model/TypeHolderDefaultDto.java | 1 - .../org/openapitools/model/TypeHolderExampleDto.java | 1 - .../src/main/java/org/openapitools/model/XmlItemDto.java | 9 --------- .../pom.xml | 1 + .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../pom.xml | 1 + .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../petstore/spring-http-interface-reactive/pom.xml | 1 + .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../petstore/spring-http-interface-springboot-4/pom.xml | 1 + .../openapitools/model/AdditionalPropertiesClassDto.java | 8 -------- .../openapitools/model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayOfNumberOnlyDto.java | 1 - .../main/java/org/openapitools/model/ArrayTestDto.java | 3 --- .../org/openapitools/model/ContainerDefaultValueDto.java | 4 ---- .../main/java/org/openapitools/model/EnumArraysDto.java | 1 - .../org/openapitools/model/FileSchemaTestClassDto.java | 1 - .../src/main/java/org/openapitools/model/MapTestDto.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClassDto.java | 1 - .../org/openapitools/model/NullableMapPropertyDto.java | 1 - .../src/main/java/org/openapitools/model/PetDto.java | 2 -- .../org/openapitools/model/TypeHolderDefaultDto.java | 1 - .../org/openapitools/model/TypeHolderExampleDto.java | 1 - .../src/main/java/org/openapitools/model/XmlItemDto.java | 9 --------- .../pom.xml | 1 + .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- samples/client/petstore/spring-http-interface/pom.xml | 1 + .../openapitools/model/AdditionalPropertiesClassDto.java | 8 -------- .../openapitools/model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayOfNumberOnlyDto.java | 1 - .../main/java/org/openapitools/model/ArrayTestDto.java | 3 --- .../org/openapitools/model/ContainerDefaultValueDto.java | 4 ---- .../main/java/org/openapitools/model/EnumArraysDto.java | 1 - .../org/openapitools/model/FileSchemaTestClassDto.java | 1 - .../src/main/java/org/openapitools/model/MapTestDto.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClassDto.java | 1 - .../org/openapitools/model/NullableMapPropertyDto.java | 1 - .../src/main/java/org/openapitools/model/PetDto.java | 2 -- .../org/openapitools/model/TypeHolderDefaultDto.java | 1 - .../org/openapitools/model/TypeHolderExampleDto.java | 1 - .../src/main/java/org/openapitools/model/XmlItemDto.java | 9 --------- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../org/openapitools/model/ObjectWithUniqueItems.java | 4 ---- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClassDto.java | 8 -------- .../openapitools/model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayOfNumberOnlyDto.java | 1 - .../main/java/org/openapitools/model/ArrayTestDto.java | 3 --- .../org/openapitools/model/ContainerDefaultValueDto.java | 4 ---- .../main/java/org/openapitools/model/EnumArraysDto.java | 1 - .../org/openapitools/model/FileSchemaTestClassDto.java | 1 - .../src/main/java/org/openapitools/model/MapTestDto.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClassDto.java | 1 - .../org/openapitools/model/NullableMapPropertyDto.java | 1 - .../src/main/java/org/openapitools/model/PetDto.java | 2 -- .../org/openapitools/model/TypeHolderDefaultDto.java | 1 - .../org/openapitools/model/TypeHolderExampleDto.java | 1 - .../src/main/java/org/openapitools/model/XmlItemDto.java | 9 --------- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../openapitools/model/AdditionalPropertiesClass.java | 8 -------- .../org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 1 - .../java/org/openapitools/model/ArrayOfNumberOnly.java | 1 - .../src/main/java/org/openapitools/model/ArrayTest.java | 3 --- .../org/openapitools/model/ContainerDefaultValue.java | 4 ---- .../src/main/java/org/openapitools/model/EnumArrays.java | 1 - .../java/org/openapitools/model/FileSchemaTestClass.java | 1 - .../src/main/java/org/openapitools/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../java/org/openapitools/model/NullableMapProperty.java | 1 - .../src/main/java/org/openapitools/model/Pet.java | 2 -- .../java/org/openapitools/model/TypeHolderDefault.java | 1 - .../java/org/openapitools/model/TypeHolderExample.java | 1 - .../src/main/java/org/openapitools/model/XmlItem.java | 9 --------- .../virtualan/model/AdditionalPropertiesClass.java | 8 -------- .../virtualan/model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/virtualan/model/ArrayOfNumberOnly.java | 1 - .../java/org/openapitools/virtualan/model/ArrayTest.java | 3 --- .../virtualan/model/ContainerDefaultValue.java | 4 ---- .../org/openapitools/virtualan/model/EnumArrays.java | 1 - .../virtualan/model/FileSchemaTestClass.java | 1 - .../java/org/openapitools/virtualan/model/MapTest.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClass.java | 1 - .../virtualan/model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/virtualan/model/Pet.java | 2 -- .../openapitools/virtualan/model/TypeHolderDefault.java | 1 - .../openapitools/virtualan/model/TypeHolderExample.java | 1 - .../java/org/openapitools/virtualan/model/XmlItem.java | 9 --------- .../openapitools/model/AdditionalPropertiesClassDto.java | 2 -- .../openapitools/model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayOfNumberOnlyDto.java | 1 - .../main/java/org/openapitools/model/ArrayTestDto.java | 3 --- .../main/java/org/openapitools/model/EnumArraysDto.java | 1 - .../model/FakeBigDecimalMap200ResponseDto.java | 1 - .../org/openapitools/model/FileSchemaTestClassDto.java | 1 - .../src/main/java/org/openapitools/model/MapTestDto.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClassDto.java | 1 - .../java/org/openapitools/model/NullableClassDto.java | 6 ------ .../model/ObjectWithDeprecatedFieldsDto.java | 1 - .../src/main/java/org/openapitools/model/PetDto.java | 2 -- .../openapitools/model/AdditionalPropertiesClassDto.java | 8 -------- .../openapitools/model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayOfNumberOnlyDto.java | 1 - .../main/java/org/openapitools/model/ArrayTestDto.java | 3 --- .../org/openapitools/model/ContainerDefaultValueDto.java | 4 ---- .../main/java/org/openapitools/model/EnumArraysDto.java | 1 - .../org/openapitools/model/FileSchemaTestClassDto.java | 1 - .../src/main/java/org/openapitools/model/MapTestDto.java | 4 ---- .../MixedPropertiesAndAdditionalPropertiesClassDto.java | 1 - .../org/openapitools/model/NullableMapPropertyDto.java | 1 - .../src/main/java/org/openapitools/model/PetDto.java | 2 -- .../org/openapitools/model/TypeHolderDefaultDto.java | 1 - .../org/openapitools/model/TypeHolderExampleDto.java | 1 - .../src/main/java/org/openapitools/model/XmlItemDto.java | 9 --------- 431 files changed, 8 insertions(+), 1123 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index f76cf70a7b59..43c075ac5d4a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -65,7 +65,6 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} @Deprecated {{/deprecated}} {{#isContainer}} - {{#useBeanValidation}}@Valid{{/useBeanValidation}} {{#openApiNullable}} private {{>nullableAnnotation}}{{#isNullable}}{{>nullableDataTypeBeanValidation}} {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined();{{/isNullable}}{{^required}}{{^isNullable}}{{>nullableDataTypeBeanValidation}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/isNullable}}{{/required}}{{#required}}{{^isNullable}}{{>nullableDataTypeBeanValidation}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/isNullable}}{{/required}} {{/openApiNullable}} diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java index 07c6e38aa52c..96eb50848308 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java @@ -36,10 +36,8 @@ public class Pet { private JsonNullable name = JsonNullable.undefined(); @Deprecated - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java index 5c87f13202bf..ea4c737bbeb0 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java @@ -36,10 +36,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java index 16bb5cc9d495..b87f3ce119df 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java @@ -36,10 +36,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 5c87f13202bf..ea4c737bbeb0 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -36,10 +36,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/pom.xml b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml index 70659c693ce6..9612ffaf6f1b 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/pom.xml +++ b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml @@ -71,6 +71,7 @@ org.springframework.boot spring-boot-starter-validation + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 1bb37b8ce0d6..4cff4e770c54 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 65bba6dae4b8..fc35247dece9 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index 17b7905a72d8..354833c5fb5f 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java index 7ab609f9d5b2..4ad75f1e94b4 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index b0ed0b431015..60b9acd16233 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValueDto { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValueDto() { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java index a17c392bf06a..c525dbe3ff84 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index 8dacb47b7983..884f71c55389 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -29,7 +29,6 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - @Valid private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java index ae5f9e49463e..380cebd50c1e 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index d0a312f0ee30..ebbe6b63d343 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 8ec0fb4e8482..7cf3c2e5ffac 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapPropertyDto { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapPropertyDto languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java index e11364245746..c5d4a864d1e8 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java @@ -38,10 +38,8 @@ public class PetDto { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid TagDto> tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 6d32f5d0c97b..ee98b3feb815 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -35,7 +35,6 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index e8033ec7e6c6..12abfa076222 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -37,7 +37,6 @@ public class TypeHolderExampleDto { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java index 513e6c363b6d..6f28a0da99a6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java @@ -35,7 +35,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml b/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml index 877bb4bb4ab2..87da479a318d 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml @@ -67,6 +67,7 @@ jackson-databind-nullable 0.2.9 + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index bd8116825e06..55d33f199031 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - private Map mapString = new HashMap<>(); - private Map mapNumber = new HashMap<>(); - private Map mapInteger = new HashMap<>(); - private Map mapBoolean = new HashMap<>(); - private Map> mapArrayInteger = new HashMap<>(); - private Map> mapArrayAnytype = new HashMap<>(); - private Map> mapMapString = new HashMap<>(); - private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 322c7d51d232..47f446d97d87 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index e554dec5aeb6..77ab5da2449d 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayTestDto.java index 9c6ab174ff14..3a1769b32954 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 5fb6cea84bae..0d0665bd25d4 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValueDto { - private JsonNullable> nullableArray = JsonNullable.>undefined(); - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - private List requiredArray = new ArrayList<>(); - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValueDto() { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/EnumArraysDto.java index 6b6cc2ffb304..c3899cdd5241 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index d6a0651a7953..df1e7142039e 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -28,7 +28,6 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - private List files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/MapTestDto.java index 0b9be76c2ec7..7f932a2202ad 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/MapTestDto.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { - private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - private Map mapOfEnumString = new HashMap<>(); - private Map directMap = new HashMap<>(); - private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index f43820540c2e..1a06de94b575 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index e19da72c6e06..3aab8f7bb33f 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapPropertyDto { - private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapPropertyDto languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/PetDto.java index 1a24ec243aa3..8c1b025ce571 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/PetDto.java @@ -37,10 +37,8 @@ public class PetDto { private String name; - private Set photoUrls = new LinkedHashSet<>(); - private List tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index a8f4e4e1fd51..0958f2719813 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -34,7 +34,6 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index c32ef471e305..61d0aedddf8a 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -36,7 +36,6 @@ public class TypeHolderExampleDto { private Boolean boolItem; - private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/XmlItemDto.java index 3ec5c601684a..2cb1bc0f129b 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/XmlItemDto.java @@ -34,7 +34,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml index e4f704fcbb5c..8f0ecb18ff34 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml @@ -71,6 +71,7 @@ org.springframework.boot spring-boot-starter-validation + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfed02769a70..dd63bf185b8e 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,28 +28,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 163c4f34c17c..e9baa32e4c6b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 555737e47ace..f45270151fe2 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java index b05b1469edef..9ef5cb255b11 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.java @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 7850d535fac2..2bc66b0e0ea2 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -26,16 +26,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java index 62071fddd645..aafa05beed09 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java @@ -97,7 +97,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c328c0252411..1dd74d4a72cd 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -27,7 +27,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java index bc5042b64bd4..24fab6fd3041 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +61,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d99e4a6f6178..5105a8c44f8b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -32,7 +32,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java index 8e8815254789..0f6fcac4a6c9 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java index 30459ad6b39c..727ec2b668e9 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java @@ -36,10 +36,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java index c42dc5da2439..d80f1f6fd944 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -33,7 +33,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java index 0b02ebb4c5ae..59bc9b01de48 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -35,7 +35,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java index cfb9f948a335..f04ebe0bcf25 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java @@ -33,7 +33,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -44,10 +43,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -58,10 +55,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -72,10 +67,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -86,10 +79,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/pom.xml b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/pom.xml index c76e0e85dde0..0f5bb46efa98 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/pom.xml +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/pom.xml @@ -67,6 +67,7 @@ jackson-databind-nullable 0.2.9 + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 79f0d803e95d..99274716c2ea 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -27,28 +27,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - private Map mapString = new HashMap<>(); - private Map mapNumber = new HashMap<>(); - private Map mapInteger = new HashMap<>(); - private Map mapBoolean = new HashMap<>(); - private Map> mapArrayInteger = new HashMap<>(); - private Map> mapArrayAnytype = new HashMap<>(); - private Map> mapMapString = new HashMap<>(); - private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 18a388023448..1ce2e0be53ac 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 0950f897120e..8e366ff57b4b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java index a7ed1c8651d7..d2ddf0e9bbcd 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java @@ -24,13 +24,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 49c05354cc12..8a7ce1e41681 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -25,16 +25,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - private JsonNullable> nullableArray = JsonNullable.>undefined(); - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - private List requiredArray = new ArrayList<>(); - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java index e3d6d1d01adb..61b4653d40b4 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java @@ -96,7 +96,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 75c3385d02d5..f3e4bdad6b98 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,7 +26,6 @@ public class FileSchemaTestClass { private @Nullable File file; - private List files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java index 95d30de86bb9..619ff5f91a45 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - private Map> mapMapOfString = new HashMap<>(); /** @@ -61,13 +60,10 @@ public static InnerEnum fromValue(String value) { } } - private Map mapOfEnumString = new HashMap<>(); - private Map directMap = new HashMap<>(); - private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6e681ebeddf3..47d3c72804e5 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -31,7 +31,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java index 0012f126580c..c5edd6dc2f1e 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java index a90496ee0ab1..c9cb2fee90a3 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - private Set photoUrls = new LinkedHashSet<>(); - private List tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java index 84f05c9549d2..55898fe6822b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -32,7 +32,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java index f6a571f7a059..b9643e2cfd19 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -34,7 +34,6 @@ public class TypeHolderExample { private Boolean boolItem; - private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java index d48283aeff89..dfe81722de3b 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java @@ -32,7 +32,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -43,10 +42,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -57,10 +54,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -71,10 +66,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -85,10 +78,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/client/petstore/spring-http-interface-reactive/pom.xml b/samples/client/petstore/spring-http-interface-reactive/pom.xml index d1730827004b..095f08d331ef 100644 --- a/samples/client/petstore/spring-http-interface-reactive/pom.xml +++ b/samples/client/petstore/spring-http-interface-reactive/pom.xml @@ -67,6 +67,7 @@ jackson-databind-nullable 0.2.9 + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 79f0d803e95d..99274716c2ea 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -27,28 +27,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - private Map mapString = new HashMap<>(); - private Map mapNumber = new HashMap<>(); - private Map mapInteger = new HashMap<>(); - private Map mapBoolean = new HashMap<>(); - private Map> mapArrayInteger = new HashMap<>(); - private Map> mapArrayAnytype = new HashMap<>(); - private Map> mapMapString = new HashMap<>(); - private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 18a388023448..1ce2e0be53ac 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 0950f897120e..8e366ff57b4b 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayTest.java index a7ed1c8651d7..d2ddf0e9bbcd 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -24,13 +24,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 49c05354cc12..8a7ce1e41681 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -25,16 +25,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - private JsonNullable> nullableArray = JsonNullable.>undefined(); - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - private List requiredArray = new ArrayList<>(); - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumArrays.java index e3d6d1d01adb..61b4653d40b4 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -96,7 +96,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 75c3385d02d5..f3e4bdad6b98 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,7 +26,6 @@ public class FileSchemaTestClass { private @Nullable File file; - private List files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MapTest.java index 95d30de86bb9..619ff5f91a45 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -23,7 +23,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - private Map> mapMapOfString = new HashMap<>(); /** @@ -61,13 +60,10 @@ public static InnerEnum fromValue(String value) { } } - private Map mapOfEnumString = new HashMap<>(); - private Map directMap = new HashMap<>(); - private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6e681ebeddf3..47d3c72804e5 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -31,7 +31,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java index 0012f126580c..c5edd6dc2f1e 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java index a90496ee0ab1..c9cb2fee90a3 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - private Set photoUrls = new LinkedHashSet<>(); - private List tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 84f05c9549d2..55898fe6822b 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -32,7 +32,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index f6a571f7a059..b9643e2cfd19 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -34,7 +34,6 @@ public class TypeHolderExample { private Boolean boolItem; - private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/XmlItem.java index d48283aeff89..dfe81722de3b 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -32,7 +32,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -43,10 +42,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -57,10 +54,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -71,10 +66,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -85,10 +78,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/pom.xml b/samples/client/petstore/spring-http-interface-springboot-4/pom.xml index c056f32dd505..33e8d367e653 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/pom.xml +++ b/samples/client/petstore/spring-http-interface-springboot-4/pom.xml @@ -62,6 +62,7 @@ org.springframework.boot spring-boot-starter-validation + org.springframework.boot spring-boot-starter-restclient-test diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index d58c562a0871..1167a9458891 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -27,28 +27,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 33e3b14a22bc..50618248c977 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index 356ef1d1cb02..277b82e92d9d 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java index c95df50aec86..7c854a1c25f0 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index f6820c1073bc..eae4185dd8c0 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -26,16 +26,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValueDto { - @Valid private @Nullable List nullableArray; - @Valid private List nullableRequiredArray; - @Valid private List requiredArray = new ArrayList<>(); - @Valid private @Nullable List nullableArrayWithDefault = new ArrayList<>(Arrays.asList("foo", "bar")); public ContainerDefaultValueDto() { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java index 6849ead00651..2d2aef1975df 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index 5433077b863f..4fbb1b067a83 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -29,7 +29,6 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - @Valid private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java index 8f1f417756b0..b73cc11619c1 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index 9595219f2658..0128e5046bef 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 629adb4075cd..aca49f8d8fca 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapPropertyDto { - @Valid private @Nullable Map languageValues; public NullableMapPropertyDto languageValues(@Nullable Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java index 30546ed17076..9357c60c8e42 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java @@ -38,10 +38,8 @@ public class PetDto { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid TagDto> tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 4a996ef30260..7cc5313bc37f 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -35,7 +35,6 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index ed50ce827bfb..7b6b5ce66f61 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -37,7 +37,6 @@ public class TypeHolderExampleDto { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java index d37d7ee2df1e..c63429642919 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java @@ -35,7 +35,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml index d16a81e73f46..e19ec5b2a81e 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml @@ -71,6 +71,7 @@ org.springframework.boot spring-boot-starter-validation + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 7b035d34d2e6..3ed06a6c8bdf 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 116141647a71..3f6d2ab7a0db 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8c554fc1f868..82687dedc0e2 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java index 11f483cf5001..2b89daf5c06c 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java index e41eebc6322f..a90ccf6e6462 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java index f3dd3e44b9db..836dac0a4be3 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8507f1bebd2c..525dd3bcdc65 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -28,7 +28,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java index f9cd434aacc7..1a443a758ce3 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index c4545b491c3f..80d8aac4f55f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java index a2c86dff63b3..2f1cbb8d1260 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java index f5c928265b23..03cf74186c04 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java @@ -37,10 +37,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java index db0a1a614d8f..c8fd143516e4 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -34,7 +34,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java index 3f03a89f8aa9..29b33e5a7a0b 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -36,7 +36,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java index 9db26dbddb5c..a3cc66cf99c8 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/client/petstore/spring-http-interface/pom.xml b/samples/client/petstore/spring-http-interface/pom.xml index da42f71e5d16..b27c46da531d 100644 --- a/samples/client/petstore/spring-http-interface/pom.xml +++ b/samples/client/petstore/spring-http-interface/pom.xml @@ -67,6 +67,7 @@ jackson-databind-nullable 0.2.9 + org.springframework.boot spring-boot-starter-test diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index bd8116825e06..55d33f199031 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - private Map mapString = new HashMap<>(); - private Map mapNumber = new HashMap<>(); - private Map mapInteger = new HashMap<>(); - private Map mapBoolean = new HashMap<>(); - private Map> mapArrayInteger = new HashMap<>(); - private Map> mapArrayAnytype = new HashMap<>(); - private Map> mapMapString = new HashMap<>(); - private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 322c7d51d232..47f446d97d87 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index e554dec5aeb6..77ab5da2449d 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayTestDto.java index 9c6ab174ff14..3a1769b32954 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 5fb6cea84bae..0d0665bd25d4 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValueDto { - private JsonNullable> nullableArray = JsonNullable.>undefined(); - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - private List requiredArray = new ArrayList<>(); - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValueDto() { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumArraysDto.java index 6b6cc2ffb304..c3899cdd5241 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index d6a0651a7953..df1e7142039e 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -28,7 +28,6 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - private List files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MapTestDto.java index 0b9be76c2ec7..7f932a2202ad 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MapTestDto.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { - private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - private Map mapOfEnumString = new HashMap<>(); - private Map directMap = new HashMap<>(); - private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index f43820540c2e..1a06de94b575 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index e19da72c6e06..3aab8f7bb33f 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapPropertyDto { - private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapPropertyDto languageValues(Map languageValues) { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java index 1a24ec243aa3..8c1b025ce571 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java @@ -37,10 +37,8 @@ public class PetDto { private String name; - private Set photoUrls = new LinkedHashSet<>(); - private List tags = new ArrayList<>(); /** diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index a8f4e4e1fd51..0958f2719813 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -34,7 +34,6 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index c32ef471e305..61d0aedddf8a 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -36,7 +36,6 @@ public class TypeHolderExampleDto { private Boolean boolItem; - private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/XmlItemDto.java index 3ec5c601684a..2cb1bc0f129b 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/XmlItemDto.java @@ -34,7 +34,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java index f71de7e9dba7..6a87a77091a5 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -33,10 +33,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java index 4561fa62380a..48862aedc440 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java index ea1025927377..bbb271dd5a27 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -32,10 +32,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 06067f7a0c84..aa3a2665c461 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java index 06067f7a0c84..aa3a2665c461 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 3d7389bec4c9..1bac12e663aa 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index eeae40cafa74..c73b3c594f0c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 1b5d034f4ac8..153582404647 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java index 5951b8f4f981..ac3ccf502da6 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java index b309bf6cdae5..3a7b524247d2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java index 1c6836270e59..08c6c5b9f1b7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java index b1da5f0f051d..35611f98979e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -28,7 +28,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java index 0df5143e02ae..8a2a3b3af02c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index a2b9f47bf9ca..034620f31634 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java index c7d431471e4d..98948d7c0cd8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index 690f46430f12..7272bb0b5f33 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -37,10 +37,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java index 173ef598d332..d006c4756d10 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -34,7 +34,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java index 5cd52b78c6b8..54f803d2b34a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -36,7 +36,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java index bb65cd50c02f..e008947dc262 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index f28d8ab37276..7c77dc9d2251 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 06067f7a0c84..aa3a2665c461 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java index 06067f7a0c84..aa3a2665c461 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index 06067f7a0c84..aa3a2665c461 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java index 06067f7a0c84..aa3a2665c461 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java index cf499b2a97bd..733230f5e616 100644 --- a/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java @@ -42,10 +42,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java index cf499b2a97bd..733230f5e616 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java @@ -42,10 +42,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java index a96cfd7e3f8d..766fab5783da 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java @@ -41,10 +41,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 3d7389bec4c9..1bac12e663aa 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index eeae40cafa74..c73b3c594f0c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 1b5d034f4ac8..153582404647 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index 5951b8f4f981..ac3ccf502da6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 2386137fecb5..5b3730307fb4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index 1c6836270e59..08c6c5b9f1b7 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index b1da5f0f051d..35611f98979e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -28,7 +28,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 0df5143e02ae..8a2a3b3af02c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index a2b9f47bf9ca..034620f31634 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java index c7d431471e4d..98948d7c0cd8 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 5f1acaaec695..5113290147da 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -37,10 +37,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 858ed5d043b1..6685c29eef21 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -34,7 +34,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index c1d22cceb21c..d4a312107ab0 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -36,7 +36,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index bb65cd50c02f..e008947dc262 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 3d7389bec4c9..1bac12e663aa 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index eeae40cafa74..c73b3c594f0c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 1b5d034f4ac8..153582404647 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 5951b8f4f981..ac3ccf502da6 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 2386137fecb5..5b3730307fb4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index 1c6836270e59..08c6c5b9f1b7 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index b1da5f0f051d..35611f98979e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -28,7 +28,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 0df5143e02ae..8a2a3b3af02c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index a2b9f47bf9ca..034620f31634 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java index c7d431471e4d..98948d7c0cd8 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 5f1acaaec695..5113290147da 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -37,10 +37,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 858ed5d043b1..6685c29eef21 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -34,7 +34,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index c1d22cceb21c..d4a312107ab0 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -36,7 +36,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index bb65cd50c02f..e008947dc262 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java index 45029db1b343..629944defdb3 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java @@ -33,10 +33,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 06067f7a0c84..aa3a2665c461 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 3d7389bec4c9..1bac12e663aa 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index eeae40cafa74..c73b3c594f0c 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 1b5d034f4ac8..153582404647 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayTest.java index 5951b8f4f981..ac3ccf502da6 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 2386137fecb5..5b3730307fb4 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/EnumArrays.java index 1c6836270e59..08c6c5b9f1b7 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/EnumArrays.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/FileSchemaTestClass.java index b1da5f0f051d..35611f98979e 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -28,7 +28,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/MapTest.java index 0df5143e02ae..8a2a3b3af02c 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index a2b9f47bf9ca..034620f31634 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/NullableMapProperty.java index c7d431471e4d..98948d7c0cd8 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java index 5f1acaaec695..5113290147da 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java @@ -37,10 +37,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/TypeHolderDefault.java index 858ed5d043b1..6685c29eef21 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -34,7 +34,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/TypeHolderExample.java index c1d22cceb21c..d4a312107ab0 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -36,7 +36,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/XmlItem.java index bb65cd50c02f..e008947dc262 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java index f2e8ed721872..312266e6ae2d 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java @@ -32,16 +32,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ObjectWithUniqueItems { - @Valid private JsonNullable> nullSet = JsonNullable.>undefined(); - @Valid private Set notNullSet = new LinkedHashSet<>(); - @Valid private JsonNullable> nullList = JsonNullable.>undefined(); - @Valid private List notNullList = new ArrayList<>(); @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index d080f0ad9fd3..54bca882575f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 7b2cab3e5fcf..608a7123b513 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e9e5da8316b5..1811fc8358db 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index fb8e9f6e83d3..2f3b9af3a376 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 21fe2cdea231..14ab0e3ce867 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -25,16 +25,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private @Nullable List nullableArray; - @Valid private List nullableRequiredArray; - @Valid private List requiredArray = new ArrayList<>(); - @Valid private @Nullable List nullableArrayWithDefault = new ArrayList<>(Arrays.asList("foo", "bar")); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index 2e82d3d8de52..ba62b5f350b7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9d82b8fde8da..6cec7191adaf 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -28,7 +28,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index ff4aadfa9e0f..13cbb90abd0f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 0b0f33e3a468..2c10c0341e34 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NullableMapProperty.java index fcb0edf1b593..7b5bedfb0925 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private @Nullable Map languageValues; public NullableMapProperty languageValues(@Nullable Map languageValues) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index ace4c240a67a..806e94a62ea8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -37,10 +37,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 47801ca61574..413b2ac6dc89 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -34,7 +34,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index c4d9cd9bf862..319e196eb213 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -36,7 +36,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 072e0627d951..34fe1d0d6e08 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 2bb0e8bb4150..20619b589997 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 54bb741071ef..e1b5a75b99f1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java index bcc5f2a798bc..5c0ba6695770 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index b7ce9bec70a6..6229d6c06fc2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -38,10 +38,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index 4bfb01e8abcd..9fef503521d6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 2bb0e8bb4150..20619b589997 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 54bb741071ef..e1b5a75b99f1 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/NullableMapProperty.java index bcc5f2a798bc..5c0ba6695770 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java index b7ce9bec70a6..6229d6c06fc2 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java @@ -38,10 +38,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java index 4bfb01e8abcd..9fef503521d6 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 2bb0e8bb4150..20619b589997 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 54bb741071ef..e1b5a75b99f1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java index bcc5f2a798bc..5c0ba6695770 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index b7ce9bec70a6..6229d6c06fc2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -38,10 +38,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 4bfb01e8abcd..9fef503521d6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java index 5c87f13202bf..ea4c737bbeb0 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java @@ -36,10 +36,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 944678e51561..d90008edb907 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index b49f686174a4..aaa8b61cd80f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e9174032c546..1fe842a04853 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index 1b2c47a243d6..a53480bd20eb 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 4a6f618e8fe7..7cefff7272d4 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index e4b60450bded..13d6e6c1449f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 6840ba59e034..5942f2586e01 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index c91329d1cb33..2d72de5b6745 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 889f210352e8..b38ef659a718 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java index 2991d532abb1..36150fd93b49 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index f024e800ce47..85dc218869a5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -38,10 +38,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index b9ddddf1d832..85bc7f391df9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index 1ae9051a12e3..d45d9caaffb9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 1eccb0e87844..191b5c362ee2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem() { diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java index 45029db1b343..629944defdb3 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java @@ -33,10 +33,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 2bb0e8bb4150..20619b589997 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 54bb741071ef..e1b5a75b99f1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java index bcc5f2a798bc..5c0ba6695770 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index b7ce9bec70a6..6229d6c06fc2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -38,10 +38,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 4bfb01e8abcd..9fef503521d6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 306d4eec0e10..80805e4e3eae 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -32,28 +32,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 6d8c6c32ffbe..7185e4d227b7 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -29,7 +29,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index 24c8477e2dc3..98cd94687910 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -29,7 +29,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayTestDto.java index 9d02a230bbb9..9764a5f12d4b 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -29,13 +29,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 192c0533e805..46294ec40247 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -30,16 +30,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValueDto { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValueDto() { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/EnumArraysDto.java index 9b9538583b57..60996495ac78 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -101,7 +101,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index d6eab2a8876c..36370dde4c22 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -31,7 +31,6 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - @Valid private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/MapTestDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/MapTestDto.java index a4760272ba09..8565dcd536ab 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/MapTestDto.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -66,13 +65,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index 17b19984cebe..21e835561f80 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -36,7 +36,6 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 6be04c42bc2d..7e0d9ccb9974 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -30,7 +30,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapPropertyDto { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapPropertyDto languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java index 28a51738ca2d..6f2001ce7877 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java @@ -40,10 +40,8 @@ public class PetDto { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid TagDto> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index df7cfb007dd3..b6d83ddd1c11 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -37,7 +37,6 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index 0cbea4f3b99b..74fb361cf022 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -39,7 +39,6 @@ public class TypeHolderExampleDto { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/XmlItemDto.java index 8b9f4634ab67..216750135b41 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/XmlItemDto.java @@ -37,7 +37,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -48,10 +47,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -62,10 +59,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -76,10 +71,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -90,10 +83,8 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Pet.java index ab6c0eee0588..bc052e0d1915 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Pet.java @@ -56,7 +56,6 @@ public class Pet { @JsonProperty("photoUrls") @lombok.Builder.Default - @Valid private List photoUrls = new ArrayList<>(); @@ -64,7 +63,6 @@ public class Pet { @JsonProperty("tags") @lombok.Builder.Default - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java index f7c7676633f3..fb346b34b31d 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java @@ -40,10 +40,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java index 4561fa62380a..48862aedc440 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 2bb0e8bb4150..20619b589997 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 54bb741071ef..e1b5a75b99f1 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java index bcc5f2a798bc..5c0ba6695770 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java index b7ce9bec70a6..6229d6c06fc2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java @@ -38,10 +38,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java index 4bfb01e8abcd..9fef503521d6 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 2bb0e8bb4150..20619b589997 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 54bb741071ef..e1b5a75b99f1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java index bcc5f2a798bc..5c0ba6695770 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index b7ce9bec70a6..6229d6c06fc2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -38,10 +38,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 4bfb01e8abcd..9fef503521d6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 27c0ef4e9e94..1016376d3199 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -27,28 +27,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java index 329c1e3b1e8b..5c1575afe86d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 7b76228526e8..6b476e2dce1d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 27c0ef4e9e94..1016376d3199 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -27,28 +27,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java index 329c1e3b1e8b..5c1575afe86d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java index 7b76228526e8..6b476e2dce1d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 27c0ef4e9e94..1016376d3199 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -27,28 +27,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java index 329c1e3b1e8b..5c1575afe86d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 7b76228526e8..6b476e2dce1d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 27c0ef4e9e94..1016376d3199 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -27,28 +27,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 895f299988a1..ccb5f870de61 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index e7ce23c89bbe..273911fbe3b5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index 513e4803a07e..5b6f17fc0b91 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index 51bc8303094b..7720a4a1ae14 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5b4e1753fdbe..44457be7a391 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index 942e32302829..c00cfe809d2f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3bd85bd2cb19..9afeebbb36d1 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 329c1e3b1e8b..5c1575afe86d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -35,10 +35,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 7b76228526e8..6b476e2dce1d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 24392490e464..d6b05bc91093 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index aa2acf368944..d08411e992b2 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -46,10 +45,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -60,10 +57,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -74,10 +69,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -88,10 +81,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Pet.java index 2845ae04fe0f..9c019f2a4ee8 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Pet.java @@ -34,10 +34,8 @@ public class Pet { private String name; - @Valid private List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index a57529f15fc0..9f960cad739f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,28 +30,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Optional anytype1 = Optional.empty(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index d7709f15bb22..877dddecd6d3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 89c4dba8e12c..2f27347aa8e7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index 88965c7bc665..41fc5d904884 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -27,13 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 35de82f2f3ff..5acbb0c254b5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -28,16 +28,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index 8419f1de5aaf..f6404b5d99a1 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -99,7 +99,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index a6c07fe1ca79..bb8ae617bb03 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -29,7 +29,6 @@ public class FileSchemaTestClass { private Optional file = Optional.empty(); - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 8a5e09eedb5d..aa93a0a0d018 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -64,13 +63,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 368684ed1399..ba20b52af83f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -34,7 +34,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private Optional dateTime = Optional.empty(); - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java index eb057fb3c7b0..240ad2275f6a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 8b9c6efb8833..b110ee6e4da4 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -38,10 +38,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 1b98e49622bc..97020dc9bd5d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -35,7 +35,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index e9bf2dfb584c..84f18a91a263 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -37,7 +37,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 9b880e5187b6..dc9cae8a8696 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -35,7 +35,6 @@ public class XmlItem { private Optional attributeBoolean = Optional.empty(); - @Valid private List wrappedArray = new ArrayList<>(); private Optional nameString = Optional.empty(); @@ -46,10 +45,8 @@ public class XmlItem { private Optional nameBoolean = Optional.empty(); - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private Optional prefixString = Optional.empty(); @@ -60,10 +57,8 @@ public class XmlItem { private Optional prefixBoolean = Optional.empty(); - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private Optional namespaceString = Optional.empty(); @@ -74,10 +69,8 @@ public class XmlItem { private Optional namespaceBoolean = Optional.empty(); - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private Optional prefixNsString = Optional.empty(); @@ -88,10 +81,8 @@ public class XmlItem { private Optional prefixNsBoolean = Optional.empty(); - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index 2b8f06279d71..18a9c05fe5ee 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java index 1b9ef81d0d0e..266cb4e5df46 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java index 54a93c261a58..a488f164f4df 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java index c4469792cbe7..c37357b06026 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java index 6095189db99e..3dbcdf004ba3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValue() { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index 552c72b61123..6b316639f14c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -98,7 +98,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java index 51d981f3f753..96cbe5559ad9 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java @@ -28,7 +28,6 @@ public class FileSchemaTestClass { private @Nullable File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(@Nullable File file) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index ba7508fb4aee..d3cf7a00c01b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java index b248888a4d98..6aa7342ece3b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,7 +33,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java index e94a6c7decda..79e491fcdf37 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapProperty { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapProperty languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index c327bf760e87..a4210fe656fd 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -37,10 +37,8 @@ public class Pet { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index 9d6d9750700c..1a4f0a995e71 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -34,7 +34,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index bfb91bc15802..8d953537ec25 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -36,7 +36,6 @@ public class TypeHolderExample { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExample() { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java index 41349ff5d807..42062e52ea08 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 230713df06f5..4e1ba751e6ca 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -27,10 +27,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - @Valid private Map mapProperty = new HashMap<>(); - @Valid private Map> mapOfMapProperty = new HashMap<>(); public AdditionalPropertiesClassDto mapProperty(Map mapProperty) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 6d8c6c32ffbe..7185e4d227b7 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -29,7 +29,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index 24c8477e2dc3..98cd94687910 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -29,7 +29,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayTestDto.java index 5a5737e977a3..2f89184883ec 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -29,13 +29,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/EnumArraysDto.java index 9b9538583b57..60996495ac78 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -101,7 +101,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/FakeBigDecimalMap200ResponseDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/FakeBigDecimalMap200ResponseDto.java index e0ccf52ed3a7..cc6e3b0b204e 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/FakeBigDecimalMap200ResponseDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/FakeBigDecimalMap200ResponseDto.java @@ -30,7 +30,6 @@ public class FakeBigDecimalMap200ResponseDto { private @Nullable BigDecimal someId; - @Valid private Map someMap = new HashMap<>(); public FakeBigDecimalMap200ResponseDto someId(@Nullable BigDecimal someId) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index d6eab2a8876c..36370dde4c22 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -31,7 +31,6 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - @Valid private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/MapTestDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/MapTestDto.java index a4760272ba09..8565dcd536ab 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/MapTestDto.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -66,13 +65,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index 17b19984cebe..21e835561f80 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -36,7 +36,6 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/NullableClassDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/NullableClassDto.java index 718d6edbc728..1382e2055a58 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/NullableClassDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/NullableClassDto.java @@ -54,22 +54,16 @@ public class NullableClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private JsonNullable datetimeProp = JsonNullable.undefined(); - @Valid private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); - @Valid private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); - @Valid private List arrayItemsNullable = new ArrayList<>(); - @Valid private JsonNullable> objectNullableProp = JsonNullable.>undefined(); - @Valid private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); - @Valid private Map objectItemsNullable = new HashMap<>(); public NullableClassDto integerProp(Integer integerProp) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java index 1f4ff338b745..be67f2d42289 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java @@ -39,7 +39,6 @@ public class ObjectWithDeprecatedFieldsDto { private @Nullable DeprecatedObjectDto deprecatedRef; @Deprecated - @Valid private List bars = new ArrayList<>(); public ObjectWithDeprecatedFieldsDto uuid(@Nullable String uuid) { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/PetDto.java index 89bbd11e2d78..cf1ecaa4b54b 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/PetDto.java @@ -40,10 +40,8 @@ public class PetDto { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid TagDto> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 306d4eec0e10..80805e4e3eae 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -32,28 +32,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private @Nullable Object anytype1; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 6d8c6c32ffbe..7185e4d227b7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -29,7 +29,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index 24c8477e2dc3..98cd94687910 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -29,7 +29,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTestDto.java index 9d02a230bbb9..9764a5f12d4b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -29,13 +29,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ArrayTestDto { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 192c0533e805..46294ec40247 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -30,16 +30,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class ContainerDefaultValueDto { - @Valid private JsonNullable> nullableArray = JsonNullable.>undefined(); - @Valid private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); - @Valid private List requiredArray = new ArrayList<>(); - @Valid private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); public ContainerDefaultValueDto() { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArraysDto.java index 9b9538583b57..60996495ac78 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -101,7 +101,6 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index d6eab2a8876c..36370dde4c22 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -31,7 +31,6 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - @Valid private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTestDto.java index a4760272ba09..8565dcd536ab 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTestDto.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -66,13 +65,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index 17b19984cebe..21e835561f80 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -36,7 +36,6 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime dateTime; - @Valid private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 6be04c42bc2d..7e0d9ccb9974 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -30,7 +30,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class NullableMapPropertyDto { - @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); public NullableMapPropertyDto languageValues(Map languageValues) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java index 28a51738ca2d..6f2001ce7877 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java @@ -40,10 +40,8 @@ public class PetDto { private String name; - @Valid private Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid TagDto> tags = new ArrayList<>(); /** diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index df7cfb007dd3..b6d83ddd1c11 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -37,7 +37,6 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - @Valid private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index 0cbea4f3b99b..74fb361cf022 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -39,7 +39,6 @@ public class TypeHolderExampleDto { private Boolean boolItem; - @Valid private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java index 8b9f4634ab67..216750135b41 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java @@ -37,7 +37,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -48,10 +47,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -62,10 +59,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -76,10 +71,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -90,10 +83,8 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { From a38fd1bd9bb52f4271b213db67f97f8795fe69fb Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Wed, 18 Mar 2026 14:01:09 +0100 Subject: [PATCH 15/17] add @JsonTypeName where appropriate --- .../src/main/resources/JavaSpring/pojo.mustache | 5 +++++ .../src/main/java/org/openapitools/model/CatDto.java | 1 + .../src/main/java/org/openapitools/model/CatDto.java | 1 + .../src/main/java/org/openapitools/model/CatDto.java | 1 + .../src/main/java/org/openapitools/model/CatDto.java | 1 + .../src/main/java/org/openapitools/model/CatDto.java | 1 + .../src/main/java/org/openapitools/model/CatDto.java | 1 + .../src/main/java/org/openapitools/model/DogDto.java | 1 + .../src/main/java/org/openapitools/model/CatDto.java | 1 + 9 files changed, 13 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 43c075ac5d4a..9ec54c356474 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -21,9 +21,14 @@ {{/discriminator}} {{#jackson}} {{#isClassnameSanitized}} +{{#parent}} +@JsonTypeName("{{name}}") +{{/parent}} +{{^parent}} {{^hasDiscriminatorWithNonEmptyMapping}} @JsonTypeName("{{name}}") {{/hasDiscriminatorWithNonEmptyMapping}} +{{/parent}} {{/isClassnameSanitized}} {{/jackson}} {{#withXml}} diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java index 0bc8d14312ad..324d328453b6 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java @@ -32,6 +32,7 @@ @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") }) +@JsonTypeName("Cat") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CatDto extends AnimalDto { diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/CatDto.java index 88fbb22d8dbc..0cfe64e6ab58 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/CatDto.java @@ -31,6 +31,7 @@ @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") }) +@JsonTypeName("Cat") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CatDto extends AnimalDto { diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java index 116586a811dd..5001ac1a5b7e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java @@ -32,6 +32,7 @@ @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") }) +@JsonTypeName("Cat") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CatDto extends AnimalDto { diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java index 88fbb22d8dbc..0cfe64e6ab58 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java @@ -31,6 +31,7 @@ @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") }) +@JsonTypeName("Cat") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CatDto extends AnimalDto { diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/CatDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/CatDto.java index 7a9284f34aaa..908727a8de69 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/CatDto.java @@ -34,6 +34,7 @@ @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") }) +@JsonTypeName("Cat") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CatDto extends AnimalDto { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/CatDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/CatDto.java index 507bad9c4148..a951eccf1a3c 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/CatDto.java @@ -26,6 +26,7 @@ */ +@JsonTypeName("Cat") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CatDto extends AnimalDto { diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/DogDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/DogDto.java index 538f8de5a685..b7a132b395d6 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/DogDto.java @@ -26,6 +26,7 @@ */ +@JsonTypeName("Dog") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class DogDto extends AnimalDto { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java index 7a9284f34aaa..908727a8de69 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java @@ -34,6 +34,7 @@ @JsonSubTypes.Type(value = BigCatDto.class, name = "BigCat") }) +@JsonTypeName("Cat") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") public class CatDto extends AnimalDto { From 1b4b7903c465ea5071f5f180b4264ec9538b9d01 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Wed, 18 Mar 2026 14:13:33 +0100 Subject: [PATCH 16/17] prevent NPE --- .../src/main/resources/JavaSpring/pojo.mustache | 4 ++-- .../org/openapitools/model/ContainerDefaultValueDto.java | 6 +++--- .../org/openapitools/model/NullableMapPropertyDto.java | 2 +- .../org/openapitools/model/ContainerDefaultValueDto.java | 6 +++--- .../org/openapitools/model/NullableMapPropertyDto.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValueDto.java | 6 +++--- .../org/openapitools/model/NullableMapPropertyDto.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ObjectWithUniqueItems.java | 4 ++-- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValueDto.java | 6 +++--- .../org/openapitools/model/NullableMapPropertyDto.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../org/openapitools/model/ContainerDefaultValue.java | 6 +++--- .../java/org/openapitools/model/NullableMapProperty.java | 2 +- .../virtualan/model/ContainerDefaultValue.java | 6 +++--- .../openapitools/virtualan/model/NullableMapProperty.java | 2 +- .../java/org/openapitools/model/NullableClassDto.java | 8 ++++---- .../org/openapitools/model/ContainerDefaultValueDto.java | 6 +++--- .../org/openapitools/model/NullableMapPropertyDto.java | 2 +- 47 files changed, 96 insertions(+), 96 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 9ec54c356474..c0adc47eec2c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -161,7 +161,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { {{#openApiNullable}} - if (this.{{name}} == null{{#isNullable}} || !this.{{name}}.isPresent(){{/isNullable}}) { + if (this.{{name}} == null{{#isNullable}} || !this.{{name}}.isPresent() || this.{{name}}.get() == null{{/isNullable}}) { this.{{name}} = {{#isNullable}}JsonNullable.of({{/isNullable}}{{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}{{#isNullable}}){{/isNullable}}; } this.{{name}}{{#isNullable}}.get(){{/isNullable}}.add({{name}}Item); @@ -179,7 +179,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { {{#openApiNullable}} - if (this.{{name}} == null{{#isNullable}} || !this.{{name}}.isPresent(){{/isNullable}}) { + if (this.{{name}} == null{{#isNullable}} || !this.{{name}}.isPresent() || this.{{name}}.get() == null{{/isNullable}}) { this.{{name}} = {{#isNullable}}JsonNullable.of({{/isNullable}}{{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}HashMap{{/uniqueItems}}<>(){{/defaultValue}}{{#isNullable}}){{/isNullable}}; } this.{{name}}{{#isNullable}}.get(){{/isNullable}}.put(key, {{name}}Item); diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 60b9acd16233..f8d725ac87b2 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -46,7 +46,7 @@ public ContainerDefaultValueDto nullableArray(List nullableArray) { } public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -73,7 +73,7 @@ public ContainerDefaultValueDto nullableRequiredArray(List nullableRequi } public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -129,7 +129,7 @@ public ContainerDefaultValueDto nullableArrayWithDefault(List nullableAr } public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 7cf3c2e5ffac..d80ec36b48bb 100644 --- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -36,7 +36,7 @@ public NullableMapPropertyDto languageValues(Map languageValues) } public NullableMapPropertyDto putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 0d0665bd25d4..86ceb7e1a7e7 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -45,7 +45,7 @@ public ContainerDefaultValueDto nullableArray(List nullableArray) { } public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -72,7 +72,7 @@ public ContainerDefaultValueDto nullableRequiredArray(List nullableRequi } public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -128,7 +128,7 @@ public ContainerDefaultValueDto nullableArrayWithDefault(List nullableAr } public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 3aab8f7bb33f..485fad020750 100644 --- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -35,7 +35,7 @@ public NullableMapPropertyDto languageValues(Map languageValues) } public NullableMapPropertyDto putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 2bc66b0e0ea2..646f59ba0fc1 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -52,7 +52,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -79,7 +79,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -135,7 +135,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java index 0f6fcac4a6c9..6106317c1920 100644 --- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -34,7 +34,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 8a7ce1e41681..a4f063c2fed2 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -51,7 +51,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -78,7 +78,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -134,7 +134,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java index c5edd6dc2f1e..190183fd90f9 100644 --- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -33,7 +33,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 8a7ce1e41681..a4f063c2fed2 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -51,7 +51,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -78,7 +78,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -134,7 +134,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java index c5edd6dc2f1e..190183fd90f9 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -33,7 +33,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java index a90ccf6e6462..0f07bef518bd 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -53,7 +53,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -80,7 +80,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -136,7 +136,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java index 2f1cbb8d1260..d567a2369099 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -35,7 +35,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 0d0665bd25d4..86ceb7e1a7e7 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -45,7 +45,7 @@ public ContainerDefaultValueDto nullableArray(List nullableArray) { } public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -72,7 +72,7 @@ public ContainerDefaultValueDto nullableRequiredArray(List nullableRequi } public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -128,7 +128,7 @@ public ContainerDefaultValueDto nullableArrayWithDefault(List nullableAr } public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 3aab8f7bb33f..485fad020750 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -35,7 +35,7 @@ public NullableMapPropertyDto languageValues(Map languageValues) } public NullableMapPropertyDto putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 3a7b524247d2..57a27da5f5a7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -45,7 +45,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -73,7 +73,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -131,7 +131,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java index 98948d7c0cd8..ebfafa69bcbc 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -35,7 +35,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 5b3730307fb4..a68f50b1890f 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -53,7 +53,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -81,7 +81,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -139,7 +139,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java index 98948d7c0cd8..ebfafa69bcbc 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -35,7 +35,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 5b3730307fb4..a68f50b1890f 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -53,7 +53,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -81,7 +81,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -139,7 +139,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java index 98948d7c0cd8..ebfafa69bcbc 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -35,7 +35,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 5b3730307fb4..a68f50b1890f 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -53,7 +53,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -81,7 +81,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -139,7 +139,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/NullableMapProperty.java index 98948d7c0cd8..ebfafa69bcbc 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -35,7 +35,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java index 312266e6ae2d..e28de50add6b 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java @@ -52,7 +52,7 @@ public ObjectWithUniqueItems nullSet(Set nullSet) { } public ObjectWithUniqueItems addNullSetItem(String nullSetItem) { - if (this.nullSet == null || !this.nullSet.isPresent()) { + if (this.nullSet == null || !this.nullSet.isPresent() || this.nullSet.get() == null) { this.nullSet = JsonNullable.of(new LinkedHashSet<>()); } this.nullSet.get().add(nullSetItem); @@ -110,7 +110,7 @@ public ObjectWithUniqueItems nullList(List nullList) { } public ObjectWithUniqueItems addNullListItem(String nullListItem) { - if (this.nullList == null || !this.nullList.isPresent()) { + if (this.nullList == null || !this.nullList.isPresent() || this.nullList.get() == null) { this.nullList = JsonNullable.of(new ArrayList<>()); } this.nullList.get().add(nullListItem); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index e1b5a75b99f1..e1ca46a94ed9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -54,7 +54,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -82,7 +82,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -140,7 +140,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java index 5c0ba6695770..bce03076dd0b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -36,7 +36,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index e1b5a75b99f1..e1ca46a94ed9 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -54,7 +54,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -82,7 +82,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -140,7 +140,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/NullableMapProperty.java index 5c0ba6695770..bce03076dd0b 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -36,7 +36,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java index e1b5a75b99f1..e1ca46a94ed9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -54,7 +54,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -82,7 +82,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -140,7 +140,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java index 5c0ba6695770..bce03076dd0b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -36,7 +36,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 7cefff7272d4..c9a834e15b61 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -64,7 +64,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -92,7 +92,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -150,7 +150,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java index 36150fd93b49..41a3080a79fa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -47,7 +47,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java index e1b5a75b99f1..e1ca46a94ed9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -54,7 +54,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -82,7 +82,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -140,7 +140,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java index 5c0ba6695770..bce03076dd0b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -36,7 +36,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 46294ec40247..6a6d05a9e2e7 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -56,7 +56,7 @@ public ContainerDefaultValueDto nullableArray(List nullableArray) { } public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -84,7 +84,7 @@ public ContainerDefaultValueDto nullableRequiredArray(List nullableRequi } public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -142,7 +142,7 @@ public ContainerDefaultValueDto nullableArrayWithDefault(List nullableAr } public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 7e0d9ccb9974..0b4096e4a2d2 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -38,7 +38,7 @@ public NullableMapPropertyDto languageValues(Map languageValues) } public NullableMapPropertyDto putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java index e1b5a75b99f1..e1ca46a94ed9 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -54,7 +54,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -82,7 +82,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -140,7 +140,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java index 5c0ba6695770..bce03076dd0b 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -36,7 +36,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java index e1b5a75b99f1..e1ca46a94ed9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -54,7 +54,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -82,7 +82,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -140,7 +140,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java index 5c0ba6695770..bce03076dd0b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -36,7 +36,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 5acbb0c254b5..5ace80c58052 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -54,7 +54,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -82,7 +82,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -140,7 +140,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java index 240ad2275f6a..6a900945c76d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -36,7 +36,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java index 3dbcdf004ba3..5f5c9eb5d935 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java @@ -53,7 +53,7 @@ public ContainerDefaultValue nullableArray(List nullableArray) { } public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -81,7 +81,7 @@ public ContainerDefaultValue nullableRequiredArray(List nullableRequired } public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -139,7 +139,7 @@ public ContainerDefaultValue nullableArrayWithDefault(List nullableArray } public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java index 79e491fcdf37..ad627906bc27 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java @@ -35,7 +35,7 @@ public NullableMapProperty languageValues(Map languageValues) { } public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/NullableClassDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/NullableClassDto.java index 1382e2055a58..1e2e0aa42a5f 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/NullableClassDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/NullableClassDto.java @@ -192,7 +192,7 @@ public NullableClassDto arrayNullableProp(List arrayNullableProp) { } public NullableClassDto addArrayNullablePropItem(Object arrayNullablePropItem) { - if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent() || this.arrayNullableProp.get() == null) { this.arrayNullableProp = JsonNullable.of(new ArrayList<>()); } this.arrayNullableProp.get().add(arrayNullablePropItem); @@ -220,7 +220,7 @@ public NullableClassDto arrayAndItemsNullableProp(List arrayAndItemsNull } public NullableClassDto addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { - if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent() || this.arrayAndItemsNullableProp.get() == null) { this.arrayAndItemsNullableProp = JsonNullable.of(new ArrayList<>()); } this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); @@ -277,7 +277,7 @@ public NullableClassDto objectNullableProp(Map objectNullablePro } public NullableClassDto putObjectNullablePropItem(String key, Object objectNullablePropItem) { - if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent() || this.objectNullableProp.get() == null) { this.objectNullableProp = JsonNullable.of(new HashMap<>()); } this.objectNullableProp.get().put(key, objectNullablePropItem); @@ -305,7 +305,7 @@ public NullableClassDto objectAndItemsNullableProp(Map objectAnd } public NullableClassDto putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { - if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent() || this.objectAndItemsNullableProp.get() == null) { this.objectAndItemsNullableProp = JsonNullable.of(new HashMap<>()); } this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 46294ec40247..6a6d05a9e2e7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -56,7 +56,7 @@ public ContainerDefaultValueDto nullableArray(List nullableArray) { } public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { - if (this.nullableArray == null || !this.nullableArray.isPresent()) { + if (this.nullableArray == null || !this.nullableArray.isPresent() || this.nullableArray.get() == null) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } this.nullableArray.get().add(nullableArrayItem); @@ -84,7 +84,7 @@ public ContainerDefaultValueDto nullableRequiredArray(List nullableRequi } public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequiredArrayItem) { - if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent() || this.nullableRequiredArray.get() == null) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } this.nullableRequiredArray.get().add(nullableRequiredArrayItem); @@ -142,7 +142,7 @@ public ContainerDefaultValueDto nullableArrayWithDefault(List nullableAr } public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { - if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent() || this.nullableArrayWithDefault.get() == null) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 7e0d9ccb9974..0b4096e4a2d2 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -38,7 +38,7 @@ public NullableMapPropertyDto languageValues(Map languageValues) } public NullableMapPropertyDto putLanguageValuesItem(String key, String languageValuesItem) { - if (this.languageValues == null || !this.languageValues.isPresent()) { + if (this.languageValues == null || !this.languageValues.isPresent() || this.languageValues.get() == null) { this.languageValues = JsonNullable.of(new HashMap<>()); } this.languageValues.get().put(key, languageValuesItem); From f77d733c9b1db02b1457187129b2d7a81dd5b968 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Wed, 18 Mar 2026 15:12:17 +0100 Subject: [PATCH 17/17] fix jsonmapping --- .../languages/AbstractJavaCodegen.java | 18 +++ .../main/resources/JavaSpring/pojo.mustache | 2 +- .../java/spring/SpringCodegenTest.java | 121 ++++++++++-------- 3 files changed, 84 insertions(+), 57 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 58f7d0e1f226..e0e7c4302b82 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -71,6 +71,7 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; +import static org.openapitools.codegen.CodegenConstants.X_DISCRIMINATOR_VALUE; import static org.openapitools.codegen.CodegenConstants.X_IMPLEMENTS; import static org.openapitools.codegen.utils.CamelizeOption.*; import static org.openapitools.codegen.utils.ModelUtils.getSchemaItems; @@ -802,6 +803,23 @@ public Map postProcessAllModels(Map objs) } } + // Propagate the parent's discriminator mapping key to each child model's vendorExtensions + // as x-discriminator-value, so that @JsonTypeName on the child matches the parent's + // @JsonSubTypes name when an explicit discriminator mapping renames the key + // (e.g. "child_a" instead of the schema name "ChildWithMappingA"). + // putIfAbsent preserves any value the user has already set explicitly in the spec. + for (CodegenModel cm : allModels.values()) { + if (cm.getParentModel() == null || cm.getParentModel().getDiscriminator() == null) { + continue; + } + for (CodegenDiscriminator.MappedModel mm : cm.getParentModel().getDiscriminator().getMappedModels()) { + if (mm.getModelName().equals(cm.classname)) { + cm.vendorExtensions.putIfAbsent(X_DISCRIMINATOR_VALUE, mm.getMappingName()); + break; + } + } + } + return objs; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index c0adc47eec2c..d0114d9b572d 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -22,7 +22,7 @@ {{#jackson}} {{#isClassnameSanitized}} {{#parent}} -@JsonTypeName("{{name}}") +@JsonTypeName("{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}") {{/parent}} {{^parent}} {{^hasDiscriminatorWithNonEmptyMapping}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index 19de71e41105..2d6f80aaf5c0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -65,9 +65,7 @@ import static org.openapitools.codegen.languages.SpringCodegen.*; import static org.openapitools.codegen.languages.features.DocumentationProviderFeatures.ANNOTATION_LIBRARY; import static org.openapitools.codegen.languages.features.DocumentationProviderFeatures.DOCUMENTATION_PROVIDER; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.fail; +import static org.testng.Assert.*; public class SpringCodegenTest { @@ -898,16 +896,16 @@ public void testReactiveMultipartBoot() throws IOException { // Check that the delegate handles the array JavaFileAssert.assertThat(files.get("MultipartArrayApiDelegate.java")) - .assertMethod("multipartArray", "Flux", "ServerWebExchange") - .assertParameter("files").hasType("Flux"); + .assertMethod("multipartArray", "Flux", "ServerWebExchange") + .assertParameter("files").hasType("Flux"); // Check that the api handles the array JavaFileAssert.assertThat(files.get("MultipartArrayApi.java")) - .assertMethod("multipartArray", "Flux", "ServerWebExchange") - .assertParameter("files").hasType("Flux") - .assertParameterAnnotations() - .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"Many files\"")) - .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"files\"", "required", "false")); + .assertMethod("multipartArray", "Flux", "ServerWebExchange") + .assertParameter("files").hasType("Flux") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"Many files\"")) + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"files\"", "required", "false")); // UPDATE: the following test has been ignored due to https://github.com/OpenAPITools/openapi-generator/pull/11081/ // We will contact the contributor of the following test to see if the fix will break their use cases and @@ -918,32 +916,32 @@ public void testReactiveMultipartBoot() throws IOException { // Check that the api handles the single file JavaFileAssert.assertThat(files.get("MultipartSingleApi.java")) - .assertMethod("multipartSingle", "Part", "ServerWebExchange") - .assertParameter("file").hasType("Part") - .assertParameterAnnotations() - .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"One file\"")) - .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"file\"", "required", "false")); + .assertMethod("multipartSingle", "Part", "ServerWebExchange") + .assertParameter("file").hasType("Part") + .assertParameterAnnotations() + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"One file\"")) + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"file\"", "required", "false")); // Check that api validates mixed multipart request JavaFileAssert.assertThat(files.get("MultipartMixedApi.java")) - .assertMethod("multipartMixed", "MultipartMixedStatus", "Part", "MultipartMixedRequestMarker", "List", "ServerWebExchange") - .assertParameter("status").hasType("MultipartMixedStatus") - .assertParameterAnnotations() - .containsWithName("Valid") - .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"\"")) - .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"status\"", "required", "true")) - .toParameter().toMethod() - .assertParameter("file").hasType("Part") - .assertParameterAnnotations() - .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"file\"", "required", "true")) - .toParameter().toMethod() - .assertParameter("marker").hasType("MultipartMixedRequestMarker") - .assertParameterAnnotations() - .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"marker\"", "required", "false")) - .toParameter().toMethod() - .assertParameter("statusArray").hasType("List") - .assertParameterAnnotations() - .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"statusArray\"", "required", "false")); + .assertMethod("multipartMixed", "MultipartMixedStatus", "Part", "MultipartMixedRequestMarker", "List", "ServerWebExchange") + .assertParameter("status").hasType("MultipartMixedStatus") + .assertParameterAnnotations() + .containsWithName("Valid") + .containsWithNameAndAttributes("ApiParam", ImmutableMap.of("value", "\"\"")) + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"status\"", "required", "true")) + .toParameter().toMethod() + .assertParameter("file").hasType("Part") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"file\"", "required", "true")) + .toParameter().toMethod() + .assertParameter("marker").hasType("MultipartMixedRequestMarker") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"marker\"", "required", "false")) + .toParameter().toMethod() + .assertParameter("statusArray").hasType("List") + .assertParameterAnnotations() + .containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"statusArray\"", "required", "false")); } @Test @@ -2063,8 +2061,14 @@ public void testDiscriminatorWithMappingIssue14731() throws IOException { generator.opts(input).generate(); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ChildWithMappingADTO.java"), "@JsonTypeName"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ChildWithMappingBDTO.java"), "@JsonTypeName"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ParentWithMappingDTO.java"), + "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"childType\", visible = true)\n" + + "@JsonSubTypes({\n" + + " @JsonSubTypes.Type(value = ChildWithMappingADTO.class, name = \"child_a\"),\n" + + " @JsonSubTypes.Type(value = ChildWithMappingBDTO.class, name = \"child_b\")\n" + + "})"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ChildWithMappingADTO.java"), "@JsonTypeName(\"child_a\")"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ChildWithMappingBDTO.java"), "@JsonTypeName(\"child_b\")"); } @Test @@ -2100,9 +2104,14 @@ public void testDiscriminatorWithoutMappingIssue14731() throws IOException { generator.opts(input).generate(); - - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ChildWithoutMappingADTO.java"), "@JsonTypeName"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ChildWithoutMappingBDTO.java"), "@JsonTypeName"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ParentWithoutMappingDTO.java"), + "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"childType\", visible = true)\n" + + "@JsonSubTypes({\n" + + " @JsonSubTypes.Type(value = ChildWithoutMappingADTO.class, name = \"ChildWithoutMappingA\"),\n" + + " @JsonSubTypes.Type(value = ChildWithoutMappingBDTO.class, name = \"ChildWithoutMappingB\")\n" + + "})"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ChildWithoutMappingADTO.java"), "@JsonTypeName(\"ChildWithoutMappingA\")"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/ChildWithoutMappingBDTO.java"), "@JsonTypeName(\"ChildWithoutMappingB\")"); } @Test @@ -6306,11 +6315,11 @@ public void testXMinimumMessageAndXMaximumMessage_long() throws IOException { .assertParameter("number") .assertParameterAnnotations() .containsWithNameAndAttributes("Min", ImmutableMap.of( - "value", "1L", + "value", "1L", "message", "\"Must be positive\"" )) .containsWithNameAndAttributes("Max", ImmutableMap.of( - "value", "99L", + "value", "99L", "message", "\"Must be less than 100\"" )) .toParameter() @@ -6318,11 +6327,11 @@ public void testXMinimumMessageAndXMaximumMessage_long() throws IOException { .assertParameter("token") .assertParameterAnnotations() .containsWithNameAndAttributes("Min", ImmutableMap.of( - "value", "1L", + "value", "1L", "message", "\"Must be positive\"" )) .containsWithNameAndAttributes("Max", ImmutableMap.of( - "value", "99L", + "value", "99L", "message", "\"Must be less than 100\"" )) .toParameter() @@ -6330,22 +6339,22 @@ public void testXMinimumMessageAndXMaximumMessage_long() throws IOException { .assertParameter("clientNumber") .assertParameterAnnotations() .containsWithNameAndAttributes("Min", ImmutableMap.of( - "value", "1L", + "value", "1L", "message", "\"Must be positive\"" )) .containsWithNameAndAttributes("Max", ImmutableMap.of( - "value", "99L", + "value", "99L", "message", "\"Must be less than 100\"" )); JavaFileAssert.assertThat(files.get("LongTest.java")) .assertMethod("getField1") .assertMethodAnnotations() .containsWithNameAndAttributes("Min", ImmutableMap.of( - "value", "1L", + "value", "1L", "message", "\"Must be positive\"" )) .containsWithNameAndAttributes("Max", ImmutableMap.of( - "value", "99L", + "value", "99L", "message", "\"Must be less than 100\"" )) .toMethod() @@ -6374,19 +6383,19 @@ public void annotationLibraryDoesNotCauseImportConflictsInSpring() throws IOExce codegen.additionalProperties().putAll(properties); ClientOptInput input = new ClientOptInput() - .openAPI(openAPI) - .config(codegen); + .openAPI(openAPI) + .config(codegen); DefaultGenerator generator = new DefaultGenerator(); Map files = generator.opts(input).generate().stream() - .collect(Collectors.toMap(File::getName, Function.identity())); + .collect(Collectors.toMap(File::getName, Function.identity())); File apiFile = files.get("Schema.java"); assertNotNull(apiFile); JavaFileAssert.assertThat(apiFile).fileDoesNotContain( - "import io.swagger.v3.oas.annotations.media.Schema;" + "import io.swagger.v3.oas.annotations.media.Schema;" ); } @@ -6408,19 +6417,19 @@ public void annotationLibraryDoesNotCauseImportConflictsInSpringWithAnnotationLi codegen.additionalProperties().putAll(properties); ClientOptInput input = new ClientOptInput() - .openAPI(openAPI) - .config(codegen); + .openAPI(openAPI) + .config(codegen); DefaultGenerator generator = new DefaultGenerator(); Map files = generator.opts(input).generate().stream() - .collect(Collectors.toMap(File::getName, Function.identity())); + .collect(Collectors.toMap(File::getName, Function.identity())); File apiFile = files.get("Schema.java"); assertNotNull(apiFile); JavaFileAssert.assertThat(apiFile).fileContains( - "import io.swagger.v3.oas.annotations.media.Schema;" + "import io.swagger.v3.oas.annotations.media.Schema;" ); } @@ -6460,7 +6469,7 @@ public void testExtensionsOnSchema_issue9183() throws IOException { .containsWithNameAndAttributes("Pattern", ImmutableMap.of( "regexp", "\"[a-zA-Z]\"", "message", "\"Only letters\"" - )) + )) .toParameter() .toMethod() .assertParameter("token") @@ -6468,7 +6477,7 @@ public void testExtensionsOnSchema_issue9183() throws IOException { .containsWithNameAndAttributes("Pattern", ImmutableMap.of( "regexp", "\"[0-9a-fA-F]\"", "message", "\"Only numbers and letters a-f\"" - )); + )); } @Test