From 344f0fcf2c44eb8920f7b0a18485752003a83e37 Mon Sep 17 00:00:00 2001 From: Jachym Metlicka Date: Sat, 16 May 2026 13:42:34 +0200 Subject: [PATCH] [JAVA-SPRING] - 22859 - spring http interface library should support 'useBeanValidation' --- .github/workflows/samples-jdk17.yaml | 6 + .../samples-kotlin-server-jdk17.yaml | 1 + ...declarative-interface-bean-validation.yaml | 15 + ...spring-http-interface-bean-validation.yaml | 18 + ...pring-http-interface-noResponseEntity.yaml | 5 +- ...tp-interface-reactive-bean-validation.yaml | 17 + ...p-interface-reactive-noResponseEntity.yaml | 5 +- .../spring-http-interface-reactive.yaml | 5 +- .../spring-http-interface-springboot-4.yaml | 1 - bin/configs/spring-http-interface.yaml | 5 +- .../codegen/languages/SpringCodegen.java | 18 +- .../spring-http-interface/api.mustache | 6 + .../spring-http-interface/pom-sb3.mustache | 12 + .../spring-http-interface/pom-sb4.mustache | 12 + .../main/resources/JavaSpring/pojo.mustache | 1 - .../pom-sb3.mustache | 5 + .../pom-sb4.mustache | 5 + .../java/spring/SpringCodegenTest.java | 123 +++ ...ith-fake-endpoints-models-for-testing.yaml | 4 +- .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 59 ++ .../.openapi-generator/VERSION | 1 + .../README.md | 21 + .../pom.xml | 81 ++ .../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/AdditionalPropertiesAnyTypeDto.java | 126 +++ .../model/AdditionalPropertiesArrayDto.java | 127 +++ .../model/AdditionalPropertiesBooleanDto.java | 126 +++ .../model/AdditionalPropertiesClassDto.java | 403 +++++++++ .../model/AdditionalPropertiesIntegerDto.java | 126 +++ .../model/AdditionalPropertiesNumberDto.java | 127 +++ .../model/AdditionalPropertiesObjectDto.java | 127 +++ .../model/AdditionalPropertiesStringDto.java | 126 +++ .../org/openapitools/model/AnimalDto.java | 123 +++ .../openapitools/model/ApiResponseDto.java | 130 +++ .../model/ArrayOfArrayOfNumberOnlyDto.java | 94 ++ .../model/ArrayOfNumberOnlyDto.java | 94 ++ .../org/openapitools/model/ArrayTestDto.java | 158 ++++ .../org/openapitools/model/BigCatDto.java | 148 ++++ .../openapitools/model/CapitalizationDto.java | 202 +++++ .../java/org/openapitools/model/CatDto.java | 110 +++ .../org/openapitools/model/CategoryDto.java | 110 +++ .../model/ChildWithNullableDto.java | 113 +++ .../org/openapitools/model/ClassModelDto.java | 82 ++ .../org/openapitools/model/ClientDto.java | 82 ++ .../model/ContainerDefaultValueDto.java | 204 +++++ .../java/org/openapitools/model/DogDto.java | 103 +++ .../org/openapitools/model/EnumArraysDto.java | 188 ++++ .../org/openapitools/model/EnumClassDto.java | 57 ++ .../org/openapitools/model/EnumTestDto.java | 328 +++++++ .../java/org/openapitools/model/FileDto.java | 82 ++ .../model/FileSchemaTestClassDto.java | 118 +++ .../org/openapitools/model/FormatTestDto.java | 416 +++++++++ .../model/HasOnlyReadOnlyDto.java | 106 +++ .../java/org/openapitools/model/ListDto.java | 82 ++ .../org/openapitools/model/MapTestDto.java | 224 +++++ ...ertiesAndAdditionalPropertiesClassDto.java | 145 +++ .../model/Model200ResponseDto.java | 106 +++ .../java/org/openapitools/model/NameDto.java | 158 ++++ .../model/NullableMapPropertyDto.java | 105 +++ .../org/openapitools/model/NumberOnlyDto.java | 83 ++ .../java/org/openapitools/model/OrderDto.java | 243 +++++ .../openapitools/model/OuterCompositeDto.java | 131 +++ .../org/openapitools/model/OuterEnumDto.java | 57 ++ .../model/ParentWithNullableDto.java | 164 ++++ .../java/org/openapitools/model/PetDto.java | 276 ++++++ .../openapitools/model/ReadOnlyFirstDto.java | 106 +++ ...ponseObjectWithDifferentFieldNamesDto.java | 154 ++++ .../org/openapitools/model/ReturnDto.java | 82 ++ .../model/SpecialModelNameDto.java | 82 ++ .../java/org/openapitools/model/TagDto.java | 106 +++ .../model/TypeHolderDefaultDto.java | 194 ++++ .../model/TypeHolderExampleDto.java | 218 +++++ .../java/org/openapitools/model/UserDto.java | 250 ++++++ .../org/openapitools/model/XmlItemDto.java | 830 ++++++++++++++++++ .../pom.xml | 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 + .../model/AdditionalPropertiesClassDto.java | 8 - .../model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../model/ArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayTestDto.java | 3 - .../model/ContainerDefaultValueDto.java | 4 - .../org/openapitools/model/EnumArraysDto.java | 1 - .../model/FileSchemaTestClassDto.java | 1 - .../org/openapitools/model/MapTestDto.java | 4 - ...ertiesAndAdditionalPropertiesClassDto.java | 1 - .../model/NullableMapPropertyDto.java | 1 - .../java/org/openapitools/model/PetDto.java | 2 - .../model/TypeHolderDefaultDto.java | 1 - .../model/TypeHolderExampleDto.java | 1 - .../org/openapitools/model/XmlItemDto.java | 9 - .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 59 ++ .../.openapi-generator/VERSION | 1 + .../README.md | 21 + .../pom.xml | 81 ++ .../org/openapitools/api/AnotherFakeApi.java | 48 + .../java/org/openapitools/api/FakeApi.java | 386 ++++++++ .../api/FakeClassnameTags123Api.java | 48 + .../java/org/openapitools/api/PetApi.java | 233 +++++ .../java/org/openapitools/api/StoreApi.java | 103 +++ .../java/org/openapitools/api/UserApi.java | 179 ++++ .../HttpInterfacesAbstractConfigurator.java | 65 ++ .../model/AdditionalPropertiesAnyType.java | 124 +++ .../model/AdditionalPropertiesArray.java | 125 +++ .../model/AdditionalPropertiesBoolean.java | 124 +++ .../model/AdditionalPropertiesClass.java | 401 +++++++++ .../model/AdditionalPropertiesInteger.java | 124 +++ .../model/AdditionalPropertiesNumber.java | 125 +++ .../model/AdditionalPropertiesObject.java | 125 +++ .../model/AdditionalPropertiesString.java | 124 +++ .../java/org/openapitools/model/Animal.java | 129 +++ .../model/ArrayOfArrayOfNumberOnly.java | 92 ++ .../openapitools/model/ArrayOfNumberOnly.java | 92 ++ .../org/openapitools/model/ArrayTest.java | 156 ++++ .../java/org/openapitools/model/BigCat.java | 153 ++++ .../openapitools/model/Capitalization.java | 200 +++++ .../main/java/org/openapitools/model/Cat.java | 116 +++ .../java/org/openapitools/model/Category.java | 115 +++ .../openapitools/model/ChildWithNullable.java | 111 +++ .../org/openapitools/model/ClassModel.java | 80 ++ .../java/org/openapitools/model/Client.java | 80 ++ .../model/ContainerDefaultValue.java | 210 +++++ .../main/java/org/openapitools/model/Dog.java | 108 +++ .../org/openapitools/model/EnumArrays.java | 186 ++++ .../org/openapitools/model/EnumClass.java | 57 ++ .../java/org/openapitools/model/EnumTest.java | 335 +++++++ .../java/org/openapitools/model/File.java | 80 ++ .../model/FileSchemaTestClass.java | 116 +++ .../org/openapitools/model/FormatTest.java | 426 +++++++++ .../openapitools/model/HasOnlyReadOnly.java | 106 +++ .../java/org/openapitools/model/MapTest.java | 222 +++++ ...ropertiesAndAdditionalPropertiesClass.java | 143 +++ .../openapitools/model/Model200Response.java | 106 +++ .../openapitools/model/ModelApiResponse.java | 130 +++ .../org/openapitools/model/ModelList.java | 82 ++ .../org/openapitools/model/ModelReturn.java | 82 ++ .../java/org/openapitools/model/Name.java | 163 ++++ .../model/NullableMapProperty.java | 103 +++ .../org/openapitools/model/NumberOnly.java | 81 ++ .../java/org/openapitools/model/Order.java | 241 +++++ .../openapitools/model/OuterComposite.java | 129 +++ .../org/openapitools/model/OuterEnum.java | 57 ++ .../model/ParentWithNullable.java | 163 ++++ .../main/java/org/openapitools/model/Pet.java | 282 ++++++ .../org/openapitools/model/ReadOnlyFirst.java | 104 +++ ...ResponseObjectWithDifferentFieldNames.java | 152 ++++ .../openapitools/model/SpecialModelName.java | 82 ++ .../main/java/org/openapitools/model/Tag.java | 104 +++ .../openapitools/model/TypeHolderDefault.java | 203 +++++ .../openapitools/model/TypeHolderExample.java | 228 +++++ .../java/org/openapitools/model/User.java | 248 ++++++ .../java/org/openapitools/model/XmlItem.java | 828 +++++++++++++++++ .../pom.xml | 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 + .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../spring-http-interface-reactive/pom.xml | 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 + .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../pom.xml | 5 + .../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 | 22 +- .../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 | 7 +- .../model/ArrayOfNumberOnlyDto.java | 7 +- .../org/openapitools/model/ArrayTestDto.java | 21 +- .../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 | 12 +- .../java/org/openapitools/model/DogDto.java | 4 +- .../org/openapitools/model/EnumArraysDto.java | 5 +- .../org/openapitools/model/EnumClassDto.java | 4 +- .../org/openapitools/model/EnumTestDto.java | 8 +- .../java/org/openapitools/model/FileDto.java | 4 +- .../model/FileSchemaTestClassDto.java | 17 +- .../org/openapitools/model/FormatTestDto.java | 30 +- .../model/HasOnlyReadOnlyDto.java | 4 +- .../java/org/openapitools/model/ListDto.java | 4 +- .../org/openapitools/model/MapTestDto.java | 10 +- ...ertiesAndAdditionalPropertiesClassDto.java | 11 +- .../model/Model200ResponseDto.java | 4 +- .../java/org/openapitools/model/NameDto.java | 6 +- .../model/NullableMapPropertyDto.java | 5 +- .../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 | 22 +- .../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 | 15 +- .../model/TypeHolderExampleDto.java | 17 +- .../java/org/openapitools/model/UserDto.java | 4 +- .../org/openapitools/model/XmlItemDto.java | 23 +- .../pom.xml | 5 + .../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 | 22 +- .../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 | 7 +- .../openapitools/model/ArrayOfNumberOnly.java | 7 +- .../org/openapitools/model/ArrayTest.java | 21 +- .../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 | 12 +- .../main/java/org/openapitools/model/Dog.java | 4 +- .../org/openapitools/model/EnumArrays.java | 5 +- .../org/openapitools/model/EnumClass.java | 4 +- .../java/org/openapitools/model/EnumTest.java | 8 +- .../java/org/openapitools/model/File.java | 4 +- .../model/FileSchemaTestClass.java | 17 +- .../org/openapitools/model/FormatTest.java | 30 +- .../openapitools/model/HasOnlyReadOnly.java | 4 +- .../java/org/openapitools/model/MapTest.java | 10 +- ...ropertiesAndAdditionalPropertiesClass.java | 11 +- .../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 | 5 +- .../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 | 22 +- .../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 | 15 +- .../openapitools/model/TypeHolderExample.java | 17 +- .../java/org/openapitools/model/User.java | 4 +- .../java/org/openapitools/model/XmlItem.java | 23 +- .../petstore/spring-http-interface/pom.xml | 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 + .../model/AdditionalPropertiesClassDto.java | 8 - .../model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../model/ArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayTestDto.java | 3 - .../model/ContainerDefaultValueDto.java | 4 - .../org/openapitools/model/EnumArraysDto.java | 1 - .../model/FileSchemaTestClassDto.java | 1 - .../org/openapitools/model/MapTestDto.java | 4 - ...ertiesAndAdditionalPropertiesClassDto.java | 1 - .../model/NullableMapPropertyDto.java | 1 - .../java/org/openapitools/model/PetDto.java | 2 - .../model/TypeHolderDefaultDto.java | 1 - .../model/TypeHolderExampleDto.java | 1 - .../org/openapitools/model/XmlItemDto.java | 9 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Foo.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 17 + .../.openapi-generator/VERSION | 1 + .../README.md | 9 + .../build.gradle.kts | 56 ++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43453 bytes .../gradle/wrapper/gradle-wrapper.properties | 7 + .../gradlew | 249 ++++++ .../gradlew.bat | 92 ++ .../pom.xml | 170 ++++ .../settings.gradle | 15 + .../kotlin/org/openapitools/api/PetApi.kt | 128 +++ .../kotlin/org/openapitools/api/StoreApi.kt | 77 ++ .../kotlin/org/openapitools/api/UserApi.kt | 123 +++ .../kotlin/org/openapitools/model/Category.kt | 35 + .../openapitools/model/ModelApiResponse.kt | 38 + .../kotlin/org/openapitools/model/Order.kt | 72 ++ .../main/kotlin/org/openapitools/model/Pet.kt | 77 ++ .../main/kotlin/org/openapitools/model/Tag.kt | 34 + .../kotlin/org/openapitools/model/User.kt | 58 ++ .../pom.xml | 5 + .../pom.xml | 5 + .../pom.xml | 5 + .../pom.xml | 5 + .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../model/ObjectWithUniqueItems.java | 4 - .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../main/java/org/openapitools/model/Pet.java | 2 - .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../main/java/org/openapitools/model/Pet.java | 2 - .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClassDto.java | 8 - .../model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../model/ArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayTestDto.java | 3 - .../model/ContainerDefaultValueDto.java | 4 - .../org/openapitools/model/EnumArraysDto.java | 1 - .../model/FileSchemaTestClassDto.java | 1 - .../org/openapitools/model/FormatTestDto.java | 2 +- .../org/openapitools/model/MapTestDto.java | 4 - ...ertiesAndAdditionalPropertiesClassDto.java | 1 - .../model/NullableMapPropertyDto.java | 1 - .../java/org/openapitools/model/PetDto.java | 2 - .../model/TypeHolderDefaultDto.java | 1 - .../model/TypeHolderExampleDto.java | 1 - .../org/openapitools/model/XmlItemDto.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../main/java/org/openapitools/model/Pet.java | 2 - .../main/java/org/openapitools/model/Pet.java | 2 - .../java/org/openapitools/model/UserList.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 2 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../main/java/org/openapitools/model/Pet.java | 2 - .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../openapitools/model/ArrayOfNumberOnly.java | 1 - .../org/openapitools/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../org/openapitools/model/EnumArrays.java | 1 - .../model/FileSchemaTestClass.java | 1 - .../org/openapitools/model/FormatTest.java | 4 +- .../java/org/openapitools/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../model/NullableMapProperty.java | 1 - .../main/java/org/openapitools/model/Pet.java | 2 - .../openapitools/model/TypeHolderDefault.java | 1 - .../openapitools/model/TypeHolderExample.java | 1 - .../java/org/openapitools/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../openapitools/virtualan/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClass.java | 8 - .../model/ArrayOfArrayOfNumberOnly.java | 1 - .../virtualan/model/ArrayOfNumberOnly.java | 1 - .../virtualan/model/ArrayTest.java | 3 - .../model/ContainerDefaultValue.java | 4 - .../virtualan/model/EnumArrays.java | 1 - .../virtualan/model/FileSchemaTestClass.java | 1 - .../virtualan/model/FormatTest.java | 2 +- .../openapitools/virtualan/model/MapTest.java | 4 - ...ropertiesAndAdditionalPropertiesClass.java | 1 - .../virtualan/model/NullableMapProperty.java | 1 - .../org/openapitools/virtualan/model/Pet.java | 2 - .../virtualan/model/TypeHolderDefault.java | 1 - .../virtualan/model/TypeHolderExample.java | 1 - .../openapitools/virtualan/model/XmlItem.java | 9 - .../src/main/resources/openapi.yaml | 4 +- .../model/AdditionalPropertiesClassDto.java | 2 - .../model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../model/ArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayTestDto.java | 3 - .../org/openapitools/model/EnumArraysDto.java | 1 - .../FakeBigDecimalMap200ResponseDto.java | 1 - .../model/FileSchemaTestClassDto.java | 1 - .../org/openapitools/model/MapTestDto.java | 4 - ...ertiesAndAdditionalPropertiesClassDto.java | 1 - .../openapitools/model/NullableClassDto.java | 6 - .../model/ObjectWithDeprecatedFieldsDto.java | 1 - .../java/org/openapitools/model/PetDto.java | 2 - .../java/org/openapitools/api/FakeApi.java | 2 +- .../model/AdditionalPropertiesClassDto.java | 8 - .../model/ArrayOfArrayOfNumberOnlyDto.java | 1 - .../model/ArrayOfNumberOnlyDto.java | 1 - .../org/openapitools/model/ArrayTestDto.java | 3 - .../model/ContainerDefaultValueDto.java | 4 - .../org/openapitools/model/EnumArraysDto.java | 1 - .../model/FileSchemaTestClassDto.java | 1 - .../org/openapitools/model/FormatTestDto.java | 2 +- .../org/openapitools/model/MapTestDto.java | 4 - ...ertiesAndAdditionalPropertiesClassDto.java | 1 - .../model/NullableMapPropertyDto.java | 1 - .../java/org/openapitools/model/PetDto.java | 2 - .../model/TypeHolderDefaultDto.java | 1 - .../model/TypeHolderExampleDto.java | 1 - .../org/openapitools/model/XmlItemDto.java | 9 - .../src/main/resources/openapi.yaml | 4 +- 722 files changed, 21005 insertions(+), 1490 deletions(-) create mode 100644 bin/configs/kotlin-spring-declarative-interface-bean-validation.yaml create mode 100644 bin/configs/spring-http-interface-bean-validation.yaml create mode 100644 bin/configs/spring-http-interface-reactive-bean-validation.yaml 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 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/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator-ignore create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator/FILES create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator/VERSION create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/README.md create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/build.gradle.kts create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradle/wrapper/gradle-wrapper.jar create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradle/wrapper/gradle-wrapper.properties create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradlew create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradlew.bat create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/pom.xml create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/settings.gradle create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/PetApi.kt create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/StoreApi.kt create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/UserApi.kt create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Category.kt create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Tag.kt create mode 100644 samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/User.kt diff --git a/.github/workflows/samples-jdk17.yaml b/.github/workflows/samples-jdk17.yaml index 2c2ff5341121..33fb66f3229c 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/** @@ -27,6 +29,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/** @@ -53,6 +57,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/.github/workflows/samples-kotlin-server-jdk17.yaml b/.github/workflows/samples-kotlin-server-jdk17.yaml index 0c874516583e..697b668fd025 100644 --- a/.github/workflows/samples-kotlin-server-jdk17.yaml +++ b/.github/workflows/samples-kotlin-server-jdk17.yaml @@ -67,6 +67,7 @@ jobs: - samples/server/petstore/kotlin-server-modelMutable - samples/server/petstore/kotlin-misk - samples/server/petstore/kotlin-spring-declarative-interface + - samples/server/petstore/kotlin-spring-declarative-interface-bean-validation - samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines - samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped - samples/server/petstore/kotlin-spring-declarative-interface-wrapped diff --git a/bin/configs/kotlin-spring-declarative-interface-bean-validation.yaml b/bin/configs/kotlin-spring-declarative-interface-bean-validation.yaml new file mode 100644 index 000000000000..7c7ab0f17b21 --- /dev/null +++ b/bin/configs/kotlin-spring-declarative-interface-bean-validation.yaml @@ -0,0 +1,15 @@ +generatorName: kotlin-spring +outputDir: samples/server/petstore/kotlin-spring-declarative-interface-bean-validation +library: spring-declarative-http-interface +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-spring +additionalProperties: + documentationProvider: springDoc + annotationLibrary: swagger2 + useSwaggerUI: "false" + serializableModel: "true" + interfaceOnly: true + reactive: false + useResponseEntity: true + useFlowForArrayReturnType: false + useBeanValidation: "true" 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..9d3aca960b59 --- /dev/null +++ b/bin/configs/spring-http-interface-bean-validation.yaml @@ -0,0 +1,18 @@ +generatorName: spring +library: spring-http-interface +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: + 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" + useSpringBoot3: "true" \ No newline at end of file diff --git a/bin/configs/spring-http-interface-noResponseEntity.yaml b/bin/configs/spring-http-interface-noResponseEntity.yaml index dc240109b341..098c5ebf7598 100644 --- a/bin/configs/spring-http-interface-noResponseEntity.yaml +++ b/bin/configs/spring-http-interface-noResponseEntity.yaml @@ -13,8 +13,7 @@ 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" useSpringBoot3: "true" 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..6040068f931b --- /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" + useSpringBoot3: "true" diff --git a/bin/configs/spring-http-interface-reactive-noResponseEntity.yaml b/bin/configs/spring-http-interface-reactive-noResponseEntity.yaml index 45e0bb23a371..e572fc5188e8 100644 --- a/bin/configs/spring-http-interface-reactive-noResponseEntity.yaml +++ b/bin/configs/spring-http-interface-reactive-noResponseEntity.yaml @@ -12,9 +12,8 @@ additionalProperties: documentationProvider: "springdoc" # 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" useSpringBoot3: "true" diff --git a/bin/configs/spring-http-interface-reactive.yaml b/bin/configs/spring-http-interface-reactive.yaml index dd94f1f71f6f..1a289063f6bd 100644 --- a/bin/configs/spring-http-interface-reactive.yaml +++ b/bin/configs/spring-http-interface-reactive.yaml @@ -12,8 +12,7 @@ additionalProperties: documentationProvider: "springdoc" # 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 useSpringBoot3: "true" 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/bin/configs/spring-http-interface.yaml b/bin/configs/spring-http-interface.yaml index 78137df8c3e9..bc6bf36e5123 100644 --- a/bin/configs/spring-http-interface.yaml +++ b/bin/configs/spring-http-interface.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 useSpringBoot3: "true" 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 d0b94b240f30..49417f9bdb94 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 @@ -473,8 +473,18 @@ public void processOpts() { documentationProvider = DocumentationProvider.NONE; annotationLibrary = AnnotationLibrary.NONE; useJakartaEe = true; - useBeanValidation = false; - performBeanValidation = false; + if(additionalProperties.containsKey(USE_BEANVALIDATION)) { + useBeanValidation = convertPropertyToBoolean(USE_BEANVALIDATION); + } else { + //default to false if not specified + useBeanValidation = false; + } + if(additionalProperties.containsKey(PERFORM_BEANVALIDATION)) { + performBeanValidation = convertPropertyToBoolean(PERFORM_BEANVALIDATION); + } else { + //default to false if not specified + performBeanValidation = false; + } additionalProperties.put(USE_JAKARTA_EE, useJakartaEe); additionalProperties.put(USE_BEANVALIDATION, useBeanValidation); @@ -486,8 +496,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'. useBeanValidation and performBeanValidation are supported."); } // clear model and api doc template as this codegen @@ -692,7 +701,6 @@ public void processOpts() { supportingFiles.add(new SupportingFile(httpInterfacesAbstractConfiguratorFile, (sourceFolder + File.separator + configPackage).replace(".", java.io.File.separator), "HttpInterfacesAbstractConfigurator.java")); - writePropertyBack(USE_BEANVALIDATION, false); writePropertyBack(HTTP_INTERFACES_CONFIGURATOR_DEPENDENCY, useHttpServiceProxyFactoryInterfacesConfigurator ? 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..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,6 +16,11 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.service.annotation.*; import org.springframework.web.multipart.MultipartFile; +{{#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; @@ -29,6 +34,7 @@ import java.util.Optional; import {{javaxPackage}}.annotation.Generated; +{{#useBeanValidation}}{{^useSpringBuiltInValidation}}@Validated{{/useSpringBuiltInValidation}}{{/useBeanValidation}} {{>generatedAnnotation}} {{#operations}} 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 68178062ba09..c9efc47a0c11 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 @@ -105,6 +105,18 @@ true {{/lombok}} + {{#useBeanValidation}} + + org.springframework.boot + 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 fb8fcf58d097..b7b127075997 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 @@ -100,6 +100,18 @@ true {{/lombok}} + {{#useBeanValidation}} + + org.springframework.boot + 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 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/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb3.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb3.mustache index f4a6053d110f..c79dcd303931 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb3.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb3.mustache @@ -213,6 +213,11 @@ jakarta.validation jakarta.validation-api + + + + org.springframework.boot + spring-boot-starter-validation {{/useBeanValidation}} jakarta.annotation diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb4.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb4.mustache index 4ce93ab8e4dd..b5ae1d7e1637 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb4.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb4.mustache @@ -219,6 +219,11 @@ jakarta.validation jakarta.validation-api + + + + org.springframework.boot + spring-boot-starter-validation {{/useBeanValidation}} jakarta.annotation 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 da1e4aefface..bb38a44192a4 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 @@ -6694,6 +6694,129 @@ public void shouldNotHaveDocumentationAnnotationWhenUsingLibrarySpringHttpInterf .assertMethod("addPet").assertParameter("pet").assertParameterAnnotations().doesNotContainWithName("Parameter"); } + @Test + public void testSpringHttpInterfaceUseBeanValidationRespected() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-echo.yaml"); + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOpenAPI(openAPI); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.setLibrary(SPRING_HTTP_INTERFACE); + codegen.setUseSpringBoot3(true); + codegen.additionalProperties().put(BeanValidationFeatures.USE_BEANVALIDATION, "true"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + + generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/StoreApi.java")) + .hasImports("jakarta.validation.Valid") + .hasImports("jakarta.validation.constraints") + .assertTypeAnnotations().containsWithName("Validated"); + } + + @Test + public void testSpringHttpInterfaceUseBeanValidationFalseHasNoValidationAnnotations() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-echo.yaml"); + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOpenAPI(openAPI); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.setLibrary(SPRING_HTTP_INTERFACE); + codegen.setUseSpringBoot3(true); + codegen.additionalProperties().put(BeanValidationFeatures.USE_BEANVALIDATION, "false"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + + generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/StoreApi.java")) + .hasNoImports("jakarta.validation.Valid") + .hasNoImports("jakarta.validation.constraints") + .assertTypeAnnotations().doesNotContainWithName("Validated"); + } + + @Test + public void testSpringHttpInterfaceUseBeanValidationDefaultsToFalse() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-echo.yaml"); + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOpenAPI(openAPI); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.setLibrary(SPRING_HTTP_INTERFACE); + codegen.setUseSpringBoot3(true); + // useBeanValidation not set — should default to false + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + + generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/StoreApi.java")) + .hasNoImports("jakarta.validation.Valid") + .hasNoImports("jakarta.validation.constraints") + .assertTypeAnnotations().doesNotContainWithName("Validated"); + } + + @Test + public void testSpringHttpInterfaceConstraintAnnotationsOnParams() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-echo.yaml"); + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOpenAPI(openAPI); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.setLibrary(SPRING_HTTP_INTERFACE); + codegen.setUseSpringBoot3(true); + codegen.additionalProperties().put(BeanValidationFeatures.USE_BEANVALIDATION, "true"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGenerateMetadata(false); + + generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + // getOrderById has minimum:1 and maximum:5 on orderId path param + JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/StoreApi.java")) + .assertMethod("getOrderById") + .assertParameter("orderId") + .assertParameterAnnotations() + .containsWithName("Min") + .containsWithName("Max"); + } + @DataProvider(name = "jspecifyLibraries") public Object[][] jspecifyLibraries() { return new Object[][]{ diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml index ee2e1b442a12..29aa9b9a1056 100644 --- a/modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml @@ -716,7 +716,7 @@ paths: string: description: None type: string - pattern: /[a-z]/i + pattern: "[a-zA-Z]" pattern_without_delimiter: description: None type: string @@ -1438,7 +1438,7 @@ components: minimum: 67.8 string: type: string - pattern: /[a-z]/i + pattern: "[a-zA-Z]" byte: type: string format: byte 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 7fa5120ec446..f2703860dbe5 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 83f142cf8362..970f2979d763 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 @@ -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/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 e35365f7c21c..8f30e2445ee4 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 @@ -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/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 83f142cf8362..970f2979d763 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 @@ -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/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..69906eac967c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/FILES @@ -0,0 +1,59 @@ +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..ca7bf6e46889 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.23.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..c80e3e2424cb --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated API stub + +[Spring Framework 6.1 HTTP Interface](https://docs.spring.io/spring-framework/reference/integration/rest-clients.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 `RestClient` instance via constructor +```java +@Configuration +public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { + + 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/pom.xml b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml new file mode 100644 index 000000000000..78395e9375ce --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/pom.xml @@ -0,0 +1,81 @@ + + 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.3.13 + + + + + + + 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-web + + + + 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.10 + + + org.springframework.boot + spring-boot-starter-validation + + + + 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..7bb1cb3b742e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-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.23.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 jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @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 new file mode 100644 index 000000000000..928488e03f6b --- /dev/null +++ b/samples/client/petstore/spring-http-interface-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.23.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 jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @Valid @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( + @Valid @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( + @Valid @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( + @Valid @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( + @Valid @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( + @Valid @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( + @NotNull @Valid @RequestParam(value = "query", required = true) String query, + @Valid @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( + @Valid @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( + @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-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, + @RequestPart(value = "binary", required = false) MultipartFile binary, + @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 + ); + + + /** + * 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, + @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 + ); + + + /** + * 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( + @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, + @Valid @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( + @Valid @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( + @Valid @RequestParam(value = "param", required = true) String param, + @Valid @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( + @Valid @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( + @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 + ); + + + /** + * 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..0f577077e6ba --- /dev/null +++ b/samples/client/petstore/spring-http-interface-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.23.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 jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @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 new file mode 100644 index 000000000000..2a57b0d037fa --- /dev/null +++ b/samples/client/petstore/spring-http-interface-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.23.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 jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @Valid @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( + @NotNull @Valid @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( + @NotNull @Valid @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( + @Valid @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, + @Valid @RequestParam(value = "name", required = false) String name, + @Valid @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, + @Valid @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, + @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 new file mode 100644 index 000000000000..ce8d25afc230 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-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.23.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 jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @Min(value = 1L) @Max(value = 5L) @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( + @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 new file mode 100644 index 000000000000..b033431388a0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-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.23.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 jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import org.springframework.validation.annotation.Validated; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @Valid @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( + @Valid @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( + @Valid @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( + @NotNull @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Valid @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, + @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 new file mode 100644 index 000000000000..4d51d8ba6f7c --- /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.23.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.client.RestClient; +import org.springframework.web.client.support.RestClientAdapter; +import org.springframework.web.service.invoker.HttpServiceProxyFactory; + +public abstract class HttpInterfacesAbstractConfigurator { + + private final RestClient client; + + public HttpInterfacesAbstractConfigurator(final RestClient client) { + this.client = client; + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") + AnotherFakeApi anotherFakeHttpProxy() { + 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.builderFor(RestClientAdapter.create(client)).build(); + return factory.createClient(FakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") + FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { + 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.builderFor(RestClientAdapter.create(client)).build(); + return factory.createClient(PetApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") + StoreApi storeHttpProxy() { + 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.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 new file mode 100644 index 000000000000..4defb14ab06f --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..d0a652d31296 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.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 java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..8fc37ac36971 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..15a67cb65809 --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * AdditionalPropertiesClassDto + */ + +@JsonTypeName("AdditionalPropertiesClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("map_string") + 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 + */ + @Valid + @JsonProperty("map_number") + public Map getMapNumber() { + return mapNumber; + } + + @JsonProperty("map_number") + 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; + } + + @JsonProperty("map_integer") + 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; + } + + @JsonProperty("map_boolean") + 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 + */ + @Valid + @JsonProperty("map_array_integer") + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + @JsonProperty("map_array_integer") + 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 + */ + @Valid + @JsonProperty("map_array_anytype") + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + @JsonProperty("map_array_anytype") + 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 + */ + @Valid + @JsonProperty("map_map_string") + public Map> getMapMapString() { + return mapMapString; + } + + @JsonProperty("map_map_string") + 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 + */ + @Valid + @JsonProperty("map_map_anytype") + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + @JsonProperty("map_map_anytype") + 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; + } + + @JsonProperty("anytype_1") + 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; + } + + @JsonProperty("anytype_3") + 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) { + 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 new file mode 100644 index 000000000000..3a29253e68e4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..5b43f60ca5a0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.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 java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..1b178955d59a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.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 java.util.Map; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..ee31c8e82298 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..099b8dab1f59 --- /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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..563f86b1ab06 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ApiResponseDto.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 org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ApiResponseDto + */ + +@JsonTypeName("ApiResponse") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..9efa09e253a1 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.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 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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfArrayOfNumberOnlyDto + */ + +@JsonTypeName("ArrayOfArrayOfNumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("ArrayArrayNumber") + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..582d01454d3d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.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 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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfNumberOnlyDto + */ + +@JsonTypeName("ArrayOfNumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("ArrayNumber") + public List getArrayNumber() { + return arrayNumber; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..373831da62dc --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ArrayTestDto.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 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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayTestDto + */ + +@JsonTypeName("ArrayTest") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("array_of_string") + 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 + */ + @Valid + @JsonProperty("array_array_of_integer") + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + @JsonProperty("array_array_of_integer") + 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 + */ + @Valid + @JsonProperty("array_array_of_model") + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + @JsonProperty("array_array_of_model") + 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) { + 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 new file mode 100644 index 000000000000..89fb131e8523 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/BigCatDto.java @@ -0,0 +1,148 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * BigCatDto + */ + + +@JsonTypeName("BigCat") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..ba4de518b7ee --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -0,0 +1,202 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CapitalizationDto + */ + +@JsonTypeName("Capitalization") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("small_Snake") + 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; + } + + @JsonProperty("Capital_Snake") + 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; + } + + @JsonProperty("SCA_ETH_Flow_Points") + 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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..a6107f4dc418 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CatDto.java @@ -0,0 +1,110 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..c9c69872f6d6 --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CategoryDto + */ + +@JsonTypeName("Category") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..1261d94d4d48 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -0,0 +1,113 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ChildWithNullableDto + */ + + +@JsonTypeName("ChildWithNullable") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..387a3161633d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClassModelDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("_class") + 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) { + 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 new file mode 100644 index 000000000000..41e593622612 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ClientDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ClientDto + */ + +@JsonTypeName("Client") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..43e9f7366a23 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -0,0 +1,204 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ContainerDefaultValueDto + */ + +@JsonTypeName("ContainerDefaultValue") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("nullable_required_array") + 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; + } + + @JsonProperty("required_array") + 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) { + 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 new file mode 100644 index 000000000000..071daa8dbe19 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/DogDto.java @@ -0,0 +1,103 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * DogDto + */ + + +@JsonTypeName("Dog") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..023f44017e60 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -0,0 +1,188 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumArraysDto + */ + +@JsonTypeName("EnumArrays") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("just_symbol") + 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; + } + + @JsonProperty("array_enum") + 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) { + 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/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..d649515e329c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumClassDto.java @@ -0,0 +1,57 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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..b0df8fce27d0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java @@ -0,0 +1,328 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumTestDto + */ + +@JsonTypeName("Enum_Test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("enum_string") + 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; + } + + @JsonProperty("enum_string_required") + 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; + } + + @JsonProperty("enum_integer") + 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; + } + + @JsonProperty("enum_number") + public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTestDto outerEnum(@Nullable OuterEnumDto outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + @Valid + @JsonProperty("outerEnum") + public @Nullable OuterEnumDto getOuterEnum() { + return outerEnum; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..d75120461ebf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..78c063660ccb --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -0,0 +1,118 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FileSchemaTestClassDto + */ + +@JsonTypeName("FileSchemaTestClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("file") + public @Nullable FileDto getFile() { + return file; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("files") + public List<@Valid FileDto> getFiles() { + return files; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..99f72c4be91a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java @@ -0,0 +1,416 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FormatTestDto + */ + +@JsonTypeName("format_test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Min(value = 10) @Max(value = 100) + @JsonProperty("integer") + public @Nullable Integer getInteger() { + return integer; + } + + @JsonProperty("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 + */ + @Min(value = 20) @Max(value = 200) + @JsonProperty("int32") + public @Nullable Integer getInt32() { + return int32; + } + + @JsonProperty("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; + } + + @JsonProperty("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 @Valid @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") + @JsonProperty("number") + public BigDecimal getNumber() { + return number; + } + + @JsonProperty("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 + */ + @DecimalMin(value = "54.3") @DecimalMax(value = "987.6") + @JsonProperty("float") + public @Nullable Float getFloat() { + return _float; + } + + @JsonProperty("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 + */ + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") + @JsonProperty("double") + public @Nullable Double getDouble() { + return _double; + } + + @JsonProperty("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 + */ + @Pattern(regexp = "[a-zA-Z]") + @JsonProperty("string") + public @Nullable String getString() { + return string; + } + + @JsonProperty("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; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("binary") + public @Nullable org.springframework.core.io.Resource getBinary() { + return binary; + } + + @JsonProperty("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 @Valid + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + @JsonProperty("date") + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Valid + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + @JsonProperty("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 @Size(min = 10, max = 64) + @JsonProperty("password") + public String getPassword() { + return password; + } + + @JsonProperty("password") + public void setPassword(String password) { + this.password = password; + } + + public FormatTestDto bigDecimal(@Nullable BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + @Valid + @JsonProperty("BigDecimal") + public @Nullable BigDecimal getBigDecimal() { + return bigDecimal; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..ab6e7f86faf5 --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * HasOnlyReadOnlyDto + */ + +@JsonTypeName("hasOnlyReadOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..def9f91d98de --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ListDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ListDto + */ + +@JsonTypeName("List") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("123-list") + 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) { + 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 new file mode 100644 index 000000000000..e35be0c35d4d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/MapTestDto.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.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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MapTestDto + */ + +@JsonTypeName("MapTest") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("map_map_of_string") + public Map> getMapMapOfString() { + return mapMapOfString; + } + + @JsonProperty("map_map_of_string") + 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; + } + + @JsonProperty("map_of_enum_string") + 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; + } + + @JsonProperty("direct_map") + 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; + } + + @JsonProperty("indirect_map") + 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) { + 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 new file mode 100644 index 000000000000..02147833466f --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MixedPropertiesAndAdditionalPropertiesClassDto + */ + +@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("map") + public Map getMap() { + return map; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..56eedc37eb3a --- /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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("class") + 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) { + 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 new file mode 100644 index 000000000000..7294eb8e8da1 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("snake_case") + 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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..f799006adfa9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -0,0 +1,105 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NullableMapPropertyDto + */ + +@JsonTypeName("NullableMapProperty") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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) { + 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 new file mode 100644 index 000000000000..cfc94268ed13 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NumberOnlyDto.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 java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NumberOnlyDto + */ + +@JsonTypeName("NumberOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class NumberOnlyDto { + + private @Nullable BigDecimal justNumber; + + public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + @Valid + @JsonProperty("JustNumber") + public @Nullable BigDecimal getJustNumber() { + return justNumber; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..3a6d7c9e97dc --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OrderDto.java @@ -0,0 +1,243 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OrderDto + */ + +@JsonTypeName("Order") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("shipDate") + public @Nullable OffsetDateTime getShipDate() { + return shipDate; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..8af51a80496e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -0,0 +1,131 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OuterCompositeDto + */ + +@JsonTypeName("OuterComposite") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("my_number") + public @Nullable BigDecimal getMyNumber() { + return myNumber; + } + + @JsonProperty("my_number") + 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; + } + + @JsonProperty("my_string") + 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; + } + + @JsonProperty("my_boolean") + 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) { + 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/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..aa6b9e3939b6 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/OuterEnumDto.java @@ -0,0 +1,57 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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..678bf04df6ec --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.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.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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..9065b287d683 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java @@ -0,0 +1,276 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * PetDto + */ + +@JsonTypeName("Pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("category") + public @Nullable CategoryDto getCategory() { + return category; + } + + @JsonProperty("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; + } + + @JsonProperty("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) + @JsonProperty("photoUrls") + 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 + */ + @Valid + @JsonProperty("tags") + public List<@Valid TagDto> getTags() { + return tags; + } + + @JsonProperty("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 + */ + + @Deprecated + @JsonProperty("status") + public @Nullable StatusEnum getStatus() { + return status; + } + + /** + * @deprecated + */ + @Deprecated + @JsonProperty("status") + 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) { + 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 new file mode 100644 index 000000000000..a4aee82ba101 --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ReadOnlyFirstDto + */ + +@JsonTypeName("ReadOnlyFirst") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..8e67474a9726 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -0,0 +1,154 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ResponseObjectWithDifferentFieldNamesDto + */ + +@JsonTypeName("ResponseObjectWithDifferentFieldNames") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("lower-case-property-dashes") + 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; + } + + @JsonProperty("property name with spaces") + 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) { + 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 new file mode 100644 index 000000000000..3c3354c75ec4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ReturnDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..061c4371c60e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/SpecialModelNameDto.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * SpecialModelNameDto + */ + +@JsonTypeName("_special_model.name_") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("$special[property.name]") + 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) { + 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 new file mode 100644 index 000000000000..9268799d76d6 --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TagDto + */ + +@JsonTypeName("Tag") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..7db5583baee9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -0,0 +1,194 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderDefaultDto + */ + +@JsonTypeName("TypeHolderDefault") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("string_item") + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefaultDto numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull @Valid + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + @JsonProperty("number_item") + 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; + } + + @JsonProperty("integer_item") + 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; + } + + @JsonProperty("bool_item") + 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; + } + + @JsonProperty("array_item") + 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) { + 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 new file mode 100644 index 000000000000..b04c82097663 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -0,0 +1,218 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderExampleDto + */ + +@JsonTypeName("TypeHolderExample") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("string_item") + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExampleDto numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull @Valid + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + @JsonProperty("number_item") + 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; + } + + @JsonProperty("float_item") + 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; + } + + @JsonProperty("integer_item") + 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; + } + + @JsonProperty("bool_item") + 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; + } + + @JsonProperty("array_item") + 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) { + 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 new file mode 100644 index 000000000000..3274375e2b27 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/UserDto.java @@ -0,0 +1,250 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * UserDto + */ + +@JsonTypeName("User") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..69a20cb29007 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/XmlItemDto.java @@ -0,0 +1,830 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * XmlItemDto + */ + +@JsonTypeName("XmlItem") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("attribute_string") + public void setAttributeString(@Nullable String attributeString) { + this.attributeString = attributeString; + } + + public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + @Valid + @JsonProperty("attribute_number") + public @Nullable BigDecimal getAttributeNumber() { + return attributeNumber; + } + + @JsonProperty("attribute_number") + 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; + } + + @JsonProperty("attribute_integer") + 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; + } + + @JsonProperty("attribute_boolean") + 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; + } + + @JsonProperty("wrapped_array") + 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; + } + + @JsonProperty("name_string") + public void setNameString(@Nullable String nameString) { + this.nameString = nameString; + } + + public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + @Valid + @JsonProperty("name_number") + public @Nullable BigDecimal getNameNumber() { + return nameNumber; + } + + @JsonProperty("name_number") + 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; + } + + @JsonProperty("name_integer") + 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; + } + + @JsonProperty("name_boolean") + 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; + } + + @JsonProperty("name_array") + 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; + } + + @JsonProperty("name_wrapped_array") + 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; + } + + @JsonProperty("prefix_string") + public void setPrefixString(@Nullable String prefixString) { + this.prefixString = prefixString; + } + + public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + @Valid + @JsonProperty("prefix_number") + public @Nullable BigDecimal getPrefixNumber() { + return prefixNumber; + } + + @JsonProperty("prefix_number") + 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; + } + + @JsonProperty("prefix_integer") + 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; + } + + @JsonProperty("prefix_boolean") + 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; + } + + @JsonProperty("prefix_array") + 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; + } + + @JsonProperty("prefix_wrapped_array") + 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; + } + + @JsonProperty("namespace_string") + public void setNamespaceString(@Nullable String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + @Valid + @JsonProperty("namespace_number") + public @Nullable BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + @JsonProperty("namespace_number") + 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; + } + + @JsonProperty("namespace_integer") + 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; + } + + @JsonProperty("namespace_boolean") + 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; + } + + @JsonProperty("namespace_array") + 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; + } + + @JsonProperty("namespace_wrapped_array") + 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; + } + + @JsonProperty("prefix_ns_string") + public void setPrefixNsString(@Nullable String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItemDto prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + @Valid + @JsonProperty("prefix_ns_number") + public @Nullable BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + @JsonProperty("prefix_ns_number") + 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; + } + + @JsonProperty("prefix_ns_integer") + 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; + } + + @JsonProperty("prefix_ns_boolean") + 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; + } + + @JsonProperty("prefix_ns_array") + 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; + } + + @JsonProperty("prefix_ns_wrapped_array") + 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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml b/samples/client/petstore/spring-http-interface-noResponseEntity/pom.xml index dac9967c77ce..40053aa2822b 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.10 + org.springframework.boot spring-boot-starter-test 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 45a699fb2405..4ecbe0594815 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.23.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 f42e7143e123..517ab3f9372e 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.23.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 bbf54c0811b6..6792d11727a7 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.23.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 3eb7d0c2587c..14d49c6b648d 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.23.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 7d8b1be163f6..9ff6864534b6 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.23.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 98079346807a..f5c07843e2e6 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.23.0-SNAPSHOT") public interface UserApi { 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 8c551568f763..e5c5f4a24f8e 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.23.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 94de2ff82148..de05a96e82af 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.23.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 a1cc329f5eb9..ffad966ebe6d 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.23.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 a7cad9399ba2..da401770aa45 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.23.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 249fda7ae574..53d54a2cda04 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.23.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 6c2858091e83..293c2c620239 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 ae4226776f63..ab2185b1f917 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 b6041147eaa5..6a2800c144c3 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.23.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 06deed1e07d9..cd0c12cf7229 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 be041f3dcf5f..461d3e3e0f00 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.23.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 246a8271dd4b..42c2f5dc6630 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 adb785d1664b..6bf7f47c2144 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 74f0a256ba26..479c1dd7961b 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 0e6690648c37..6f3da70f0437 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/.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..f91496ca5b57 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/FILES @@ -0,0 +1,59 @@ +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..ca7bf6e46889 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.23.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..a356b5d34378 --- /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.1 HTTP Interface](https://docs.spring.io/spring-framework/reference/integration/rest-clients.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..533deace8d5e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/pom.xml @@ -0,0 +1,81 @@ + + 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.3.13 + + + + + + + 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.10 + + + org.springframework.boot + spring-boot-starter-validation + + + + 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..ac9fc7353db3 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.23.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 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; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @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 new file mode 100644 index 000000000000..29c3ebfe6b58 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,386 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.23.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 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; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @Valid @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( + @Valid @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( + @Valid @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( + @Valid @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( + @Valid @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( + @Valid @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( + @NotNull @Valid @RequestParam(value = "query", required = true) String query, + @Valid @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( + @Valid @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( + @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-zA-Z]") @Valid @RequestPart(value = "string", required = false) String string, + @RequestPart(value = "binary", required = false) Part binary, + @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 + ); + + + /** + * 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, + @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 + ); + + + /** + * 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( + @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, + @Valid @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( + @Valid @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( + @Valid @RequestPart(value = "param", required = true) String param, + @Valid @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( + @Valid @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( + @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 + ); + + + /** + * 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..031baa851b71 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.23.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 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; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @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 new file mode 100644 index 000000000000..901a3d8929ed --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,233 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.23.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 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; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @Valid @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( + @NotNull @Valid @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( + @NotNull @Valid @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( + @Valid @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, + @Valid @RequestPart(value = "name", required = false) String name, + @Valid @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, + @Valid @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, + @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 new file mode 100644 index 000000000000..304674cf875b --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,103 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.23.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 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; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @Min(value = 1L) @Max(value = 5L) @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( + @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 new file mode 100644 index 000000000000..010e83b64b59 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,179 @@ +/* + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.23.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 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; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Validated +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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( + @Valid @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( + @Valid @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( + @Valid @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( + @NotNull @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Valid @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, + @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 new file mode 100644 index 000000000000..685b4747a68d --- /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.23.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 client; + + public HttpInterfacesAbstractConfigurator(final WebClient client) { + this.client = client; + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") + AnotherFakeApi anotherFakeHttpProxy() { + 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(client)).build(); + return factory.createClient(FakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") + FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { + 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(client)).build(); + return factory.createClient(PetApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") + StoreApi storeHttpProxy() { + 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(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 new file mode 100644 index 000000000000..4b5789b8140b --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,124 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..72972a91a36c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.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 java.util.List; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..f752e798bb38 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,124 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..4aa2915fc1fb --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * AdditionalPropertiesClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("map_string") + 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 + */ + @Valid + @JsonProperty("map_number") + public Map getMapNumber() { + return mapNumber; + } + + @JsonProperty("map_number") + 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; + } + + @JsonProperty("map_integer") + 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; + } + + @JsonProperty("map_boolean") + 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 + */ + @Valid + @JsonProperty("map_array_integer") + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + @JsonProperty("map_array_integer") + 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 + */ + @Valid + @JsonProperty("map_array_anytype") + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + @JsonProperty("map_array_anytype") + 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 + */ + @Valid + @JsonProperty("map_map_string") + public Map> getMapMapString() { + return mapMapString; + } + + @JsonProperty("map_map_string") + 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 + */ + @Valid + @JsonProperty("map_map_anytype") + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + @JsonProperty("map_map_anytype") + 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; + } + + @JsonProperty("anytype_1") + 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; + } + + @JsonProperty("anytype_3") + 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) { + 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 new file mode 100644 index 000000000000..1760e75c79fe --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,124 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..57794e4e161a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.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 java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..8e647e01973c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.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 java.util.Map; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..d4585a1c182a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,124 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..d3d603e8438c --- /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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..a1bdb240a640 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,92 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfArrayOfNumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("ArrayArrayNumber") + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..445dbdfbd7e3 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,92 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfNumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("ArrayNumber") + public List getArrayNumber() { + return arrayNumber; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..f527c0530cf1 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ArrayTest.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 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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayTest + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("array_of_string") + 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 + */ + @Valid + @JsonProperty("array_array_of_integer") + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + @JsonProperty("array_array_of_integer") + 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 + */ + @Valid + @JsonProperty("array_array_of_model") + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + @JsonProperty("array_array_of_model") + 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) { + 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 new file mode 100644 index 000000000000..4f56e84e8adf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,153 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * BigCat + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..f8b961f18d3c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,200 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Capitalization + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("small_Snake") + 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; + } + + @JsonProperty("Capital_Snake") + 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; + } + + @JsonProperty("SCA_ETH_Flow_Points") + 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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..632159333408 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,116 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..33ba1e915b40 --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Category + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..3050573aadc4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ChildWithNullable.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.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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..ccab6f37d4da --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,80 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("_class") + 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) { + 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 new file mode 100644 index 000000000000..6356b91a50c2 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,80 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Client + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..2d0a60c0c749 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -0,0 +1,210 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ContainerDefaultValue + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("nullable_required_array") + 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; + } + + @JsonProperty("required_array") + 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) { + 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 new file mode 100644 index 000000000000..4a23fb2cf608 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,108 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Dog + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..50d39d1b4a02 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,186 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumArrays + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("just_symbol") + 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; + } + + @JsonProperty("array_enum") + 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) { + 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/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..66690c41e644 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,57 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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..487736b0f334 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,335 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumTest + */ + +@JsonTypeName("Enum_Test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("enum_string") + 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; + } + + @JsonProperty("enum_string_required") + 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; + } + + @JsonProperty("enum_integer") + 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; + } + + @JsonProperty("enum_number") + public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(@Nullable OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + @Valid + @JsonProperty("outerEnum") + public @Nullable OuterEnum getOuterEnum() { + return outerEnum; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..3ddd68bff4c8 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/File.java @@ -0,0 +1,80 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Must be named `File` for test. + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..7ae64bc1b161 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,116 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FileSchemaTestClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("file") + public @Nullable File getFile() { + return file; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("files") + public List<@Valid File> getFiles() { + return files; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..4660532f1ea0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,426 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FormatTest + */ + +@JsonTypeName("format_test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Min(value = 10) @Max(value = 100) + @JsonProperty("integer") + public @Nullable Integer getInteger() { + return integer; + } + + @JsonProperty("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 + */ + @Min(value = 20) @Max(value = 200) + @JsonProperty("int32") + public @Nullable Integer getInt32() { + return int32; + } + + @JsonProperty("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; + } + + @JsonProperty("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 @Valid @DecimalMin(value = "32.1") @DecimalMax(value = "543.2") + @JsonProperty("number") + public BigDecimal getNumber() { + return number; + } + + @JsonProperty("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 + */ + @DecimalMin(value = "54.3") @DecimalMax(value = "987.6") + @JsonProperty("float") + public @Nullable Float getFloat() { + return _float; + } + + @JsonProperty("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 + */ + @DecimalMin(value = "67.8") @DecimalMax(value = "123.4") + @JsonProperty("double") + public @Nullable Double getDouble() { + return _double; + } + + @JsonProperty("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 + */ + @Pattern(regexp = "[a-zA-Z]") + @JsonProperty("string") + public @Nullable String getString() { + return string; + } + + @JsonProperty("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; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("binary") + public @Nullable org.springframework.core.io.Resource getBinary() { + return binary; + } + + @JsonProperty("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 @Valid + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + @JsonProperty("date") + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(@Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + @Valid + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + @JsonProperty("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 @Size(min = 10, max = 64) + @JsonProperty("password") + public String getPassword() { + return password; + } + + @JsonProperty("password") + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(@Nullable BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + @Valid + @JsonProperty("BigDecimal") + public @Nullable BigDecimal getBigDecimal() { + return bigDecimal; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..0a56c5fad8dc --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * HasOnlyReadOnly + */ + +@JsonTypeName("hasOnlyReadOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..4f0b2eda8f8f --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,222 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MapTest + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("map_map_of_string") + public Map> getMapMapOfString() { + return mapMapOfString; + } + + @JsonProperty("map_map_of_string") + 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; + } + + @JsonProperty("map_of_enum_string") + 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; + } + + @JsonProperty("direct_map") + 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; + } + + @JsonProperty("indirect_map") + 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) { + 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 new file mode 100644 index 000000000000..f3fcf373a3ad --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("uuid") + public @Nullable UUID getUuid() { + return uuid; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("dateTime") + public @Nullable OffsetDateTime getDateTime() { + return dateTime; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("map") + public Map getMap() { + return map; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..6a6638acb883 --- /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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("class") + 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) { + 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 new file mode 100644 index 000000000000..f567c473e866 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelApiResponse.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 org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ModelApiResponse + */ + +@JsonTypeName("ApiResponse") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..dfaca2d036ac --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelList.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ModelList + */ + +@JsonTypeName("List") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("123-list") + 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) { + 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 new file mode 100644 index 000000000000..fac36f92b241 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ModelReturn.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..207ba4647ac5 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,163 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("snake_case") + 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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..b74be961d9f5 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -0,0 +1,103 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NullableMapProperty + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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) { + 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 new file mode 100644 index 000000000000..10d5f7fcbb91 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NumberOnly.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 java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") +public class NumberOnly { + + private @Nullable BigDecimal justNumber; + + public NumberOnly justNumber(@Nullable BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + @Valid + @JsonProperty("JustNumber") + public @Nullable BigDecimal getJustNumber() { + return justNumber; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..27b84a3d0f52 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,241 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Order + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("shipDate") + public @Nullable OffsetDateTime getShipDate() { + return shipDate; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..e1402d40fec4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterComposite.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 java.math.BigDecimal; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OuterComposite + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 + */ + @Valid + @JsonProperty("my_number") + public @Nullable BigDecimal getMyNumber() { + return myNumber; + } + + @JsonProperty("my_number") + 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; + } + + @JsonProperty("my_string") + 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; + } + + @JsonProperty("my_boolean") + 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) { + 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/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..d5445f2d6f17 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,57 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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..934e78e355ea --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,163 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +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.23.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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..d0941920c27f --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,282 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Pet + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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 + */ + @Valid + @JsonProperty("category") + public @Nullable Category getCategory() { + return category; + } + + @JsonProperty("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; + } + + @JsonProperty("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) + @JsonProperty("photoUrls") + 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 + */ + @Valid + @JsonProperty("tags") + public List<@Valid Tag> getTags() { + return tags; + } + + @JsonProperty("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 + */ + + @Deprecated + @JsonProperty("status") + public @Nullable StatusEnum getStatus() { + return status; + } + + /** + * @deprecated + */ + @Deprecated + @JsonProperty("status") + 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) { + 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 new file mode 100644 index 000000000000..4dcd5de9926f --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ReadOnlyFirst + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..97cac5f03303 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.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 org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ResponseObjectWithDifferentFieldNames + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("lower-case-property-dashes") + 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; + } + + @JsonProperty("property name with spaces") + 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) { + 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 new file mode 100644 index 000000000000..0aead77a8aed --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/SpecialModelName.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 com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * SpecialModelName + */ + +@JsonTypeName("_special_model.name_") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("$special[property.name]") + 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) { + 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 new file mode 100644 index 000000000000..1b3eb0e70b4d --- /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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Tag + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..ce3f3c85ba26 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,203 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderDefault + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("string_item") + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull @Valid + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + @JsonProperty("number_item") + 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; + } + + @JsonProperty("integer_item") + 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; + } + + @JsonProperty("bool_item") + 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; + } + + @JsonProperty("array_item") + 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) { + 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 new file mode 100644 index 000000000000..c2f9abc5c346 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,228 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderExample + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("string_item") + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull @Valid + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + @JsonProperty("number_item") + 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; + } + + @JsonProperty("float_item") + 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; + } + + @JsonProperty("integer_item") + 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; + } + + @JsonProperty("bool_item") + 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; + } + + @JsonProperty("array_item") + 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) { + 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 new file mode 100644 index 000000000000..25db45c5d1d1 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,248 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * User + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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; + } + + @JsonProperty("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) { + 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 new file mode 100644 index 000000000000..5a3b1064072c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,828 @@ +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.Valid; +import jakarta.validation.constraints.*; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * XmlItem + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; + } + + @JsonProperty("attribute_string") + public void setAttributeString(@Nullable String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(@Nullable BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + @Valid + @JsonProperty("attribute_number") + public @Nullable BigDecimal getAttributeNumber() { + return attributeNumber; + } + + @JsonProperty("attribute_number") + 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; + } + + @JsonProperty("attribute_integer") + 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; + } + + @JsonProperty("attribute_boolean") + 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; + } + + @JsonProperty("wrapped_array") + 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; + } + + @JsonProperty("name_string") + public void setNameString(@Nullable String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(@Nullable BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + @Valid + @JsonProperty("name_number") + public @Nullable BigDecimal getNameNumber() { + return nameNumber; + } + + @JsonProperty("name_number") + 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; + } + + @JsonProperty("name_integer") + 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; + } + + @JsonProperty("name_boolean") + 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; + } + + @JsonProperty("name_array") + 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; + } + + @JsonProperty("name_wrapped_array") + 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; + } + + @JsonProperty("prefix_string") + public void setPrefixString(@Nullable String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(@Nullable BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + @Valid + @JsonProperty("prefix_number") + public @Nullable BigDecimal getPrefixNumber() { + return prefixNumber; + } + + @JsonProperty("prefix_number") + 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; + } + + @JsonProperty("prefix_integer") + 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; + } + + @JsonProperty("prefix_boolean") + 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; + } + + @JsonProperty("prefix_array") + 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; + } + + @JsonProperty("prefix_wrapped_array") + 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; + } + + @JsonProperty("namespace_string") + public void setNamespaceString(@Nullable String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(@Nullable BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + @Valid + @JsonProperty("namespace_number") + public @Nullable BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + @JsonProperty("namespace_number") + 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; + } + + @JsonProperty("namespace_integer") + 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; + } + + @JsonProperty("namespace_boolean") + 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; + } + + @JsonProperty("namespace_array") + 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; + } + + @JsonProperty("namespace_wrapped_array") + 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; + } + + @JsonProperty("prefix_ns_string") + public void setPrefixNsString(@Nullable String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(@Nullable BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + @Valid + @JsonProperty("prefix_ns_number") + public @Nullable BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + @JsonProperty("prefix_ns_number") + 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; + } + + @JsonProperty("prefix_ns_integer") + 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; + } + + @JsonProperty("prefix_ns_boolean") + 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; + } + + @JsonProperty("prefix_ns_array") + 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; + } + + @JsonProperty("prefix_ns_wrapped_array") + 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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } +} + 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 2ed48fcfdb7f..e2b79a1d6e5f 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.10 + org.springframework.boot spring-boot-starter-test 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 29ea70aa83c2..c2d95d240ff9 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.23.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 f1628519ac01..1949724424e3 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.23.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 3a6fa96b81bd..443e5f439796 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.23.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 c4005043b92a..972696608578 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.23.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 5dad71443275..bd0605110a8c 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.23.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 e36d16315ab0..6424d49f7d6f 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.23.0-SNAPSHOT") public interface UserApi { 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 23b49dbabecb..250bceecf3a9 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.23.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 48cf91c90871..f4557b6412d8 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.23.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 0ae75b8f0259..01c25f226bb5 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.23.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 41a9d3717df4..30bd369659b8 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.23.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 9d93832b96c8..77f054373ac4 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.23.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 05ac70008fdf..c482c5341925 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 b02c7a9f000f..50fa2c3e92b6 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 b903175cb8bb..5f294d7da745 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.23.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 0eeed5988edb..535dbce06fa0 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 882c51c94e8c..806f8434fac9 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.23.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 b9ed51e58efb..fd2f267e9ba2 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 8f46eb130671..0bed4c4228f1 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 e91483bc88e3..8744066d7fcb 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 d661a09b1dba..f8a720e2bf33 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 ef605ab6abed..e7c21060e3b5 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.10 + org.springframework.boot spring-boot-starter-test 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 bdb560ff7965..c175c4e45bcf 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.23.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 806b3dc7a109..4b4939018ddb 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.23.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 3d80b751a7ba..6acaae17734c 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.23.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 a47cbe6ad548..53dab27383f7 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.23.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 df177b8e82da..5ff560524382 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.23.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 b235c3ddd8a8..75a896e85fed 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.23.0-SNAPSHOT") public interface UserApi { 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 23b49dbabecb..250bceecf3a9 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.23.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 48cf91c90871..f4557b6412d8 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.23.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 0ae75b8f0259..01c25f226bb5 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.23.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 41a9d3717df4..30bd369659b8 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.23.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 9d93832b96c8..77f054373ac4 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.23.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 05ac70008fdf..c482c5341925 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 b02c7a9f000f..50fa2c3e92b6 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 b903175cb8bb..5f294d7da745 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.23.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 0eeed5988edb..535dbce06fa0 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 882c51c94e8c..806f8434fac9 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.23.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 b9ed51e58efb..fd2f267e9ba2 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 8f46eb130671..0bed4c4228f1 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 e91483bc88e3..8744066d7fcb 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 d661a09b1dba..f8a720e2bf33 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 a93c0ff47b6b..33e8d367e653 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,11 @@ jakarta.validation jakarta.validation-api + + 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/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8e0dd1e5c732..7bb1cb3b742e 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.23.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 291431bce217..928488e03f6b 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.23.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-zA-Z]") @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 8c4a92e8b085..0f577077e6ba 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.23.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 db135e461652..2a57b0d037fa 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.23.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 246a529d7d31..ce8d25afc230 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.23.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 ed06531230c3..b033431388a0 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.23.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 0b074a9537c0..e96d30739e73 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 7ab75850b533..74c1b86b640a 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 72293487deba..3cf0d893d6e4 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 b6370fb130cc..8070ab28b474 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,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; @@ -100,7 +94,7 @@ public AdditionalPropertiesClassDto putMapNumberItem(String key, BigDecimal mapN * Get mapNumber * @return mapNumber */ - + @Valid @JsonProperty("map_number") public Map getMapNumber() { return mapNumber; @@ -184,7 +178,7 @@ public AdditionalPropertiesClassDto putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; @@ -212,7 +206,7 @@ public AdditionalPropertiesClassDto putMapArrayAnytypeItem(String key, List> getMapArrayAnytype() { return mapArrayAnytype; @@ -240,7 +234,7 @@ public AdditionalPropertiesClassDto putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; @@ -268,7 +262,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 bb20259c4bbf..c0ffa1dadbfe 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 76cb0328e183..7621f86e165e 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 ba0252145b8a..9e0d33d81d94 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 fc774438ea33..95d4d3d8fd2a 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 e60bef826a6f..1cac8089ca25 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 fe793dff444e..8ee7a521ddbf 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 4778d163dc66..4b00ec723e41 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,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { @@ -45,7 +46,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 a645b17a2d0c..7e486de36597 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,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { @@ -45,7 +46,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 7de0a928c7be..dc5306a5c3a6 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,11 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class ArrayTestDto { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - - private List> arrayArrayOfModel = new ArrayList<>(); + private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -79,7 +78,7 @@ public ArrayTestDto addArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - + @Valid @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; @@ -90,12 +89,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 +106,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/BigCatDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java index f0b50596da48..5269c9f37669 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 1fbd31f38f3b..1029772d7343 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 1a2a0fcfa76d..245242527407 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 9a67ef8f8320..a8a715637359 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.*; @@ -58,7 +60,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 a499dd31c542..a1e71df6606a 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 072080ac8573..d3f010d7ac41 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 1d58b17ed8d0..7fad32fda182 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 bef73f7f0099..0cb9923c23e5 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,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class ContainerDefaultValueDto { - private @Nullable List nullableArray; - private List nullableRequiredArray; - private List requiredArray = new ArrayList<>(); - private @Nullable List nullableArrayWithDefault = new ArrayList<>(Arrays.asList("foo", "bar")); public ContainerDefaultValueDto() { @@ -85,7 +83,7 @@ public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequ * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull + @NotNull @JsonProperty("nullable_required_array") public List getNullableRequiredArray() { return nullableRequiredArray; @@ -113,7 +111,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 1400e3a41327..95ef76648fa7 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 57958d01dbcf..d0045e55f9e9 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,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-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 922565070f25..c5abd96a03c7 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 26e43b03f3fb..d15d6e94a4f9 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.*; @@ -210,7 +212,7 @@ public EnumTestDto enumStringRequired(EnumStringRequiredEnum enumStringRequired) * Get enumStringRequired * @return enumStringRequired */ - @NotNull + @NotNull @JsonProperty("enum_string_required") public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; @@ -270,7 +272,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 05df467ae083..1522799bfde0 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 f4173829aee6..ae69d4eba587 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,7 @@ public class FileSchemaTestClassDto { private @Nullable FileDto file; - - private List files = new ArrayList<>(); + private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(@Nullable FileDto file) { this.file = file; @@ -39,7 +40,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,14 +68,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/FormatTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java index 80a974486371..072008e22c39 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; @@ -94,7 +96,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; @@ -136,7 +138,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; @@ -158,7 +160,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; @@ -180,7 +182,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; @@ -200,7 +202,7 @@ public FormatTestDto string(@Nullable String string) { * Get string * @return string */ - + @Pattern(regexp = "[a-zA-Z]") @JsonProperty("string") public @Nullable String getString() { return string; @@ -220,7 +222,7 @@ public FormatTestDto _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull + @NotNull @JsonProperty("byte") public byte[] getByte() { return _byte; @@ -240,7 +242,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; @@ -260,7 +262,7 @@ public FormatTestDto date(LocalDate date) { * Get date * @return date */ - @NotNull + @NotNull @Valid @JsonProperty("date") public LocalDate getDate() { return date; @@ -280,7 +282,7 @@ public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -300,7 +302,7 @@ public FormatTestDto uuid(@Nullable UUID uuid) { * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -320,7 +322,7 @@ public FormatTestDto password(String password) { * Get password * @return password */ - @NotNull + @NotNull @Size(min = 10, max = 64) @JsonProperty("password") public String getPassword() { return password; @@ -340,7 +342,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 7128f0cb7af2..3db8c83a215d 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 7f53e98f878b..7be7d4a7c370 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 535ff50391f5..386a59c2143f 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,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class MapTestDto { - private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +63,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) { @@ -88,7 +86,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 a2acfb05b862..a1ff424b082d 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,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) { @@ -44,7 +45,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; @@ -92,7 +93,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 3d04516de024..efee15e542d4 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 ef98b8310170..849ea8467d4d 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 71e3809b8d96..08831444f068 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,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class NullableMapPropertyDto { - 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 829e657a69ed..4be26138df31 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 c19aebc96db3..39df2e1377c6 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.*; @@ -143,7 +145,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 355b3ef0f852..b8f8b2c95f50 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 d9d1521c9e28..4f21c525a906 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 863f69b1744c..037c28a14e77 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 60fb8e2fa9a8..364e5a42cc01 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,9 @@ public class PetDto { private String name; - private Set photoUrls = new LinkedHashSet<>(); - - private List tags = new ArrayList<>(); + private List<@Valid TagDto> tags = new ArrayList<>(); /** * pet status in the store @@ -115,7 +115,7 @@ public PetDto category(@Nullable CategoryDto category) { * Get category * @return category */ - + @Valid @JsonProperty("category") public @Nullable CategoryDto getCategory() { return category; @@ -135,7 +135,7 @@ public PetDto name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; @@ -163,7 +163,7 @@ public PetDto addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull + @NotNull @JsonProperty("photoUrls") public Set getPhotoUrls() { return photoUrls; @@ -175,7 +175,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 +192,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-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 7ce6a0ce0833..6e34b03d4eb1 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 69c25f51293a..4a8f71db8599 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 a9cc366e60f0..08378f23a74a 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 881eb91c114b..8657e1cc96da 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 4d07ce53fc78..dfdf239c3060 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 ecf5062b4c3c..356e5704e78a 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,6 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { @@ -49,7 +50,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; @@ -89,7 +90,7 @@ public TypeHolderDefaultDto integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -109,7 +110,7 @@ public TypeHolderDefaultDto boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -137,7 +138,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 b5c2030f3448..d596a32ca8b7 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,6 @@ public class TypeHolderExampleDto { private Boolean boolItem; - private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { @@ -51,7 +52,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; @@ -91,7 +92,7 @@ public TypeHolderExampleDto floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull + @NotNull @JsonProperty("float_item") public Float getFloatItem() { return floatItem; @@ -111,7 +112,7 @@ public TypeHolderExampleDto integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -131,7 +132,7 @@ public TypeHolderExampleDto boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -159,7 +160,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 afcf0ca06202..a99791b1b110 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 b604678a62a6..9b09b99effd9 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,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -44,10 +45,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -58,10 +57,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -72,10 +69,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -86,10 +81,8 @@ public class XmlItemDto { private @Nullable Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(@Nullable String attributeString) { @@ -121,7 +114,7 @@ public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - + @Valid @JsonProperty("attribute_number") public @Nullable BigDecimal getAttributeNumber() { return attributeNumber; @@ -229,7 +222,7 @@ public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - + @Valid @JsonProperty("name_number") public @Nullable BigDecimal getNameNumber() { return nameNumber; @@ -365,7 +358,7 @@ public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - + @Valid @JsonProperty("prefix_number") public @Nullable BigDecimal getPrefixNumber() { return prefixNumber; @@ -501,7 +494,7 @@ public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - + @Valid @JsonProperty("namespace_number") public @Nullable BigDecimal getNamespaceNumber() { return namespaceNumber; @@ -637,7 +630,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-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml index 5b659b51d04e..52b83371b972 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml @@ -67,6 +67,11 @@ jackson-databind-nullable 0.2.10 + + 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 5a2007278c4e..38398b67bd68 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.23.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 f18dee36a5e6..1a5b9b906a4b 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.23.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-zA-Z]") @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 8c8b800cc6f7..1ef89661c4fa 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.23.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 86f9587e35ed..bbca7f67af1b 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.23.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 bc588daf8e6e..46549ee820b9 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.23.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 0d25254f831c..348f14d1ed14 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.23.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 4b8b6048c87d..c1633741da75 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 4d87ce73a956..22a1d5b878db 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 8d1ee9e61129..0a0864e8a6c2 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 23b49dbabecb..7dc8433a9dcf 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,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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; @@ -102,7 +96,7 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - + @Valid @JsonProperty("map_number") public Map getMapNumber() { return mapNumber; @@ -186,7 +180,7 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; @@ -214,7 +208,7 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - + @Valid @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { return mapArrayAnytype; @@ -242,7 +236,7 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; @@ -270,7 +264,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 b37a4828dea7..c03a7e09e92f 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 7de65bcc3f53..276aa4bc5afb 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 0383884c26d7..61b4dd692d5f 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 755b694e5cc1..9dbeafe331f0 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 06737f7ad869..21511f8d8da5 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 48cf91c90871..b1007907c821 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,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - 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-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 0ae75b8f0259..caae29c59204 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,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class ArrayOfNumberOnly { - 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-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 41a9d3717df4..6a9d1401b117 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,11 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class ArrayTest { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - - private List> arrayArrayOfModel = new ArrayList<>(); + private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -78,7 +77,7 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - + @Valid @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; @@ -89,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<>(); } @@ -106,14 +105,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 f39cb8ca7321..13db2ce95064 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 e559d99dc5d9..be851f549bbb 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 c7beb9d4a9de..a13e4e475f9b 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 a7a132cb894e..8736d12a384e 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 8498e2b9a708..230864149bbc 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 85a9fed89c1b..db10219d96c9 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 d2c70d9e4d35..92b383287013 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 9d93832b96c8..be7192127937 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,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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() { @@ -93,7 +91,7 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull + @NotNull @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { return nullableRequiredArray; @@ -121,7 +119,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 27cb851a2bd4..40b6cc7db5d2 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 05ac70008fdf..0c77c5ffee42 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,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-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 2e891a8f09a1..a4ba505435aa 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 2da421dffb38..2a687de88df2 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 8429859d3377..f348aef0263d 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 b02c7a9f000f..5ca43cc7390c 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,7 @@ public class FileSchemaTestClass { private @Nullable File file; - - private List files = new ArrayList<>(); + 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; @@ -49,7 +50,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 +67,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 c3bbb8f98333..a508904e1f0c 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-zA-Z]") @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 7f0c994f6a96..6578165f0c85 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 b903175cb8bb..7cddbfef289f 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,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class MapTest { - private Map> mapMapOfString = new HashMap<>(); /** @@ -61,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 MapTest mapMapOfString(Map> mapMapOfString) { @@ -87,7 +85,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 0eeed5988edb..1b4e5d30bb7b 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,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) { @@ -43,7 +44,7 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(@Nullable UUID uuid) { * Get uuid * @return uuid */ - + @Valid @JsonProperty("uuid") public @Nullable UUID getUuid() { return uuid; @@ -63,7 +64,7 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(@Nullable OffsetDate * Get dateTime * @return dateTime */ - + @Valid @JsonProperty("dateTime") public @Nullable OffsetDateTime getDateTime() { return dateTime; @@ -91,7 +92,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 a2ffa7e533b2..8f3a60aa1559 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 45a5e1a45d5f..d7a57f0fc88d 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 1b8931267a70..21ddbae0a18c 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 a7a422e07f6a..1142390d929b 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 74b915d89383..88434a2cb4c8 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 882c51c94e8c..cb5b390a1f22 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,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class NullableMapProperty { - 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 a69294d69157..a8e65432538b 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 5b80332b82f5..a1642a5bbd6a 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 2237e2190cf4..16c721951b0a 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 42ffb9808d4c..2694e55af0bf 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 bb7647b0df96..2b837a984718 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 b9ed51e58efb..3fd0cd7c8589 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,9 @@ public class Pet { private String name; - private Set photoUrls = new LinkedHashSet<>(); - - private List tags = new ArrayList<>(); + private List<@Valid Tag> tags = new ArrayList<>(); /** * pet status in the store @@ -122,7 +122,7 @@ public Pet category(@Nullable Category category) { * Get category * @return category */ - + @Valid @JsonProperty("category") public @Nullable Category getCategory() { return category; @@ -142,7 +142,7 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull + @NotNull @JsonProperty("name") public String getName() { return name; @@ -170,7 +170,7 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull + @NotNull @JsonProperty("photoUrls") public Set getPhotoUrls() { return photoUrls; @@ -182,7 +182,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 +199,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 47b8d70304cf..52d9f883f8c4 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 d4a0fbc37115..19c4e3510199 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 01fe41f7f3e7..595fec0f6a9a 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 76c4d2bb5757..04fd5681acdf 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 8f46eb130671..b21c107bd1c8 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,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - 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; @@ -79,7 +80,7 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -99,7 +100,7 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -119,7 +120,7 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -147,7 +148,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 e91483bc88e3..3c74907a50f4 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,6 @@ public class TypeHolderExample { private Boolean boolItem; - 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; @@ -82,7 +83,7 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull + @NotNull @Valid @JsonProperty("number_item") public BigDecimal getNumberItem() { return numberItem; @@ -102,7 +103,7 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull + @NotNull @JsonProperty("float_item") public Float getFloatItem() { return floatItem; @@ -122,7 +123,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull + @NotNull @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; @@ -142,7 +143,7 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull + @NotNull @JsonProperty("bool_item") public Boolean getBoolItem() { return boolItem; @@ -170,7 +171,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 1c61c1284c5b..bb001682f05c 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 d661a09b1dba..0c220655dee0 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,6 @@ public class XmlItem { private @Nullable Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -43,10 +44,8 @@ public class XmlItem { private @Nullable Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -57,10 +56,8 @@ public class XmlItem { private @Nullable Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -71,10 +68,8 @@ public class XmlItem { private @Nullable Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -85,10 +80,8 @@ public class XmlItem { private @Nullable Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(@Nullable String attributeString) { @@ -120,7 +113,7 @@ public XmlItem attributeNumber(@Nullable BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - + @Valid @JsonProperty("attribute_number") public @Nullable BigDecimal getAttributeNumber() { return attributeNumber; @@ -228,7 +221,7 @@ public XmlItem nameNumber(@Nullable BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - + @Valid @JsonProperty("name_number") public @Nullable BigDecimal getNameNumber() { return nameNumber; @@ -364,7 +357,7 @@ public XmlItem prefixNumber(@Nullable BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - + @Valid @JsonProperty("prefix_number") public @Nullable BigDecimal getPrefixNumber() { return prefixNumber; @@ -500,7 +493,7 @@ public XmlItem namespaceNumber(@Nullable BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - + @Valid @JsonProperty("namespace_number") public @Nullable BigDecimal getNamespaceNumber() { return namespaceNumber; @@ -636,7 +629,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/pom.xml b/samples/client/petstore/spring-http-interface/pom.xml index 8731146905d4..8114dae1ef25 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.10 + org.springframework.boot spring-boot-starter-test 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 8e0dd1e5c732..a89c6a8dece3 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.23.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 291431bce217..4c73af7966b7 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.23.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 8c4a92e8b085..440463ff4507 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.23.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 db135e461652..5e5f80e109ac 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.23.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 246a529d7d31..b604ef04b340 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.23.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 ed06531230c3..95a8df3558f5 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.23.0-SNAPSHOT") public interface UserApi { 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 8c551568f763..e5c5f4a24f8e 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.23.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 94de2ff82148..de05a96e82af 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.23.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 a1cc329f5eb9..ffad966ebe6d 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.23.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 a7cad9399ba2..da401770aa45 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.23.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 249fda7ae574..53d54a2cda04 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.23.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 6c2858091e83..293c2c620239 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 ae4226776f63..ab2185b1f917 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 b6041147eaa5..6a2800c144c3 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.23.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 06deed1e07d9..cd0c12cf7229 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 be041f3dcf5f..461d3e3e0f00 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.23.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 246a8271dd4b..42c2f5dc6630 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 adb785d1664b..6bf7f47c2144 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 74f0a256ba26..479c1dd7961b 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 0e6690648c37..6f3da70f0437 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 19d0d28f105f..ee0b49aefdcf 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 83f142cf8362..970f2979d763 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 a24b858679ff..0e03dbfbbc94 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 83f142cf8362..970f2979d763 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 83f142cf8362..970f2979d763 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/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 906da4426b81..6b8786e73a83 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -320,7 +320,7 @@ ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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.23.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 f9f3c667c930..885ef40b3766 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.23.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 770874e8afc1..87bd99730a4b 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.23.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 fdfd5353942c..f18a2d0bcee5 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.23.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 643241c007b4..4bafa879b93f 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.23.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 e1d983b46eb8..a0c6397e1611 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 2559da13bf1c..93aca6b11aa3 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/FormatTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java index 63dbbbe86b4e..6d1b26fef8e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java @@ -209,7 +209,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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.23.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 5d447d9c8b94..77a4a8896528 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 85b9061b4838..2e6cdbb5a8fe 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.23.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 7df5bfaa96a1..34634c738c66 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 54da716e88fa..a577f9885c3d 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 3010024c7058..681b32cbe91b 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 cc89638b7b3a..8db8aa55717b 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 e35365f7c21c..8f30e2445ee4 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 83f142cf8362..970f2979d763 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 83f142cf8362..970f2979d763 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 83f142cf8362..970f2979d763 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 83f142cf8362..970f2979d763 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 dccf04a89caa..bccd8f9bcc22 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 dccf04a89caa..bccd8f9bcc22 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-jspecify/src/main/java/org/openapitools/model/Foo.java b/samples/openapi3/server/petstore/springboot-4-jspecify/src/main/java/org/openapitools/model/Foo.java index 81ac8b51b79a..6be3cc58afcb 100644 --- a/samples/openapi3/server/petstore/springboot-4-jspecify/src/main/java/org/openapitools/model/Foo.java +++ b/samples/openapi3/server/petstore/springboot-4-jspecify/src/main/java/org/openapitools/model/Foo.java @@ -39,10 +39,8 @@ public class Foo { private org.springframework.core.io.@Nullable Resource binary; - @Valid private List listOfDt = new ArrayList<>(); - @Valid private List listMinIntems = new ArrayList<>(); @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) 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 9240a254dd82..16f85dfab0f1 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/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 95497902f00e..6341478d30b9 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -369,7 +369,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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.23.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 f9f3c667c930..885ef40b3766 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.23.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 770874e8afc1..87bd99730a4b 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.23.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 fdfd5353942c..f18a2d0bcee5 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.23.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 b54195b47503..cffe49bed796 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.23.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 e1d983b46eb8..a0c6397e1611 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 2559da13bf1c..93aca6b11aa3 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/FormatTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index f30684b6418e..b78f23f8b686 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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.23.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 5d447d9c8b94..77a4a8896528 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 85b9061b4838..2e6cdbb5a8fe 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.23.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 f691d6df0a87..def89a414872 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 c463bbe78efe..16b988f92332 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 f8a78de07225..289fb021d49d 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 cc89638b7b3a..8db8aa55717b 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-delegate/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 69217b5a23af..df77f893a647 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -409,7 +409,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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.23.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 f9f3c667c930..885ef40b3766 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.23.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 770874e8afc1..87bd99730a4b 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.23.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 fdfd5353942c..f18a2d0bcee5 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.23.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 b54195b47503..cffe49bed796 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.23.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 e1d983b46eb8..a0c6397e1611 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 2559da13bf1c..93aca6b11aa3 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/FormatTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index f30684b6418e..b78f23f8b686 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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.23.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 5d447d9c8b94..77a4a8896528 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 85b9061b4838..2e6cdbb5a8fe 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.23.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 f691d6df0a87..def89a414872 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 c463bbe78efe..16b988f92332 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 f8a78de07225..289fb021d49d 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 cc89638b7b3a..8db8aa55717b 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-implicitHeaders/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None 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 ee80cc8e8c2b..e313495f29f5 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 83f142cf8362..970f2979d763 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/kotlin-spring-declarative-interface-bean-validation/.openapi-generator-ignore b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-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/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator/FILES b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator/FILES new file mode 100644 index 000000000000..6d78af78d508 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator/FILES @@ -0,0 +1,17 @@ +README.md +build.gradle.kts +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/kotlin/org/openapitools/api/PetApi.kt +src/main/kotlin/org/openapitools/api/StoreApi.kt +src/main/kotlin/org/openapitools/api/UserApi.kt +src/main/kotlin/org/openapitools/model/Category.kt +src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +src/main/kotlin/org/openapitools/model/Order.kt +src/main/kotlin/org/openapitools/model/Pet.kt +src/main/kotlin/org/openapitools/model/Tag.kt +src/main/kotlin/org/openapitools/model/User.kt diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator/VERSION new file mode 100644 index 000000000000..ca7bf6e46889 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.23.0-SNAPSHOT diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/README.md b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/README.md new file mode 100644 index 000000000000..ad4a56a33945 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/README.md @@ -0,0 +1,9 @@ +# OpenAPI generated API stub + +Spring Framework stub + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org). +This generates Spring 6+ declarative HTTP interfaces that can be used to easily instantiate an http client. +``` \ No newline at end of file diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/build.gradle.kts b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/build.gradle.kts new file mode 100644 index 000000000000..84ac69c7c6f1 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/build.gradle.kts @@ -0,0 +1,56 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +group = "org.openapitools" +version = "1.0.0" +java.sourceCompatibility = JavaVersion.VERSION_17 + +repositories { + mavenCentral() + maven { url = uri("https://repo.spring.io/milestone") } +} + +tasks.withType { + kotlinOptions.jvmTarget = "17" +} + +plugins { + val kotlinVersion = "1.9.25" + id("org.jetbrains.kotlin.jvm") version kotlinVersion + id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion + id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion + id("org.springframework.boot") version "3.3.13" + id("io.spring.dependency-management") version "1.1.7" +} + +tasks.getByName("bootJar") { + enabled = false +} + +tasks.getByName("jar") { + enabled = true +} + +dependencyManagement { + imports { + mavenBom("org.springframework.cloud:spring-cloud-dependencies:2023.0.6") + } +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") + implementation("org.jetbrains.kotlin:kotlin-reflect") + implementation("org.springframework.boot:spring-boot-starter-web") + implementation("org.springdoc:springdoc-openapi-starter-webmvc-api:2.6.0") + + implementation("com.google.code.findbugs:jsr305:3.0.2") + implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml") + implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml") + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") + implementation("com.fasterxml.jackson.module:jackson-module-kotlin") + + implementation("org.springframework.boot:spring-boot-starter-oauth2-client") + + implementation("jakarta.validation:jakarta.validation-api") + implementation("jakarta.annotation:jakarta.annotation-api:2.1.0") + +} diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradle/wrapper/gradle-wrapper.jar b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e6441136f3d4ba8a0da8d277868979cfbc8ad796 GIT binary patch literal 43453 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0sur@TMa!Y}S8irn(%d-gi0*WxxCSk*A?3lGh=gcYN?FGl z7D=Js!i~0=u3rox^eO3i@$0=n{K1lPNU zwmfjRVmLOCRfe=seV&P*1Iq=^i`502keY8Uy-WNPwVNNtJFx?IwAyRPZo2Wo1+S(xF37LJZ~%i)kpFQ3Fw=mXfd@>%+)RpYQLnr}B~~zoof(JVm^^&f zxKV^+3D3$A1G;qh4gPVjhrC8e(VYUHv#dy^)(RoUFM?o%W-EHxufuWf(l*@-l+7vt z=l`qmR56K~F|v<^Pd*p~1_y^P0P^aPC##d8+HqX4IR1gu+7w#~TBFphJxF)T$2WEa zxa?H&6=Qe7d(#tha?_1uQys2KtHQ{)Qco)qwGjrdNL7thd^G5i8Os)CHqc>iOidS} z%nFEDdm=GXBw=yXe1W-ShHHFb?Cc70+$W~z_+}nAoHFYI1MV1wZegw*0y^tC*s%3h zhD3tN8b=Gv&rj}!SUM6|ajSPp*58KR7MPpI{oAJCtY~JECm)*m_x>AZEu>DFgUcby z1Qaw8lU4jZpQ_$;*7RME+gq1KySGG#Wql>aL~k9tLrSO()LWn*q&YxHEuzmwd1?aAtI zBJ>P=&$=l1efe1CDU;`Fd+_;&wI07?V0aAIgc(!{a z0Jg6Y=inXc3^n!U0Atk`iCFIQooHqcWhO(qrieUOW8X(x?(RD}iYDLMjSwffH2~tB z)oDgNBLB^AJBM1M^c5HdRx6fBfka`(LD-qrlh5jqH~);#nw|iyp)()xVYak3;Ybik z0j`(+69aK*B>)e_p%=wu8XC&9e{AO4c~O1U`5X9}?0mrd*m$_EUek{R?DNSh(=br# z#Q61gBzEpmy`$pA*6!87 zSDD+=@fTY7<4A?GLqpA?Pb2z$pbCc4B4zL{BeZ?F-8`s$?>*lXXtn*NC61>|*w7J* z$?!iB{6R-0=KFmyp1nnEmLsA-H0a6l+1uaH^g%c(p{iT&YFrbQ$&PRb8Up#X3@Zsk zD^^&LK~111%cqlP%!_gFNa^dTYT?rhkGl}5=fL{a`UViaXWI$k-UcHJwmaH1s=S$4 z%4)PdWJX;hh5UoK?6aWoyLxX&NhNRqKam7tcOkLh{%j3K^4Mgx1@i|Pi&}<^5>hs5 zm8?uOS>%)NzT(%PjVPGa?X%`N2TQCKbeH2l;cTnHiHppPSJ<7y-yEIiC!P*ikl&!B z%+?>VttCOQM@ShFguHVjxX^?mHX^hSaO_;pnyh^v9EumqSZTi+#f&_Vaija0Q-e*| z7ulQj6Fs*bbmsWp{`auM04gGwsYYdNNZcg|ph0OgD>7O}Asn7^Z=eI>`$2*v78;sj-}oMoEj&@)9+ycEOo92xSyY344^ z11Hb8^kdOvbf^GNAK++bYioknrpdN>+u8R?JxG=!2Kd9r=YWCOJYXYuM0cOq^FhEd zBg2puKy__7VT3-r*dG4c62Wgxi52EMCQ`bKgf*#*ou(D4-ZN$+mg&7$u!! z-^+Z%;-3IDwqZ|K=ah85OLwkO zKxNBh+4QHh)u9D?MFtpbl)us}9+V!D%w9jfAMYEb>%$A;u)rrI zuBudh;5PN}_6J_}l55P3l_)&RMlH{m!)ai-i$g)&*M`eN$XQMw{v^r@-125^RRCF0 z^2>|DxhQw(mtNEI2Kj(;KblC7x=JlK$@78`O~>V!`|1Lm-^JR$-5pUANAnb(5}B}JGjBsliK4& zk6y(;$e&h)lh2)L=bvZKbvh@>vLlreBdH8No2>$#%_Wp1U0N7Ank!6$dFSi#xzh|( zRi{Uw%-4W!{IXZ)fWx@XX6;&(m_F%c6~X8hx=BN1&q}*( zoaNjWabE{oUPb!Bt$eyd#$5j9rItB-h*5JiNi(v^e|XKAj*8(k<5-2$&ZBR5fF|JA z9&m4fbzNQnAU}r8ab>fFV%J0z5awe#UZ|bz?Ur)U9bCIKWEzi2%A+5CLqh?}K4JHi z4vtM;+uPsVz{Lfr;78W78gC;z*yTch~4YkLr&m-7%-xc ztw6Mh2d>_iO*$Rd8(-Cr1_V8EO1f*^@wRoSozS) zy1UoC@pruAaC8Z_7~_w4Q6n*&B0AjOmMWa;sIav&gu z|J5&|{=a@vR!~k-OjKEgPFCzcJ>#A1uL&7xTDn;{XBdeM}V=l3B8fE1--DHjSaxoSjNKEM9|U9#m2<3>n{Iuo`r3UZp;>GkT2YBNAh|b z^jTq-hJp(ebZh#Lk8hVBP%qXwv-@vbvoREX$TqRGTgEi$%_F9tZES@z8Bx}$#5eeG zk^UsLBH{bc2VBW)*EdS({yw=?qmevwi?BL6*=12k9zM5gJv1>y#ML4!)iiPzVaH9% zgSImetD@dam~e>{LvVh!phhzpW+iFvWpGT#CVE5TQ40n%F|p(sP5mXxna+Ev7PDwA zamaV4m*^~*xV+&p;W749xhb_X=$|LD;FHuB&JL5?*Y2-oIT(wYY2;73<^#46S~Gx| z^cez%V7x$81}UWqS13Gz80379Rj;6~WdiXWOSsdmzY39L;Hg3MH43o*y8ibNBBH`(av4|u;YPq%{R;IuYow<+GEsf@R?=@tT@!}?#>zIIn0CoyV!hq3mw zHj>OOjfJM3F{RG#6ujzo?y32m^tgSXf@v=J$ELdJ+=5j|=F-~hP$G&}tDZsZE?5rX ztGj`!S>)CFmdkccxM9eGIcGnS2AfK#gXwj%esuIBNJQP1WV~b~+D7PJTmWGTSDrR` zEAu4B8l>NPuhsk5a`rReSya2nfV1EK01+G!x8aBdTs3Io$u5!6n6KX%uv@DxAp3F@{4UYg4SWJtQ-W~0MDb|j-$lwVn znAm*Pl!?Ps&3wO=R115RWKb*JKoexo*)uhhHBncEDMSVa_PyA>k{Zm2(wMQ(5NM3# z)jkza|GoWEQo4^s*wE(gHz?Xsg4`}HUAcs42cM1-qq_=+=!Gk^y710j=66(cSWqUe zklbm8+zB_syQv5A2rj!Vbw8;|$@C!vfNmNV!yJIWDQ>{+2x zKjuFX`~~HKG~^6h5FntRpnnHt=D&rq0>IJ9#F0eM)Y-)GpRjiN7gkA8wvnG#K=q{q z9dBn8_~wm4J<3J_vl|9H{7q6u2A!cW{bp#r*-f{gOV^e=8S{nc1DxMHFwuM$;aVI^ zz6A*}m8N-&x8;aunp1w7_vtB*pa+OYBw=TMc6QK=mbA-|Cf* zvyh8D4LRJImooUaSb7t*fVfih<97Gf@VE0|z>NcBwBQze);Rh!k3K_sfunToZY;f2 z^HmC4KjHRVg+eKYj;PRN^|E0>Gj_zagfRbrki68I^#~6-HaHg3BUW%+clM1xQEdPYt_g<2K+z!$>*$9nQ>; zf9Bei{?zY^-e{q_*|W#2rJG`2fy@{%6u0i_VEWTq$*(ZN37|8lFFFt)nCG({r!q#9 z5VK_kkSJ3?zOH)OezMT{!YkCuSSn!K#-Rhl$uUM(bq*jY? zi1xbMVthJ`E>d>(f3)~fozjg^@eheMF6<)I`oeJYx4*+M&%c9VArn(OM-wp%M<-`x z7sLP1&3^%Nld9Dhm@$3f2}87!quhI@nwd@3~fZl_3LYW-B?Ia>ui`ELg z&Qfe!7m6ze=mZ`Ia9$z|ARSw|IdMpooY4YiPN8K z4B(ts3p%2i(Td=tgEHX z0UQ_>URBtG+-?0E;E7Ld^dyZ;jjw0}XZ(}-QzC6+NN=40oDb2^v!L1g9xRvE#@IBR zO!b-2N7wVfLV;mhEaXQ9XAU+>=XVA6f&T4Z-@AX!leJ8obP^P^wP0aICND?~w&NykJ#54x3_@r7IDMdRNy4Hh;h*!u(Ol(#0bJdwEo$5437-UBjQ+j=Ic>Q2z` zJNDf0yO6@mr6y1#n3)s(W|$iE_i8r@Gd@!DWDqZ7J&~gAm1#~maIGJ1sls^gxL9LLG_NhU!pTGty!TbhzQnu)I*S^54U6Yu%ZeCg`R>Q zhBv$n5j0v%O_j{QYWG!R9W?5_b&67KB$t}&e2LdMvd(PxN6Ir!H4>PNlerpBL>Zvyy!yw z-SOo8caEpDt(}|gKPBd$qND5#a5nju^O>V&;f890?yEOfkSG^HQVmEbM3Ugzu+UtH zC(INPDdraBN?P%kE;*Ae%Wto&sgw(crfZ#Qy(<4nk;S|hD3j{IQRI6Yq|f^basLY; z-HB&Je%Gg}Jt@={_C{L$!RM;$$|iD6vu#3w?v?*;&()uB|I-XqEKqZPS!reW9JkLewLb!70T7n`i!gNtb1%vN- zySZj{8-1>6E%H&=V}LM#xmt`J3XQoaD|@XygXjdZ1+P77-=;=eYpoEQ01B@L*a(uW zrZeZz?HJsw_4g0vhUgkg@VF8<-X$B8pOqCuWAl28uB|@r`19DTUQQsb^pfqB6QtiT z*`_UZ`fT}vtUY#%sq2{rchyfu*pCg;uec2$-$N_xgjZcoumE5vSI{+s@iLWoz^Mf; zuI8kDP{!XY6OP~q5}%1&L}CtfH^N<3o4L@J@zg1-mt{9L`s^z$Vgb|mr{@WiwAqKg zp#t-lhrU>F8o0s1q_9y`gQNf~Vb!F%70f}$>i7o4ho$`uciNf=xgJ>&!gSt0g;M>*x4-`U)ysFW&Vs^Vk6m%?iuWU+o&m(2Jm26Y(3%TL; zA7T)BP{WS!&xmxNw%J=$MPfn(9*^*TV;$JwRy8Zl*yUZi8jWYF>==j~&S|Xinsb%c z2?B+kpet*muEW7@AzjBA^wAJBY8i|#C{WtO_or&Nj2{=6JTTX05}|H>N2B|Wf!*3_ z7hW*j6p3TvpghEc6-wufFiY!%-GvOx*bZrhZu+7?iSrZL5q9}igiF^*R3%DE4aCHZ zqu>xS8LkW+Auv%z-<1Xs92u23R$nk@Pk}MU5!gT|c7vGlEA%G^2th&Q*zfg%-D^=f z&J_}jskj|Q;73NP4<4k*Y%pXPU2Thoqr+5uH1yEYM|VtBPW6lXaetokD0u z9qVek6Q&wk)tFbQ8(^HGf3Wp16gKmr>G;#G(HRBx?F`9AIRboK+;OfHaLJ(P>IP0w zyTbTkx_THEOs%Q&aPrxbZrJlio+hCC_HK<4%f3ZoSAyG7Dn`=X=&h@m*|UYO-4Hq0 z-Bq&+Ie!S##4A6OGoC~>ZW`Y5J)*ouaFl_e9GA*VSL!O_@xGiBw!AF}1{tB)z(w%c zS1Hmrb9OC8>0a_$BzeiN?rkPLc9%&;1CZW*4}CDDNr2gcl_3z+WC15&H1Zc2{o~i) z)LLW=WQ{?ricmC`G1GfJ0Yp4Dy~Ba;j6ZV4r{8xRs`13{dD!xXmr^Aga|C=iSmor% z8hi|pTXH)5Yf&v~exp3o+sY4B^^b*eYkkCYl*T{*=-0HniSA_1F53eCb{x~1k3*`W zr~};p1A`k{1DV9=UPnLDgz{aJH=-LQo<5%+Em!DNN252xwIf*wF_zS^!(XSm(9eoj z=*dXG&n0>)_)N5oc6v!>-bd(2ragD8O=M|wGW z!xJQS<)u70m&6OmrF0WSsr@I%T*c#Qo#Ha4d3COcX+9}hM5!7JIGF>7<~C(Ear^Sn zm^ZFkV6~Ula6+8S?oOROOA6$C&q&dp`>oR-2Ym3(HT@O7Sd5c~+kjrmM)YmgPH*tL zX+znN>`tv;5eOfX?h{AuX^LK~V#gPCu=)Tigtq9&?7Xh$qN|%A$?V*v=&-2F$zTUv z`C#WyIrChS5|Kgm_GeudCFf;)!WH7FI60j^0o#65o6`w*S7R@)88n$1nrgU(oU0M9 zx+EuMkC>(4j1;m6NoGqEkpJYJ?vc|B zOlwT3t&UgL!pX_P*6g36`ZXQ; z9~Cv}ANFnJGp(;ZhS(@FT;3e)0)Kp;h^x;$*xZn*k0U6-&FwI=uOGaODdrsp-!K$Ac32^c{+FhI-HkYd5v=`PGsg%6I`4d9Jy)uW0y%) zm&j^9WBAp*P8#kGJUhB!L?a%h$hJgQrx!6KCB_TRo%9{t0J7KW8!o1B!NC)VGLM5! zpZy5Jc{`r{1e(jd%jsG7k%I+m#CGS*BPA65ZVW~fLYw0dA-H_}O zrkGFL&P1PG9p2(%QiEWm6x;U-U&I#;Em$nx-_I^wtgw3xUPVVu zqSuKnx&dIT-XT+T10p;yjo1Y)z(x1fb8Dzfn8e yu?e%!_ptzGB|8GrCfu%p?(_ zQccdaaVK$5bz;*rnyK{_SQYM>;aES6Qs^lj9lEs6_J+%nIiuQC*fN;z8md>r_~Mfl zU%p5Dt_YT>gQqfr@`cR!$NWr~+`CZb%dn;WtzrAOI>P_JtsB76PYe*<%H(y>qx-`Kq!X_; z<{RpAqYhE=L1r*M)gNF3B8r(<%8mo*SR2hu zccLRZwGARt)Hlo1euqTyM>^!HK*!Q2P;4UYrysje@;(<|$&%vQekbn|0Ruu_Io(w4#%p6ld2Yp7tlA`Y$cciThP zKzNGIMPXX%&Ud0uQh!uQZz|FB`4KGD?3!ND?wQt6!n*f4EmCoJUh&b?;B{|lxs#F- z31~HQ`SF4x$&v00@(P+j1pAaj5!s`)b2RDBp*PB=2IB>oBF!*6vwr7Dp%zpAx*dPr zb@Zjq^XjN?O4QcZ*O+8>)|HlrR>oD*?WQl5ri3R#2?*W6iJ>>kH%KnnME&TT@ZzrHS$Q%LC?n|e>V+D+8D zYc4)QddFz7I8#}y#Wj6>4P%34dZH~OUDb?uP%-E zwjXM(?Sg~1!|wI(RVuxbu)-rH+O=igSho_pDCw(c6b=P zKk4ATlB?bj9+HHlh<_!&z0rx13K3ZrAR8W)!@Y}o`?a*JJsD+twZIv`W)@Y?Amu_u zz``@-e2X}27$i(2=9rvIu5uTUOVhzwu%mNazS|lZb&PT;XE2|B&W1>=B58#*!~D&) zfVmJGg8UdP*fx(>Cj^?yS^zH#o-$Q-*$SnK(ZVFkw+er=>N^7!)FtP3y~Xxnu^nzY zikgB>Nj0%;WOltWIob|}%lo?_C7<``a5hEkx&1ku$|)i>Rh6@3h*`slY=9U}(Ql_< zaNG*J8vb&@zpdhAvv`?{=zDedJ23TD&Zg__snRAH4eh~^oawdYi6A3w8<Ozh@Kw)#bdktM^GVb zrG08?0bG?|NG+w^&JvD*7LAbjED{_Zkc`3H!My>0u5Q}m!+6VokMLXxl`Mkd=g&Xx z-a>m*#G3SLlhbKB!)tnzfWOBV;u;ftU}S!NdD5+YtOjLg?X}dl>7m^gOpihrf1;PY zvll&>dIuUGs{Qnd- zwIR3oIrct8Va^Tm0t#(bJD7c$Z7DO9*7NnRZorrSm`b`cxz>OIC;jSE3DO8`hX955ui`s%||YQtt2 z5DNA&pG-V+4oI2s*x^>-$6J?p=I>C|9wZF8z;VjR??Icg?1w2v5Me+FgAeGGa8(3S z4vg*$>zC-WIVZtJ7}o9{D-7d>zCe|z#<9>CFve-OPAYsneTb^JH!Enaza#j}^mXy1 z+ULn^10+rWLF6j2>Ya@@Kq?26>AqK{A_| zQKb*~F1>sE*=d?A?W7N2j?L09_7n+HGi{VY;MoTGr_)G9)ot$p!-UY5zZ2Xtbm=t z@dpPSGwgH=QtIcEulQNI>S-#ifbnO5EWkI;$A|pxJd885oM+ zGZ0_0gDvG8q2xebj+fbCHYfAXuZStH2j~|d^sBAzo46(K8n59+T6rzBwK)^rfPT+B zyIFw)9YC-V^rhtK`!3jrhmW-sTmM+tPH+;nwjL#-SjQPUZ53L@A>y*rt(#M(qsiB2 zx6B)dI}6Wlsw%bJ8h|(lhkJVogQZA&n{?Vgs6gNSXzuZpEyu*xySy8ro07QZ7Vk1!3tJphN_5V7qOiyK8p z#@jcDD8nmtYi1^l8ml;AF<#IPK?!pqf9D4moYk>d99Im}Jtwj6c#+A;f)CQ*f-hZ< z=p_T86jog%!p)D&5g9taSwYi&eP z#JuEK%+NULWus;0w32-SYFku#i}d~+{Pkho&^{;RxzP&0!RCm3-9K6`>KZpnzS6?L z^H^V*s!8<>x8bomvD%rh>Zp3>Db%kyin;qtl+jAv8Oo~1g~mqGAC&Qi_wy|xEt2iz zWAJEfTV%cl2Cs<1L&DLRVVH05EDq`pH7Oh7sR`NNkL%wi}8n>IXcO40hp+J+sC!W?!krJf!GJNE8uj zg-y~Ns-<~D?yqbzVRB}G>0A^f0!^N7l=$m0OdZuqAOQqLc zX?AEGr1Ht+inZ-Qiwnl@Z0qukd__a!C*CKuGdy5#nD7VUBM^6OCpxCa2A(X;e0&V4 zM&WR8+wErQ7UIc6LY~Q9x%Sn*Tn>>P`^t&idaOEnOd(Ufw#>NoR^1QdhJ8s`h^|R_ zXX`c5*O~Xdvh%q;7L!_!ohf$NfEBmCde|#uVZvEo>OfEq%+Ns7&_f$OR9xsihRpBb z+cjk8LyDm@U{YN>+r46?nn{7Gh(;WhFw6GAxtcKD+YWV?uge>;+q#Xx4!GpRkVZYu zzsF}1)7$?%s9g9CH=Zs+B%M_)+~*j3L0&Q9u7!|+T`^O{xE6qvAP?XWv9_MrZKdo& z%IyU)$Q95AB4!#hT!_dA>4e@zjOBD*Y=XjtMm)V|+IXzjuM;(l+8aA5#Kaz_$rR6! zj>#&^DidYD$nUY(D$mH`9eb|dtV0b{S>H6FBfq>t5`;OxA4Nn{J(+XihF(stSche7$es&~N$epi&PDM_N`As;*9D^L==2Q7Z2zD+CiU(|+-kL*VG+&9!Yb3LgPy?A zm7Z&^qRG_JIxK7-FBzZI3Q<;{`DIxtc48k> zc|0dmX;Z=W$+)qE)~`yn6MdoJ4co;%!`ddy+FV538Y)j(vg}5*k(WK)KWZ3WaOG!8 z!syGn=s{H$odtpqFrT#JGM*utN7B((abXnpDM6w56nhw}OY}0TiTG1#f*VFZr+^-g zbP10`$LPq_;PvrA1XXlyx2uM^mrjTzX}w{yuLo-cOClE8MMk47T25G8M!9Z5ypOSV zAJUBGEg5L2fY)ZGJb^E34R2zJ?}Vf>{~gB!8=5Z) z9y$>5c)=;o0HeHHSuE4U)#vG&KF|I%-cF6f$~pdYJWk_dD}iOA>iA$O$+4%@>JU08 zS`ep)$XLPJ+n0_i@PkF#ri6T8?ZeAot$6JIYHm&P6EB=BiaNY|aA$W0I+nz*zkz_z zkEru!tj!QUffq%)8y0y`T&`fuus-1p>=^hnBiBqD^hXrPs`PY9tU3m0np~rISY09> z`P3s=-kt_cYcxWd{de@}TwSqg*xVhp;E9zCsnXo6z z?f&Sv^U7n4`xr=mXle94HzOdN!2kB~4=%)u&N!+2;z6UYKUDqi-s6AZ!haB;@&B`? z_TRX0%@suz^TRdCb?!vNJYPY8L_}&07uySH9%W^Tc&1pia6y1q#?*Drf}GjGbPjBS zbOPcUY#*$3sL2x4v_i*Y=N7E$mR}J%|GUI(>WEr+28+V z%v5{#e!UF*6~G&%;l*q*$V?&r$Pp^sE^i-0$+RH3ERUUdQ0>rAq2(2QAbG}$y{de( z>{qD~GGuOk559Y@%$?N^1ApVL_a704>8OD%8Y%8B;FCt%AoPu8*D1 zLB5X>b}Syz81pn;xnB}%0FnwazlWfUV)Z-~rZg6~b z6!9J$EcE&sEbzcy?CI~=boWA&eeIa%z(7SE^qgVLz??1Vbc1*aRvc%Mri)AJaAG!p z$X!_9Ds;Zz)f+;%s&dRcJt2==P{^j3bf0M=nJd&xwUGlUFn?H=2W(*2I2Gdu zv!gYCwM10aeus)`RIZSrCK=&oKaO_Ry~D1B5!y0R=%!i2*KfXGYX&gNv_u+n9wiR5 z*e$Zjju&ODRW3phN925%S(jL+bCHv6rZtc?!*`1TyYXT6%Ju=|X;6D@lq$8T zW{Y|e39ioPez(pBH%k)HzFITXHvnD6hw^lIoUMA;qAJ^CU?top1fo@s7xT13Fvn1H z6JWa-6+FJF#x>~+A;D~;VDs26>^oH0EI`IYT2iagy23?nyJ==i{g4%HrAf1-*v zK1)~@&(KkwR7TL}L(A@C_S0G;-GMDy=MJn2$FP5s<%wC)4jC5PXoxrQBFZ_k0P{{s@sz+gX`-!=T8rcB(=7vW}^K6oLWMmp(rwDh}b zwaGGd>yEy6fHv%jM$yJXo5oMAQ>c9j`**}F?MCry;T@47@r?&sKHgVe$MCqk#Z_3S z1GZI~nOEN*P~+UaFGnj{{Jo@16`(qVNtbU>O0Hf57-P>x8Jikp=`s8xWs^dAJ9lCQ z)GFm+=OV%AMVqVATtN@|vp61VVAHRn87}%PC^RAzJ%JngmZTasWBAWsoAqBU+8L8u z4A&Pe?fmTm0?mK-BL9t+{y7o(7jm+RpOhL9KnY#E&qu^}B6=K_dB}*VlSEiC9fn)+V=J;OnN)Ta5v66ic1rG+dGAJ1 z1%Zb_+!$=tQ~lxQrzv3x#CPb?CekEkA}0MYSgx$Jdd}q8+R=ma$|&1a#)TQ=l$1tQ z=tL9&_^vJ)Pk}EDO-va`UCT1m#Uty1{v^A3P~83_#v^ozH}6*9mIjIr;t3Uv%@VeW zGL6(CwCUp)Jq%G0bIG%?{_*Y#5IHf*5M@wPo6A{$Um++Co$wLC=J1aoG93&T7Ho}P z=mGEPP7GbvoG!uD$k(H3A$Z))+i{Hy?QHdk>3xSBXR0j!11O^mEe9RHmw!pvzv?Ua~2_l2Yh~_!s1qS`|0~0)YsbHSz8!mG)WiJE| z2f($6TQtt6L_f~ApQYQKSb=`053LgrQq7G@98#igV>y#i==-nEjQ!XNu9 z~;mE+gtj4IDDNQJ~JVk5Ux6&LCSFL!y=>79kE9=V}J7tD==Ga+IW zX)r7>VZ9dY=V&}DR))xUoV!u(Z|%3ciQi_2jl}3=$Agc(`RPb z8kEBpvY>1FGQ9W$n>Cq=DIpski};nE)`p3IUw1Oz0|wxll^)4dq3;CCY@RyJgFgc# zKouFh!`?Xuo{IMz^xi-h=StCis_M7yq$u) z?XHvw*HP0VgR+KR6wI)jEMX|ssqYvSf*_3W8zVTQzD?3>H!#>InzpSO)@SC8q*ii- z%%h}_#0{4JG;Jm`4zg};BPTGkYamx$Xo#O~lBirRY)q=5M45n{GCfV7h9qwyu1NxOMoP4)jjZMxmT|IQQh0U7C$EbnMN<3)Kk?fFHYq$d|ICu>KbY_hO zTZM+uKHe(cIZfEqyzyYSUBZa8;Fcut-GN!HSA9ius`ltNebF46ZX_BbZNU}}ZOm{M2&nANL9@0qvih15(|`S~z}m&h!u4x~(%MAO$jHRWNfuxWF#B)E&g3ghSQ9|> z(MFaLQj)NE0lowyjvg8z0#m6FIuKE9lDO~Glg}nSb7`~^&#(Lw{}GVOS>U)m8bF}x zVjbXljBm34Cs-yM6TVusr+3kYFjr28STT3g056y3cH5Tmge~ASxBj z%|yb>$eF;WgrcOZf569sDZOVwoo%8>XO>XQOX1OyN9I-SQgrm;U;+#3OI(zrWyow3 zk==|{lt2xrQ%FIXOTejR>;wv(Pb8u8}BUpx?yd(Abh6? zsoO3VYWkeLnF43&@*#MQ9-i-d0t*xN-UEyNKeyNMHw|A(k(_6QKO=nKMCxD(W(Yop zsRQ)QeL4X3Lxp^L%wzi2-WVSsf61dqliPUM7srDB?Wm6Lzn0&{*}|IsKQW;02(Y&| zaTKv|`U(pSzuvR6Rduu$wzK_W-Y-7>7s?G$)U}&uK;<>vU}^^ns@Z!p+9?St1s)dG zK%y6xkPyyS1$~&6v{kl?Md6gwM|>mt6Upm>oa8RLD^8T{0?HC!Z>;(Bob7el(DV6x zi`I)$&E&ngwFS@bi4^xFLAn`=fzTC;aimE^!cMI2n@Vo%Ae-ne`RF((&5y6xsjjAZ zVguVoQ?Z9uk$2ON;ersE%PU*xGO@T*;j1BO5#TuZKEf(mB7|g7pcEA=nYJ{s3vlbg zd4-DUlD{*6o%Gc^N!Nptgay>j6E5;3psI+C3Q!1ZIbeCubW%w4pq9)MSDyB{HLm|k zxv-{$$A*pS@csolri$Ge<4VZ}e~78JOL-EVyrbxKra^d{?|NnPp86!q>t<&IP07?Z z^>~IK^k#OEKgRH+LjllZXk7iA>2cfH6+(e&9ku5poo~6y{GC5>(bRK7hwjiurqAiZ zg*DmtgY}v83IjE&AbiWgMyFbaRUPZ{lYiz$U^&Zt2YjG<%m((&_JUbZcfJ22(>bi5 z!J?<7AySj0JZ&<-qXX;mcV!f~>G=sB0KnjWca4}vrtunD^1TrpfeS^4dvFr!65knK zZh`d;*VOkPs4*-9kL>$GP0`(M!j~B;#x?Ba~&s6CopvO86oM?-? zOw#dIRc;6A6T?B`Qp%^<U5 z19x(ywSH$_N+Io!6;e?`tWaM$`=Db!gzx|lQ${DG!zb1Zl&|{kX0y6xvO1o z220r<-oaS^^R2pEyY;=Qllqpmue|5yI~D|iI!IGt@iod{Opz@*ml^w2bNs)p`M(Io z|E;;m*Xpjd9l)4G#KaWfV(t8YUn@A;nK^#xgv=LtnArX|vWQVuw3}B${h+frU2>9^ z!l6)!Uo4`5k`<<;E(ido7M6lKTgWezNLq>U*=uz&s=cc$1%>VrAeOoUtA|T6gO4>UNqsdK=NF*8|~*sl&wI=x9-EGiq*aqV!(VVXA57 zw9*o6Ir8Lj1npUXvlevtn(_+^X5rzdR>#(}4YcB9O50q97%rW2me5_L=%ffYPUSRc z!vv?Kv>dH994Qi>U(a<0KF6NH5b16enCp+mw^Hb3Xs1^tThFpz!3QuN#}KBbww`(h z7GO)1olDqy6?T$()R7y%NYx*B0k_2IBiZ14&8|JPFxeMF{vSTxF-Vi3+ZOI=Thq2} zyQgjYY1_7^ZQHh{?P))4+qUiQJLi1&{yE>h?~jU%tjdV0h|FENbM3X(KnJdPKc?~k zh=^Ixv*+smUll!DTWH!jrV*wSh*(mx0o6}1@JExzF(#9FXgmTXVoU+>kDe68N)dkQ zH#_98Zv$}lQwjKL@yBd;U(UD0UCl322=pav<=6g>03{O_3oKTq;9bLFX1ia*lw;#K zOiYDcBJf)82->83N_Y(J7Kr_3lE)hAu;)Q(nUVydv+l+nQ$?|%MWTy`t>{havFSQloHwiIkGK9YZ79^9?AZo0ZyQlVR#}lF%dn5n%xYksXf8gnBm=wO7g_^! zauQ-bH1Dc@3ItZ-9D_*pH}p!IG7j8A_o94#~>$LR|TFq zZ-b00*nuw|-5C2lJDCw&8p5N~Z1J&TrcyErds&!l3$eSz%`(*izc;-?HAFD9AHb-| z>)id`QCrzRws^9(#&=pIx9OEf2rmlob8sK&xPCWS+nD~qzU|qG6KwA{zbikcfQrdH z+ zQg>O<`K4L8rN7`GJB0*3<3`z({lWe#K!4AZLsI{%z#ja^OpfjU{!{)x0ZH~RB0W5X zTwN^w=|nA!4PEU2=LR05x~}|B&ZP?#pNgDMwD*ajI6oJqv!L81gu=KpqH22avXf0w zX3HjbCI!n9>l046)5rr5&v5ja!xkKK42zmqHzPx$9Nn_MZk`gLeSLgC=LFf;H1O#B zn=8|^1iRrujHfbgA+8i<9jaXc;CQBAmQvMGQPhFec2H1knCK2x!T`e6soyrqCamX% zTQ4dX_E*8so)E*TB$*io{$c6X)~{aWfaqdTh=xEeGvOAN9H&-t5tEE-qso<+C!2>+ zskX51H-H}#X{A75wqFe-J{?o8Bx|>fTBtl&tcbdR|132Ztqu5X0i-pisB-z8n71%q%>EF}yy5?z=Ve`}hVh{Drv1YWL zW=%ug_&chF11gDv3D6B)Tz5g54H0mDHNjuKZ+)CKFk4Z|$RD zfRuKLW`1B>B?*RUfVd0+u8h3r-{@fZ{k)c!93t1b0+Q9vOaRnEn1*IL>5Z4E4dZ!7 ztp4GP-^1d>8~LMeb}bW!(aAnB1tM_*la=Xx)q(I0Y@__Zd$!KYb8T2VBRw%e$iSdZ zkwdMwd}eV9q*;YvrBFTv1>1+}{H!JK2M*C|TNe$ZSA>UHKk);wz$(F$rXVc|sI^lD zV^?_J!3cLM;GJuBMbftbaRUs$;F}HDEDtIeHQ)^EJJ1F9FKJTGH<(Jj`phE6OuvE) zqK^K`;3S{Y#1M@8yRQwH`?kHMq4tHX#rJ>5lY3DM#o@or4&^_xtBC(|JpGTfrbGkA z2Tu+AyT^pHannww!4^!$5?@5v`LYy~T`qs7SYt$JgrY(w%C+IWA;ZkwEF)u5sDvOK zGk;G>Mh&elvXDcV69J_h02l&O;!{$({fng9Rlc3ID#tmB^FIG^w{HLUpF+iB`|
NnX)EH+Nua)3Y(c z&{(nX_ht=QbJ%DzAya}!&uNu!4V0xI)QE$SY__m)SAKcN0P(&JcoK*Lxr@P zY&P=}&B3*UWNlc|&$Oh{BEqwK2+N2U$4WB7Fd|aIal`FGANUa9E-O)!gV`((ZGCc$ zBJA|FFrlg~9OBp#f7aHodCe{6= zay$6vN~zj1ddMZ9gQ4p32(7wD?(dE>KA2;SOzXRmPBiBc6g`eOsy+pVcHu=;Yd8@{ zSGgXf@%sKKQz~;!J;|2fC@emm#^_rnO0esEn^QxXgJYd`#FPWOUU5b;9eMAF zZhfiZb|gk8aJIw*YLp4!*(=3l8Cp{(%p?ho22*vN9+5NLV0TTazNY$B5L6UKUrd$n zjbX%#m7&F#U?QNOBXkiiWB*_tk+H?N3`vg;1F-I+83{M2!8<^nydGr5XX}tC!10&e z7D36bLaB56WrjL&HiiMVtpff|K%|*{t*ltt^5ood{FOG0<>k&1h95qPio)2`eL${YAGIx(b4VN*~nKn6E~SIQUuRH zQ+5zP6jfnP$S0iJ@~t!Ai3o`X7biohli;E zT#yXyl{bojG@-TGZzpdVDXhbmF%F9+-^YSIv|MT1l3j zrxOFq>gd2%U}?6}8mIj?M zc077Zc9fq(-)4+gXv?Az26IO6eV`RAJz8e3)SC7~>%rlzDwySVx*q$ygTR5kW2ds- z!HBgcq0KON9*8Ff$X0wOq$`T7ml(@TF)VeoF}x1OttjuVHn3~sHrMB++}f7f9H%@f z=|kP_?#+fve@{0MlbkC9tyvQ_R?lRdRJ@$qcB(8*jyMyeME5ns6ypVI1Xm*Zr{DuS zZ!1)rQfa89c~;l~VkCiHI|PCBd`S*2RLNQM8!g9L6?n`^evQNEwfO@&JJRme+uopQX0%Jo zgd5G&#&{nX{o?TQwQvF1<^Cg3?2co;_06=~Hcb6~4XWpNFL!WU{+CK;>gH%|BLOh7@!hsa(>pNDAmpcuVO-?;Bic17R}^|6@8DahH)G z!EmhsfunLL|3b=M0MeK2vqZ|OqUqS8npxwge$w-4pFVXFq$_EKrZY?BuP@Az@(k`L z`ViQBSk`y+YwRT;&W| z2e3UfkCo^uTA4}Qmmtqs+nk#gNr2W4 zTH%hhErhB)pkXR{B!q5P3-OM+M;qu~f>}IjtF%>w{~K-0*jPVLl?Chz&zIdxp}bjx zStp&Iufr58FTQ36AHU)0+CmvaOpKF;W@sMTFpJ`j;3d)J_$tNQI^c<^1o<49Z(~K> z;EZTBaVT%14(bFw2ob@?JLQ2@(1pCdg3S%E4*dJ}dA*v}_a4_P(a`cHnBFJxNobAv zf&Zl-Yt*lhn-wjZsq<9v-IsXxAxMZ58C@e0!rzhJ+D@9^3~?~yllY^s$?&oNwyH!#~6x4gUrfxplCvK#!f z$viuszW>MFEcFL?>ux*((!L$;R?xc*myjRIjgnQX79@UPD$6Dz0jutM@7h_pq z0Zr)#O<^y_K6jfY^X%A-ip>P%3saX{!v;fxT-*0C_j4=UMH+Xth(XVkVGiiKE#f)q z%Jp=JT)uy{&}Iq2E*xr4YsJ5>w^=#-mRZ4vPXpI6q~1aFwi+lQcimO45V-JXP;>(Q zo={U`{=_JF`EQj87Wf}{Qy35s8r1*9Mxg({CvOt}?Vh9d&(}iI-quvs-rm~P;eRA@ zG5?1HO}puruc@S{YNAF3vmUc2B4!k*yi))<5BQmvd3tr}cIs#9)*AX>t`=~{f#Uz0 z0&Nk!7sSZwJe}=)-R^$0{yeS!V`Dh7w{w5rZ9ir!Z7Cd7dwZcK;BT#V0bzTt>;@Cl z#|#A!-IL6CZ@eHH!CG>OO8!%G8&8t4)Ro@}USB*k>oEUo0LsljsJ-%5Mo^MJF2I8- z#v7a5VdJ-Cd%(a+y6QwTmi+?f8Nxtm{g-+WGL>t;s#epv7ug>inqimZCVm!uT5Pf6 ziEgQt7^%xJf#!aPWbuC_3Nxfb&CFbQy!(8ANpkWLI4oSnH?Q3f?0k1t$3d+lkQs{~(>06l&v|MpcFsyAv zin6N!-;pggosR*vV=DO(#+}4ps|5$`udE%Kdmp?G7B#y%H`R|i8skKOd9Xzx8xgR$>Zo2R2Ytktq^w#ul4uicxW#{ zFjG_RNlBroV_n;a7U(KIpcp*{M~e~@>Q#Av90Jc5v%0c>egEdY4v3%|K1XvB{O_8G zkTWLC>OZKf;XguMH2-Pw{BKbFzaY;4v2seZV0>^7Q~d4O=AwaPhP3h|!hw5aqOtT@ z!SNz}$of**Bl3TK209@F=Tn1+mgZa8yh(Png%Zd6Mt}^NSjy)etQrF zme*llAW=N_8R*O~d2!apJnF%(JcN??=`$qs3Y+~xs>L9x`0^NIn!8mMRFA_tg`etw z3k{9JAjnl@ygIiJcNHTy02GMAvBVqEss&t2<2mnw!; zU`J)0>lWiqVqo|ex7!+@0i>B~BSU1A_0w#Ee+2pJx0BFiZ7RDHEvE*ptc9md(B{&+ zKE>TM)+Pd>HEmdJao7U@S>nL(qq*A)#eLOuIfAS@j`_sK0UEY6OAJJ-kOrHG zjHx`g!9j*_jRcJ%>CE9K2MVf?BUZKFHY?EpV6ai7sET-tqk=nDFh-(65rhjtlKEY% z@G&cQ<5BKatfdA1FKuB=i>CCC5(|9TMW%K~GbA4}80I5%B}(gck#Wlq@$nO3%@QP_ z8nvPkJFa|znk>V92cA!K1rKtr)skHEJD;k8P|R8RkCq1Rh^&}Evwa4BUJz2f!2=MH zo4j8Y$YL2313}H~F7@J7mh>u%556Hw0VUOz-Un@ZASCL)y8}4XXS`t1AC*^>PLwIc zUQok5PFS=*#)Z!3JZN&eZ6ZDP^-c@StY*t20JhCnbMxXf=LK#;`4KHEqMZ-Ly9KsS zI2VUJGY&PmdbM+iT)zek)#Qc#_i4uH43 z@T5SZBrhNCiK~~esjsO9!qBpaWK<`>!-`b71Y5ReXQ4AJU~T2Njri1CEp5oKw;Lnm)-Y@Z3sEY}XIgSy%xo=uek(kAAH5MsV$V3uTUsoTzxp_rF=tx zV07vlJNKtJhCu`b}*#m&5LV4TAE&%KtHViDAdv#c^x`J7bg z&N;#I2GkF@SIGht6p-V}`!F_~lCXjl1BdTLIjD2hH$J^YFN`7f{Q?OHPFEM$65^!u zNwkelo*5+$ZT|oQ%o%;rBX$+?xhvjb)SHgNHE_yP%wYkkvXHS{Bf$OiKJ5d1gI0j< zF6N}Aq=(WDo(J{e-uOecxPD>XZ@|u-tgTR<972`q8;&ZD!cep^@B5CaqFz|oU!iFj zU0;6fQX&~15E53EW&w1s9gQQ~Zk16X%6 zjG`j0yq}4deX2?Tr(03kg>C(!7a|b9qFI?jcE^Y>-VhudI@&LI6Qa}WQ>4H_!UVyF z((cm&!3gmq@;BD#5P~0;_2qgZhtJS|>WdtjY=q zLnHH~Fm!cxw|Z?Vw8*~?I$g#9j&uvgm7vPr#&iZgPP~v~BI4jOv;*OQ?jYJtzO<^y z7-#C={r7CO810!^s(MT!@@Vz_SVU)7VBi(e1%1rvS!?PTa}Uv`J!EP3s6Y!xUgM^8 z4f!fq<3Wer_#;u!5ECZ|^c1{|q_lh3m^9|nsMR1#Qm|?4Yp5~|er2?W^7~cl;_r4WSme_o68J9p03~Hc%X#VcX!xAu%1`R!dfGJCp zV*&m47>s^%Ib0~-2f$6oSgn3jg8m%UA;ArcdcRyM5;}|r;)?a^D*lel5C`V5G=c~k zy*w_&BfySOxE!(~PI$*dwG><+-%KT5p?whOUMA*k<9*gi#T{h3DAxzAPxN&Xws8o9Cp*`PA5>d9*Z-ynV# z9yY*1WR^D8|C%I@vo+d8r^pjJ$>eo|j>XiLWvTWLl(^;JHCsoPgem6PvegHb-OTf| zvTgsHSa;BkbG=(NgPO|CZu9gUCGr$8*EoH2_Z#^BnxF0yM~t`|9ws_xZ8X8iZYqh! zAh;HXJ)3P&)Q0(&F>!LN0g#bdbis-cQxyGn9Qgh`q+~49Fqd2epikEUw9caM%V6WgP)532RMRW}8gNS%V%Hx7apSz}tn@bQy!<=lbhmAH=FsMD?leawbnP5BWM0 z5{)@EEIYMu5;u)!+HQWhQ;D3_Cm_NADNeb-f56}<{41aYq8p4=93d=-=q0Yx#knGYfXVt z+kMxlus}t2T5FEyCN~!}90O_X@@PQpuy;kuGz@bWft%diBTx?d)_xWd_-(!LmVrh**oKg!1CNF&LX4{*j|) zIvjCR0I2UUuuEXh<9}oT_zT#jOrJAHNLFT~Ilh9hGJPI1<5`C-WA{tUYlyMeoy!+U zhA#=p!u1R7DNg9u4|QfED-2TuKI}>p#2P9--z;Bbf4Op*;Q9LCbO&aL2i<0O$ByoI z!9;Ght733FC>Pz>$_mw(F`zU?`m@>gE`9_p*=7o=7av`-&ifU(^)UU`Kg3Kw`h9-1 z6`e6+im=|m2v`pN(2dE%%n8YyQz;#3Q-|x`91z?gj68cMrHl}C25|6(_dIGk*8cA3 zRHB|Nwv{@sP4W+YZM)VKI>RlB`n=Oj~Rzx~M+Khz$N$45rLn6k1nvvD^&HtsMA4`s=MmuOJID@$s8Ph4E zAmSV^+s-z8cfv~Yd(40Sh4JG#F~aB>WFoX7ykaOr3JaJ&Lb49=B8Vk-SQT9%7TYhv z?-Pprt{|=Y5ZQ1?od|A<_IJU93|l4oAfBm?3-wk{O<8ea+`}u%(kub(LFo2zFtd?4 zwpN|2mBNywv+d^y_8#<$r>*5+$wRTCygFLcrwT(qc^n&@9r+}Kd_u@Ithz(6Qb4}A zWo_HdBj#V$VE#l6pD0a=NfB0l^6W^g`vm^sta>Tly?$E&{F?TTX~DsKF~poFfmN%2 z4x`Dc{u{Lkqz&y!33;X}weD}&;7p>xiI&ZUb1H9iD25a(gI|`|;G^NwJPv=1S5e)j z;U;`?n}jnY6rA{V^ zxTd{bK)Gi^odL3l989DQlN+Zs39Xe&otGeY(b5>rlIqfc7Ap4}EC?j<{M=hlH{1+d zw|c}}yx88_xQr`{98Z!d^FNH77=u(p-L{W6RvIn40f-BldeF-YD>p6#)(Qzf)lfZj z?3wAMtPPp>vMehkT`3gToPd%|D8~4`5WK{`#+}{L{jRUMt zrFz+O$C7y8$M&E4@+p+oV5c%uYzbqd2Y%SSgYy#xh4G3hQv>V*BnuKQhBa#=oZB~w{azUB+q%bRe_R^ z>fHBilnRTUfaJ201czL8^~Ix#+qOHSO)A|xWLqOxB$dT2W~)e-r9;bm=;p;RjYahB z*1hegN(VKK+ztr~h1}YP@6cfj{e#|sS`;3tJhIJK=tVJ-*h-5y9n*&cYCSdg#EHE# zSIx=r#qOaLJoVVf6v;(okg6?*L_55atl^W(gm^yjR?$GplNP>BZsBYEf_>wM0Lc;T zhf&gpzOWNxS>m+mN92N0{;4uw`P+9^*|-1~$uXpggj4- z^SFc4`uzj2OwdEVT@}Q`(^EcQ_5(ZtXTql*yGzdS&vrS_w>~~ra|Nb5abwf}Y!uq6R5f&6g2ge~2p(%c< z@O)cz%%rr4*cRJ5f`n@lvHNk@lE1a*96Kw6lJ~B-XfJW%?&-y?;E&?1AacU@`N`!O z6}V>8^%RZ7SQnZ-z$(jsX`amu*5Fj8g!3RTRwK^`2_QHe;_2y_n|6gSaGyPmI#kA0sYV<_qOZc#-2BO%hX)f$s-Z3xlI!ub z^;3ru11DA`4heAu%}HIXo&ctujzE2!6DIGE{?Zs>2}J+p&C$rc7gJC35gxhflorvsb%sGOxpuWhF)dL_&7&Z99=5M0b~Qa;Mo!j&Ti_kXW!86N%n= zSC@6Lw>UQ__F&+&Rzv?gscwAz8IP!n63>SP)^62(HK98nGjLY2*e^OwOq`3O|C92? z;TVhZ2SK%9AGW4ZavTB9?)mUbOoF`V7S=XM;#3EUpR+^oHtdV!GK^nXzCu>tpR|89 zdD{fnvCaN^^LL%amZ^}-E+214g&^56rpdc@yv0b<3}Ys?)f|fXN4oHf$six)-@<;W&&_kj z-B}M5U*1sb4)77aR=@%I?|Wkn-QJVuA96an25;~!gq(g1@O-5VGo7y&E_srxL6ZfS z*R%$gR}dyONgju*D&?geiSj7SZ@ftyA|}(*Y4KbvU!YLsi1EDQQCnb+-cM=K1io78o!v*);o<XwjaQH%)uIP&Zm?)Nfbfn;jIr z)d#!$gOe3QHp}2NBak@yYv3m(CPKkwI|{;d=gi552u?xj9ObCU^DJFQp4t4e1tPzM zvsRIGZ6VF+{6PvqsplMZWhz10YwS={?`~O0Ec$`-!klNUYtzWA^f9m7tkEzCy<_nS z=&<(awFeZvt51>@o_~>PLs05CY)$;}Oo$VDO)?l-{CS1Co=nxjqben*O1BR>#9`0^ zkwk^k-wcLCLGh|XLjdWv0_Hg54B&OzCE^3NCP}~OajK-LuRW53CkV~Su0U>zN%yQP zH8UH#W5P3-!ToO-2k&)}nFe`t+mdqCxxAHgcifup^gKpMObbox9LFK;LP3}0dP-UW z?Zo*^nrQ6*$FtZ(>kLCc2LY*|{!dUn$^RW~m9leoF|@Jy|M5p-G~j%+P0_#orRKf8 zvuu5<*XO!B?1E}-*SY~MOa$6c%2cM+xa8}_8x*aVn~57v&W(0mqN1W`5a7*VN{SUH zXz98DDyCnX2EPl-`Lesf`=AQT%YSDb`$%;(jUTrNen$NPJrlpPDP}prI>Ml!r6bCT;mjsg@X^#&<}CGf0JtR{Ecwd&)2zuhr#nqdgHj+g2n}GK9CHuwO zk>oZxy{vcOL)$8-}L^iVfJHAGfwN$prHjYV0ju}8%jWquw>}_W6j~m<}Jf!G?~r5&Rx)!9JNX!ts#SGe2HzobV5); zpj@&`cNcO&q+%*<%D7za|?m5qlmFK$=MJ_iv{aRs+BGVrs)98BlN^nMr{V_fcl_;jkzRju+c-y?gqBC_@J0dFLq-D9@VN&-`R9U;nv$Hg?>$oe4N&Ht$V_(JR3TG^! zzJsbQbi zFE6-{#9{G{+Z}ww!ycl*7rRdmU#_&|DqPfX3CR1I{Kk;bHwF6jh0opI`UV2W{*|nn zf_Y@%wW6APb&9RrbEN=PQRBEpM(N1w`81s=(xQj6 z-eO0k9=Al|>Ej|Mw&G`%q8e$2xVz1v4DXAi8G};R$y)ww638Y=9y$ZYFDM$}vzusg zUf+~BPX>(SjA|tgaFZr_e0{)+z9i6G#lgt=F_n$d=beAt0Sa0a7>z-?vcjl3e+W}+ z1&9=|vC=$co}-Zh*%3588G?v&U7%N1Qf-wNWJ)(v`iO5KHSkC5&g7CrKu8V}uQGcfcz zmBz#Lbqwqy#Z~UzHgOQ;Q-rPxrRNvl(&u6ts4~0=KkeS;zqURz%!-ERppmd%0v>iRlEf+H$yl{_8TMJzo0 z>n)`On|7=WQdsqhXI?#V{>+~}qt-cQbokEbgwV3QvSP7&hK4R{Z{aGHVS3;+h{|Hz z6$Js}_AJr383c_+6sNR|$qu6dqHXQTc6?(XWPCVZv=)D#6_;D_8P-=zOGEN5&?~8S zl5jQ?NL$c%O)*bOohdNwGIKM#jSAC?BVY={@A#c9GmX0=T(0G}xs`-%f3r=m6-cpK z!%waekyAvm9C3%>sixdZj+I(wQlbB4wv9xKI*T13DYG^T%}zZYJ|0$Oj^YtY+d$V$ zAVudSc-)FMl|54n=N{BnZTM|!>=bhaja?o7s+v1*U$!v!qQ%`T-6fBvmdPbVmro&d zk07TOp*KuxRUSTLRrBj{mjsnF8`d}rMViY8j`jo~Hp$fkv9F_g(jUo#Arp;Xw0M$~ zRIN!B22~$kx;QYmOkos@%|5k)!QypDMVe}1M9tZfkpXKGOxvKXB!=lo`p?|R1l=tA zp(1}c6T3Fwj_CPJwVsYtgeRKg?9?}%oRq0F+r+kdB=bFUdVDRPa;E~~>2$w}>O>v=?|e>#(-Lyx?nbg=ckJ#5U6;RT zNvHhXk$P}m9wSvFyU3}=7!y?Y z=fg$PbV8d7g25&-jOcs{%}wTDKm>!Vk);&rr;O1nvO0VrU&Q?TtYVU=ir`te8SLlS zKSNmV=+vF|ATGg`4$N1uS|n??f}C_4Sz!f|4Ly8#yTW-FBfvS48Tef|-46C(wEO_%pPhUC5$-~Y?!0vFZ^Gu`x=m7X99_?C-`|h zfmMM&Y@zdfitA@KPw4Mc(YHcY1)3*1xvW9V-r4n-9ZuBpFcf{yz+SR{ zo$ZSU_|fgwF~aakGr(9Be`~A|3)B=9`$M-TWKipq-NqRDRQc}ABo*s_5kV%doIX7LRLRau_gd@Rd_aLFXGSU+U?uAqh z8qusWWcvgQ&wu{|sRXmv?sl=xc<$6AR$+cl& zFNh5q1~kffG{3lDUdvEZu5c(aAG~+64FxdlfwY^*;JSS|m~CJusvi-!$XR`6@XtY2 znDHSz7}_Bx7zGq-^5{stTRy|I@N=>*y$zz>m^}^{d&~h;0kYiq8<^Wq7Dz0w31ShO^~LUfW6rfitR0(=3;Uue`Y%y@ex#eKPOW zO~V?)M#AeHB2kovn1v=n^D?2{2jhIQd9t|_Q+c|ZFaWt+r&#yrOu-!4pXAJuxM+Cx z*H&>eZ0v8Y`t}8{TV6smOj=__gFC=eah)mZt9gwz>>W$!>b3O;Rm^Ig*POZP8Rl0f zT~o=Nu1J|lO>}xX&#P58%Yl z83`HRs5#32Qm9mdCrMlV|NKNC+Z~ z9OB8xk5HJ>gBLi+m@(pvpw)1(OaVJKs*$Ou#@Knd#bk+V@y;YXT?)4eP9E5{J%KGtYinNYJUH9PU3A}66c>Xn zZ{Bn0<;8$WCOAL$^NqTjwM?5d=RHgw3!72WRo0c;+houoUA@HWLZM;^U$&sycWrFd zE7ekt9;kb0`lps{>R(}YnXlyGY}5pPd9zBpgXeJTY_jwaJGSJQC#-KJqmh-;ad&F- z-Y)E>!&`Rz!HtCz>%yOJ|v(u7P*I$jqEY3}(Z-orn4 zlI?CYKNl`6I){#2P1h)y(6?i;^z`N3bxTV%wNvQW+eu|x=kbj~s8rhCR*0H=iGkSj zk23lr9kr|p7#qKL=UjgO`@UnvzU)`&fI>1Qs7ubq{@+lK{hH* zvl6eSb9%yngRn^T<;jG1SVa)eA>T^XX=yUS@NCKpk?ovCW1D@!=@kn;l_BrG;hOTC z6K&H{<8K#dI(A+zw-MWxS+~{g$tI7|SfP$EYKxA}LlVO^sT#Oby^grkdZ^^lA}uEF zBSj$weBJG{+Bh@Yffzsw=HyChS(dtLE3i*}Zj@~!_T-Ay7z=B)+*~3|?w`Zd)Co2t zC&4DyB!o&YgSw+fJn6`sn$e)29`kUwAc+1MND7YjV%lO;H2}fNy>hD#=gT ze+-aFNpyKIoXY~Vq-}OWPBe?Rfu^{ps8>Xy%42r@RV#*QV~P83jdlFNgkPN=T|Kt7 zV*M`Rh*30&AWlb$;ae130e@}Tqi3zx2^JQHpM>j$6x`#{mu%tZlwx9Gj@Hc92IuY* zarmT|*d0E~vt6<+r?W^UW0&#U&)8B6+1+;k^2|FWBRP9?C4Rk)HAh&=AS8FS|NQaZ z2j!iZ)nbEyg4ZTp-zHwVlfLC~tXIrv(xrP8PAtR{*c;T24ycA-;auWsya-!kF~CWZ zw_uZ|%urXgUbc@x=L=_g@QJ@m#5beS@6W195Hn7>_}z@Xt{DIEA`A&V82bc^#!q8$ zFh?z_Vn|ozJ;NPd^5uu(9tspo8t%&-U9Ckay-s@DnM*R5rtu|4)~e)`z0P-sy?)kc zs_k&J@0&0!q4~%cKL)2l;N*T&0;mqX5T{Qy60%JtKTQZ-xb%KOcgqwJmb%MOOKk7N zgq})R_6**{8A|6H?fO+2`#QU)p$Ei2&nbj6TpLSIT^D$|`TcSeh+)}VMb}LmvZ{O| ze*1IdCt3+yhdYVxcM)Q_V0bIXLgr6~%JS<<&dxIgfL=Vnx4YHuU@I34JXA|+$_S3~ zy~X#gO_X!cSs^XM{yzDGNM>?v(+sF#<0;AH^YrE8smx<36bUsHbN#y57K8WEu(`qHvQ6cAZPo=J5C(lSmUCZ57Rj6cx!e^rfaI5%w}unz}4 zoX=nt)FVNV%QDJH`o!u9olLD4O5fl)xp+#RloZlaA92o3x4->?rB4`gS$;WO{R;Z3>cG3IgFX2EA?PK^M}@%1%A;?f6}s&CV$cIyEr#q5;yHdNZ9h{| z-=dX+a5elJoDo?Eq&Og!nN6A)5yYpnGEp}?=!C-V)(*~z-+?kY1Q7qs#Rsy%hu_60rdbB+QQNr?S1 z?;xtjUv|*E3}HmuNyB9aFL5H~3Ho0UsmuMZELp1a#CA1g`P{-mT?BchuLEtK}!QZ=3AWakRu~?f9V~3F;TV`5%9Pcs_$gq&CcU}r8gOO zC2&SWPsSG{&o-LIGTBqp6SLQZPvYKp$$7L4WRRZ0BR$Kf0I0SCFkqveCp@f)o8W)! z$%7D1R`&j7W9Q9CGus_)b%+B#J2G;l*FLz#s$hw{BHS~WNLODV#(!u_2Pe&tMsq={ zdm7>_WecWF#D=?eMjLj=-_z`aHMZ=3_-&E8;ibPmM}61i6J3is*=dKf%HC>=xbj4$ zS|Q-hWQ8T5mWde6h@;mS+?k=89?1FU<%qH9B(l&O>k|u_aD|DY*@~(`_pb|B#rJ&g zR0(~(68fpUPz6TdS@4JT5MOPrqDh5_H(eX1$P2SQrkvN8sTxwV>l0)Qq z0pzTuvtEAKRDkKGhhv^jk%|HQ1DdF%5oKq5BS>szk-CIke{%js?~%@$uaN3^Uz6Wf z_iyx{bZ(;9y4X&>LPV=L=d+A}7I4GkK0c1Xts{rrW1Q7apHf-))`BgC^0^F(>At1* za@e7{lq%yAkn*NH8Q1{@{lKhRg*^TfGvv!Sn*ed*x@6>M%aaqySxR|oNadYt1mpUZ z6H(rupHYf&Z z29$5g#|0MX#aR6TZ$@eGxxABRKakDYtD%5BmKp;HbG_ZbT+=81E&=XRk6m_3t9PvD zr5Cqy(v?gHcYvYvXkNH@S#Po~q(_7MOuCAB8G$a9BC##gw^5mW16cML=T=ERL7wsk zzNEayTG?mtB=x*wc@ifBCJ|irFVMOvH)AFRW8WE~U()QT=HBCe@s$dA9O!@`zAAT) zaOZ7l6vyR+Nk_OOF!ZlZmjoImKh)dxFbbR~z(cMhfeX1l7S_`;h|v3gI}n9$sSQ>+3@AFAy9=B_y$)q;Wdl|C-X|VV3w8 z2S#>|5dGA8^9%Bu&fhmVRrTX>Z7{~3V&0UpJNEl0=N32euvDGCJ>#6dUSi&PxFW*s zS`}TB>?}H(T2lxBJ!V#2taV;q%zd6fOr=SGHpoSG*4PDaiG0pdb5`jelVipkEk%FV zThLc@Hc_AL1#D&T4D=w@UezYNJ%0=f3iVRuVL5H?eeZM}4W*bomebEU@e2d`M<~uW zf#Bugwf`VezG|^Qbt6R_=U0}|=k;mIIakz99*>FrsQR{0aQRP6ko?5<7bkDN8evZ& zB@_KqQG?ErKL=1*ZM9_5?Pq%lcS4uLSzN(Mr5=t6xHLS~Ym`UgM@D&VNu8e?_=nSFtF$u@hpPSmI4Vo_t&v?>$~K4y(O~Rb*(MFy_igM7 z*~yYUyR6yQgzWnWMUgDov!!g=lInM+=lOmOk4L`O?{i&qxy&D*_qorRbDwj6?)!ef z#JLd7F6Z2I$S0iYI={rZNk*<{HtIl^mx=h>Cim*04K4+Z4IJtd*-)%6XV2(MCscPiw_a+y*?BKbTS@BZ3AUao^%Zi#PhoY9Vib4N>SE%4>=Jco0v zH_Miey{E;FkdlZSq)e<{`+S3W=*ttvD#hB8w=|2aV*D=yOV}(&p%0LbEWH$&@$X3x~CiF-?ejQ*N+-M zc8zT@3iwkdRT2t(XS`d7`tJQAjRmKAhiw{WOqpuvFp`i@Q@!KMhwKgsA}%@sw8Xo5Y=F zhRJZg)O4uqNWj?V&&vth*H#je6T}}p_<>!Dr#89q@uSjWv~JuW(>FqoJ5^ho0%K?E z9?x_Q;kmcsQ@5=}z@tdljMSt9-Z3xn$k)kEjK|qXS>EfuDmu(Z8|(W?gY6-l z@R_#M8=vxKMAoi&PwnaIYw2COJM@atcgfr=zK1bvjW?9B`-+Voe$Q+H$j!1$Tjn+* z&LY<%)L@;zhnJlB^Og6I&BOR-m?{IW;tyYC%FZ!&Z>kGjHJ6cqM-F z&19n+e1=9AH1VrVeHrIzqlC`w9=*zfmrerF?JMzO&|Mmv;!4DKc(sp+jy^Dx?(8>1 zH&yS_4yL7m&GWX~mdfgH*AB4{CKo;+egw=PrvkTaoBU+P-4u?E|&!c z)DKc;>$$B6u*Zr1SjUh2)FeuWLWHl5TH(UHWkf zLs>7px!c5n;rbe^lO@qlYLzlDVp(z?6rPZel=YB)Uv&n!2{+Mb$-vQl=xKw( zve&>xYx+jW_NJh!FV||r?;hdP*jOXYcLCp>DOtJ?2S^)DkM{{Eb zS$!L$e_o0(^}n3tA1R3-$SNvgBq;DOEo}fNc|tB%%#g4RA3{|euq)p+xd3I8^4E&m zFrD%}nvG^HUAIKe9_{tXB;tl|G<%>yk6R;8L2)KUJw4yHJXUOPM>(-+jxq4R;z8H#>rnJy*)8N+$wA$^F zN+H*3t)eFEgxLw+Nw3};4WV$qj&_D`%ADV2%r zJCPCo%{=z7;`F98(us5JnT(G@sKTZ^;2FVitXyLe-S5(hV&Ium+1pIUB(CZ#h|g)u zSLJJ<@HgrDiA-}V_6B^x1>c9B6%~847JkQ!^KLZ2skm;q*edo;UA)~?SghG8;QbHh z_6M;ouo_1rq9=x$<`Y@EA{C%6-pEV}B(1#sDoe_e1s3^Y>n#1Sw;N|}8D|s|VPd+g z-_$QhCz`vLxxrVMx3ape1xu3*wjx=yKSlM~nFgkNWb4?DDr*!?U)L_VeffF<+!j|b zZ$Wn2$TDv3C3V@BHpSgv3JUif8%hk%OsGZ=OxH@8&4`bbf$`aAMchl^qN>Eyu3JH} z9-S!x8-s4fE=lad%Pkp8hAs~u?|uRnL48O|;*DEU! zuS0{cpk%1E0nc__2%;apFsTm0bKtd&A0~S3Cj^?72-*Owk3V!ZG*PswDfS~}2<8le z5+W^`Y(&R)yVF*tU_s!XMcJS`;(Tr`J0%>p=Z&InR%D3@KEzzI+-2)HK zuoNZ&o=wUC&+*?ofPb0a(E6(<2Amd6%uSu_^-<1?hsxs~0K5^f(LsGqgEF^+0_H=uNk9S0bb!|O8d?m5gQjUKevPaO+*VfSn^2892K~%crWM8+6 z25@V?Y@J<9w%@NXh-2!}SK_(X)O4AM1-WTg>sj1{lj5@=q&dxE^9xng1_z9w9DK>| z6Iybcd0e zyi;Ew!KBRIfGPGytQ6}z}MeXCfLY0?9%RiyagSp_D1?N&c{ zyo>VbJ4Gy`@Fv+5cKgUgs~na$>BV{*em7PU3%lloy_aEovR+J7TfQKh8BJXyL6|P8un-Jnq(ghd!_HEOh$zlv2$~y3krgeH;9zC}V3f`uDtW(%mT#944DQa~^8ZI+zAUu4U(j0YcDfKR$bK#gvn_{JZ>|gZ5+)u?T$w7Q%F^;!Wk?G z(le7r!ufT*cxS}PR6hIVtXa)i`d$-_1KkyBU>qmgz-=T};uxx&sKgv48akIWQ89F{ z0XiY?WM^~;|T8zBOr zs#zuOONzH?svv*jokd5SK8wG>+yMC)LYL|vLqm^PMHcT=`}V$=nIRHe2?h)8WQa6O zPAU}d`1y(>kZiP~Gr=mtJLMu`i<2CspL|q2DqAgAD^7*$xzM`PU4^ga`ilE134XBQ z99P(LhHU@7qvl9Yzg$M`+dlS=x^(m-_3t|h>S}E0bcFMn=C|KamQ)=w2^e)35p`zY zRV8X?d;s^>Cof2SPR&nP3E+-LCkS0J$H!eh8~k0qo$}00b=7!H_I2O+Ro@3O$nPdm ztmbOO^B+IHzQ5w>@@@J4cKw5&^_w6s!s=H%&byAbUtczPQ7}wfTqxxtQNfn*u73Qw zGuWsrky_ajPx-5`R<)6xHf>C(oqGf_Fw|-U*GfS?xLML$kv;h_pZ@Kk$y0X(S+K80 z6^|z)*`5VUkawg}=z`S;VhZhxyDfrE0$(PMurAxl~<>lfZa>JZ288ULK7D` zl9|#L^JL}Y$j*j`0-K6kH#?bRmg#5L3iB4Z)%iF@SqT+Lp|{i`m%R-|ZE94Np7Pa5 zCqC^V3}B(FR340pmF*qaa}M}+h6}mqE~7Sh!9bDv9YRT|>vBNAqv09zXHMlcuhKD| zcjjA(b*XCIwJ33?CB!+;{)vX@9xns_b-VO{i0y?}{!sdXj1GM8+$#v>W7nw;+O_9B z_{4L;C6ol?(?W0<6taGEn1^uG=?Q3i29sE`RfYCaV$3DKc_;?HsL?D_fSYg}SuO5U zOB_f4^vZ_x%o`5|C@9C5+o=mFy@au{s)sKw!UgC&L35aH(sgDxRE2De%(%OT=VUdN ziVLEmdOvJ&5*tCMKRyXctCwQu_RH%;m*$YK&m;jtbdH#Ak~13T1^f89tn`A%QEHWs~jnY~E}p_Z$XC z=?YXLCkzVSK+Id`xZYTegb@W8_baLt-Fq`Tv|=)JPbFsKRm)4UW;yT+J`<)%#ue9DPOkje)YF2fsCilK9MIIK>p*`fkoD5nGfmLwt)!KOT+> zOFq*VZktDDyM3P5UOg`~XL#cbzC}eL%qMB=Q5$d89MKuN#$6|4gx_Jt0Gfn8w&q}%lq4QU%6#jT*MRT% zrLz~C8FYKHawn-EQWN1B75O&quS+Z81(zN)G>~vN8VwC+e+y(`>HcxC{MrJ;H1Z4k zZWuv$w_F0-Ub%MVcpIc){4PGL^I7M{>;hS?;eH!;gmcOE66z3;Z1Phqo(t zVP(Hg6q#0gIKgsg7L7WE!{Y#1nI(45tx2{$34dDd#!Z0NIyrm)HOn5W#7;f4pQci# zDW!FI(g4e668kI9{2+mLwB+=#9bfqgX%!B34V-$wwSN(_cm*^{y0jQtv*4}eO^sOV z*9xoNvX)c9isB}Tgx&ZRjp3kwhTVK?r9;n!x>^XYT z@Q^7zp{rkIs{2mUSE^2!Gf6$6;j~&4=-0cSJJDizZp6LTe8b45;{AKM%v99}{{FfC zz709%u0mC=1KXTo(=TqmZQ;c?$M3z(!xah>aywrj40sc2y3rKFw4jCq+Y+u=CH@_V zxz|qeTwa>+<|H%8Dz5u>ZI5MmjTFwXS-Fv!TDd*`>3{krWoNVx$<133`(ftS?ZPyY z&4@ah^3^i`vL$BZa>O|Nt?ucewzsF)0zX3qmM^|waXr=T0pfIb0*$AwU=?Ipl|1Y; z*Pk6{C-p4MY;j@IJ|DW>QHZQJcp;Z~?8(Q+Kk3^0qJ}SCk^*n4W zu9ZFwLHUx-$6xvaQ)SUQcYd6fF8&x)V`1bIuX@>{mE$b|Yd(qomn3;bPwnDUc0F=; zh*6_((%bqAYQWQ~odER?h>1mkL4kpb3s7`0m@rDKGU*oyF)$j~Ffd4fXV$?`f~rHf zB%Y)@5SXZvfwm10RY5X?TEo)PK_`L6qgBp=#>fO49$D zDq8Ozj0q6213tV5Qq=;fZ0$|KroY{Dz=l@lU^J)?Ko@ti20TRplXzphBi>XGx4bou zEWrkNjz0t5j!_ke{g5I#PUlEU$Km8g8TE|XK=MkU@PT4T><2OVamoK;wJ}3X0L$vX zgd7gNa359*nc)R-0!`2X@FOTB`+oETOPc=ubp5R)VQgY+5BTZZJ2?9QwnO=dnulIUF3gFn;BODC2)65)HeVd%t86sL7Rv^Y+nbn+&l z6BAJY(ETvwI)Ts$aiE8rht4KD*qNyE{8{x6R|%akbTBzw;2+6Echkt+W+`u^XX z_z&x%n '} +case $link in #( +/*) app_path=$link ;; #( +*) app_path=$APP_HOME$link ;; +esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { +echo "$*" +} >&2 + +die () { +echo +echo "$*" +echo +exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( +CYGWIN* ) cygwin=true ;; #( +Darwin* ) darwin=true ;; #( +MSYS* | MINGW* ) msys=true ;; #( +NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then +if [ -x "$JAVA_HOME/jre/sh/java" ] ; then +# IBM's JDK on AIX uses strange locations for the executables +JAVACMD=$JAVA_HOME/jre/sh/java +else +JAVACMD=$JAVA_HOME/bin/java +fi +if [ ! -x "$JAVACMD" ] ; then +die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi +else +JAVACMD=java +if ! command -v java >/dev/null 2>&1 +then +die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then +case $MAX_FD in #( +max*) +# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +MAX_FD=$( ulimit -H -n ) || +warn "Could not query maximum file descriptor limit" +esac +case $MAX_FD in #( +'' | soft) :;; #( +*) +# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +ulimit -n "$MAX_FD" || +warn "Could not set maximum file descriptor limit to $MAX_FD" +esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then +APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) +CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + +JAVACMD=$( cygpath --unix "$JAVACMD" ) + +# Now convert the arguments - kludge to limit ourselves to /bin/sh +for arg do +if +case $arg in #( +-*) false ;; # don't mess with options #( +/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath +[ -e "$t" ] ;; #( +*) false ;; +esac +then +arg=$( cygpath --path --ignore --mixed "$arg" ) +fi +# Roll the args list around exactly as many times as the number of +# args, so each arg winds up back in the position where it started, but +# possibly modified. +# +# NB: a `for` loop captures its iteration list before it begins, so +# changing the positional parameters here affects neither the number of +# iterations, nor the values presented in `arg`. +shift # remove old arg +set -- "$@" "$arg" # push replacement arg +done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ +"-Dorg.gradle.appname=$APP_BASE_NAME" \ +-classpath "$CLASSPATH" \ +org.gradle.wrapper.GradleWrapperMain \ +"$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then +die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( +printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | +xargs -n1 | +sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | +tr '\n' ' ' +)" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradlew.bat b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradlew.bat new file mode 100644 index 000000000000..25da30dbdeee --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/pom.xml b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/pom.xml new file mode 100644 index 000000000000..827ea7626a5d --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/pom.xml @@ -0,0 +1,170 @@ + + 4.0.0 + org.openapitools + openapi-spring + jar + openapi-spring + 1.0.0 + + 3.0.2 + 2.1.0 + 1.7.10 + + 1.7.10 + UTF-8 + + + org.springframework.boot + spring-boot-starter-parent + 3.3.13 + + + + + org.springframework.cloud + spring-cloud-starter-parent + 2023.0.6 + pom + import + + + + + + repository.spring.milestone + Spring Milestone Repository + https://repo.spring.io/milestone + + + + + spring-milestones + https://repo.spring.io/milestone + + + + ${project.basedir}/src/main/kotlin + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${kotlin.version} + + + spring + + 17 + + + + compile + compile + + compile + + + + test-compile + test-compile + + test-compile + + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${kotlin.version} + + + + + + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${kotlin.version} + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin.version} + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springdoc + springdoc-openapi-webmvc-core + + ${springdoc-openapi.version} + + + + + com.google.code.findbugs + jsr305 + ${findbugs-jsr305.version} + + + org.springframework.boot + spring-boot-starter-oauth2-client + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-kotlin + + + + jakarta.validation + jakarta.validation-api + + + + org.springframework.boot + spring-boot-starter-validation + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation.version} + provided + + + org.jetbrains.kotlin + kotlin-test-junit5 + ${kotlin-test-junit5.version} + test + + + diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/settings.gradle b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/settings.gradle new file mode 100644 index 000000000000..14844905cd40 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + maven { url = uri("https://repo.spring.io/snapshot") } + maven { url = uri("https://repo.spring.io/milestone") } + gradlePluginPortal() + } + resolutionStrategy { + eachPlugin { + if (requested.id.id == "org.springframework.boot") { + useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}") + } + } + } +} +rootProject.name = "openapi-spring" diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/PetApi.kt new file mode 100644 index 000000000000..dbf287daa80d --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -0,0 +1,128 @@ +/** +* NOTE: Auto generated by OpenAPI Generator (7.23.0-SNAPSHOT) +* Spring 6 Declarative HTTP Interface +*/ +package org.openapitools.api + +import org.openapitools.model.ModelApiResponse +import org.openapitools.model.Pet + +import io.swagger.v3.oas.annotations.* +import io.swagger.v3.oas.annotations.enums.* +import io.swagger.v3.oas.annotations.media.* +import io.swagger.v3.oas.annotations.responses.* +import io.swagger.v3.oas.annotations.security.* + +import org.springframework.web.service.annotation.* +import org.springframework.web.bind.annotation.* +import org.springframework.http.ResponseEntity + +import org.springframework.validation.annotation.Validated +import jakarta.validation.Valid +import jakarta.validation.constraints.* + + +import kotlin.collections.List +import kotlin.collections.Map + +@Validated +interface PetApi { + + @HttpExchange( + // "/pet" + url = PATH_ADD_PET, + method = "POST" + ) + fun addPet( + @Parameter(description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody pet: Pet + ): ResponseEntity + + + @HttpExchange( + // "/pet/{petId}" + url = PATH_DELETE_PET, + method = "DELETE" + ) + fun deletePet( + @Parameter(description = "Pet id to delete", required = true) @PathVariable("petId") petId: kotlin.Long, + @Parameter(description = "", `in` = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) apiKey: kotlin.String? + ): ResponseEntity + + + @HttpExchange( + // "/pet/findByStatus" + url = PATH_FIND_PETS_BY_STATUS, + method = "GET" + ) + fun findPetsByStatus( + @NotNull @Parameter(description = "Status values that need to be considered for filter", required = true, schema = Schema(allowableValues = ["available", "pending", "sold"])) @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List + ): ResponseEntity> + + + @HttpExchange( + // "/pet/findByTags" + url = PATH_FIND_PETS_BY_TAGS, + method = "GET" + ) + fun findPetsByTags( + @NotNull @Parameter(description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List + ): ResponseEntity> + + + @HttpExchange( + // "/pet/{petId}" + url = PATH_GET_PET_BY_ID, + method = "GET" + ) + fun getPetById( + @Parameter(description = "ID of pet to return", required = true) @PathVariable("petId") petId: kotlin.Long + ): ResponseEntity + + + @HttpExchange( + // "/pet" + url = PATH_UPDATE_PET, + method = "PUT" + ) + fun updatePet( + @Parameter(description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody pet: Pet + ): ResponseEntity + + + @HttpExchange( + // "/pet/{petId}" + url = PATH_UPDATE_PET_WITH_FORM, + method = "POST" + ) + fun updatePetWithForm( + @Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long, + @Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String?, + @Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? + ): ResponseEntity + + + @HttpExchange( + // "/pet/{petId}/uploadImage" + url = PATH_UPLOAD_FILE, + method = "POST" + ) + fun uploadFile( + @Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long, + @Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String?, + @Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile + ): ResponseEntity + + + companion object { + //for your own safety never directly reuse these path definitions in tests + const val BASE_PATH: String = "/v2" + const val PATH_ADD_PET: String = "/pet" + const val PATH_DELETE_PET: String = "/pet/{petId}" + const val PATH_FIND_PETS_BY_STATUS: String = "/pet/findByStatus" + const val PATH_FIND_PETS_BY_TAGS: String = "/pet/findByTags" + const val PATH_GET_PET_BY_ID: String = "/pet/{petId}" + const val PATH_UPDATE_PET: String = "/pet" + const val PATH_UPDATE_PET_WITH_FORM: String = "/pet/{petId}" + const val PATH_UPLOAD_FILE: String = "/pet/{petId}/uploadImage" + } +} diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/StoreApi.kt new file mode 100644 index 000000000000..00e57d9658a3 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -0,0 +1,77 @@ +/** +* NOTE: Auto generated by OpenAPI Generator (7.23.0-SNAPSHOT) +* Spring 6 Declarative HTTP Interface +*/ +package org.openapitools.api + +import org.openapitools.model.Order + +import io.swagger.v3.oas.annotations.* +import io.swagger.v3.oas.annotations.enums.* +import io.swagger.v3.oas.annotations.media.* +import io.swagger.v3.oas.annotations.responses.* +import io.swagger.v3.oas.annotations.security.* + +import org.springframework.web.service.annotation.* +import org.springframework.web.bind.annotation.* +import org.springframework.http.ResponseEntity + +import org.springframework.validation.annotation.Validated +import jakarta.validation.Valid +import jakarta.validation.constraints.* + + +import kotlin.collections.List +import kotlin.collections.Map + +@Validated +interface StoreApi { + + @HttpExchange( + // "/store/order/{orderId}" + url = PATH_DELETE_ORDER, + method = "DELETE" + ) + fun deleteOrder( + @Parameter(description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") orderId: kotlin.String + ): ResponseEntity + + + @HttpExchange( + // "/store/inventory" + url = PATH_GET_INVENTORY, + method = "GET" + ) + fun getInventory( + ): ResponseEntity> + + + @HttpExchange( + // "/store/order/{orderId}" + url = PATH_GET_ORDER_BY_ID, + method = "GET" + ) + fun getOrderById( + @Min(value=1L) @Max(value=5L) @Parameter(description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") orderId: kotlin.Long + ): ResponseEntity + + + @HttpExchange( + // "/store/order" + url = PATH_PLACE_ORDER, + method = "POST" + ) + fun placeOrder( + @Parameter(description = "order placed for purchasing the pet", required = true) @Valid @RequestBody order: Order + ): ResponseEntity + + + companion object { + //for your own safety never directly reuse these path definitions in tests + const val BASE_PATH: String = "/v2" + const val PATH_DELETE_ORDER: String = "/store/order/{orderId}" + const val PATH_GET_INVENTORY: String = "/store/inventory" + const val PATH_GET_ORDER_BY_ID: String = "/store/order/{orderId}" + const val PATH_PLACE_ORDER: String = "/store/order" + } +} diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/UserApi.kt new file mode 100644 index 000000000000..dbb4f25db50f --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -0,0 +1,123 @@ +/** +* NOTE: Auto generated by OpenAPI Generator (7.23.0-SNAPSHOT) +* Spring 6 Declarative HTTP Interface +*/ +package org.openapitools.api + +import org.openapitools.model.User + +import io.swagger.v3.oas.annotations.* +import io.swagger.v3.oas.annotations.enums.* +import io.swagger.v3.oas.annotations.media.* +import io.swagger.v3.oas.annotations.responses.* +import io.swagger.v3.oas.annotations.security.* + +import org.springframework.web.service.annotation.* +import org.springframework.web.bind.annotation.* +import org.springframework.http.ResponseEntity + +import org.springframework.validation.annotation.Validated +import jakarta.validation.Valid +import jakarta.validation.constraints.* + + +import kotlin.collections.List +import kotlin.collections.Map + +@Validated +interface UserApi { + + @HttpExchange( + // "/user" + url = PATH_CREATE_USER, + method = "POST" + ) + fun createUser( + @Parameter(description = "Created user object", required = true) @Valid @RequestBody user: User + ): ResponseEntity + + + @HttpExchange( + // "/user/createWithArray" + url = PATH_CREATE_USERS_WITH_ARRAY_INPUT, + method = "POST" + ) + fun createUsersWithArrayInput( + @Parameter(description = "List of user object", required = true) @Valid @RequestBody user: kotlin.collections.List + ): ResponseEntity + + + @HttpExchange( + // "/user/createWithList" + url = PATH_CREATE_USERS_WITH_LIST_INPUT, + method = "POST" + ) + fun createUsersWithListInput( + @Parameter(description = "List of user object", required = true) @Valid @RequestBody user: kotlin.collections.List + ): ResponseEntity + + + @HttpExchange( + // "/user/{username}" + url = PATH_DELETE_USER, + method = "DELETE" + ) + fun deleteUser( + @Parameter(description = "The name that needs to be deleted", required = true) @PathVariable("username") username: kotlin.String + ): ResponseEntity + + + @HttpExchange( + // "/user/{username}" + url = PATH_GET_USER_BY_NAME, + method = "GET" + ) + fun getUserByName( + @Parameter(description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") username: kotlin.String + ): ResponseEntity + + + @HttpExchange( + // "/user/login" + url = PATH_LOGIN_USER, + method = "GET" + ) + fun loginUser( + @NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(description = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String, + @NotNull @Parameter(description = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String + ): ResponseEntity + + + @HttpExchange( + // "/user/logout" + url = PATH_LOGOUT_USER, + method = "GET" + ) + fun logoutUser( + ): ResponseEntity + + + @HttpExchange( + // "/user/{username}" + url = PATH_UPDATE_USER, + method = "PUT" + ) + fun updateUser( + @Parameter(description = "name that need to be deleted", required = true) @PathVariable("username") username: kotlin.String, + @Parameter(description = "Updated user object", required = true) @Valid @RequestBody user: User + ): ResponseEntity + + + companion object { + //for your own safety never directly reuse these path definitions in tests + const val BASE_PATH: String = "/v2" + const val PATH_CREATE_USER: String = "/user" + const val PATH_CREATE_USERS_WITH_ARRAY_INPUT: String = "/user/createWithArray" + const val PATH_CREATE_USERS_WITH_LIST_INPUT: String = "/user/createWithList" + const val PATH_DELETE_USER: String = "/user/{username}" + const val PATH_GET_USER_BY_NAME: String = "/user/{username}" + const val PATH_LOGIN_USER: String = "/user/login" + const val PATH_LOGOUT_USER: String = "/user/logout" + const val PATH_UPDATE_USER: String = "/user/{username}" + } +} diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Category.kt new file mode 100644 index 000000000000..b7b5e059c976 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Category.kt @@ -0,0 +1,35 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid +import io.swagger.v3.oas.annotations.media.Schema + +/** + * A category for a pet + * @param id + * @param name + */ +data class Category( + + @Schema(example = "null", description = "") + @get:JsonProperty("id") val id: kotlin.Long? = null, + + @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(example = "null", description = "") + @get:JsonProperty("name") val name: kotlin.String? = null +) : java.io.Serializable { + + companion object { + private const val serialVersionUID: kotlin.Long = 1 + } +} + diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt new file mode 100644 index 000000000000..394c0098f8f0 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -0,0 +1,38 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid +import io.swagger.v3.oas.annotations.media.Schema + +/** + * Describes the result of uploading an image resource + * @param code + * @param type + * @param message + */ +data class ModelApiResponse( + + @Schema(example = "null", description = "") + @get:JsonProperty("code") val code: kotlin.Int? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("type") val type: kotlin.String? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("message") val message: kotlin.String? = null +) : java.io.Serializable { + + companion object { + private const val serialVersionUID: kotlin.Long = 1 + } +} + diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt new file mode 100644 index 000000000000..4749b654be89 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Order.kt @@ -0,0 +1,72 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonCreator +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.annotation.JsonValue +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid +import io.swagger.v3.oas.annotations.media.Schema + +/** + * An order for a pets from the pet store + * @param id + * @param petId + * @param quantity + * @param shipDate + * @param status Order Status + * @param complete + */ +data class Order( + + @Schema(example = "null", description = "") + @get:JsonProperty("id") val id: kotlin.Long? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("petId") val petId: kotlin.Long? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("quantity") val quantity: kotlin.Int? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + + @Schema(example = "null", description = "Order Status") + @get:JsonProperty("status") val status: Order.Status? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("complete") val complete: kotlin.Boolean? = false +) : java.io.Serializable { + + /** + * Order Status + * Values: placed,approved,delivered + */ + enum class Status(@get:JsonValue val value: kotlin.String) { + + placed("placed"), + approved("approved"), + delivered("delivered"); + + companion object { + @JvmStatic + @JsonCreator + fun forValue(value: kotlin.String): Status { + return values().firstOrNull{it -> it.value == value} + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + } + } + } + + companion object { + private const val serialVersionUID: kotlin.Long = 1 + } +} + diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt new file mode 100644 index 000000000000..b5645e48a282 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Pet.kt @@ -0,0 +1,77 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonCreator +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.annotation.JsonValue +import org.openapitools.model.Category +import org.openapitools.model.Tag +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid +import io.swagger.v3.oas.annotations.media.Schema + +/** + * A pet for sale in the pet store + * @param name + * @param photoUrls + * @param id + * @param category + * @param tags + * @param status pet status in the store + */ +data class Pet( + + @Schema(example = "doggie", required = true, description = "") + @get:JsonProperty("name", required = true) val name: kotlin.String, + + @Schema(example = "null", required = true, description = "") + @get:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, + + @Schema(example = "null", description = "") + @get:JsonProperty("id") val id: kotlin.Long? = null, + + @field:Valid + @Schema(example = "null", description = "") + @get:JsonProperty("category") val category: Category? = null, + + @field:Valid + @Schema(example = "null", description = "") + @get:JsonProperty("tags") val tags: kotlin.collections.List? = null, + + @Schema(example = "null", description = "pet status in the store") + @Deprecated(message = "") + @get:JsonProperty("status") val status: Pet.Status? = null +) : java.io.Serializable { + + /** + * pet status in the store + * Values: available,pending,sold + */ + enum class Status(@get:JsonValue val value: kotlin.String) { + + available("available"), + pending("pending"), + sold("sold"); + + companion object { + @JvmStatic + @JsonCreator + fun forValue(value: kotlin.String): Status { + return values().firstOrNull{it -> it.value == value} + ?: throw IllegalArgumentException("Unexpected value '$value' for enum 'Status'") + } + } + } + + companion object { + private const val serialVersionUID: kotlin.Long = 1 + } +} + diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Tag.kt new file mode 100644 index 000000000000..fbcd6bc6890a --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/Tag.kt @@ -0,0 +1,34 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid +import io.swagger.v3.oas.annotations.media.Schema + +/** + * A tag for a pet + * @param id + * @param name + */ +data class Tag( + + @Schema(example = "null", description = "") + @get:JsonProperty("id") val id: kotlin.Long? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("name") val name: kotlin.String? = null +) : java.io.Serializable { + + companion object { + private const val serialVersionUID: kotlin.Long = 1 + } +} + diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/User.kt new file mode 100644 index 000000000000..2ab37ba8ae92 --- /dev/null +++ b/samples/server/petstore/kotlin-spring-declarative-interface-bean-validation/src/main/kotlin/org/openapitools/model/User.kt @@ -0,0 +1,58 @@ +package org.openapitools.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import jakarta.validation.constraints.DecimalMax +import jakarta.validation.constraints.DecimalMin +import jakarta.validation.constraints.Email +import jakarta.validation.constraints.Max +import jakarta.validation.constraints.Min +import jakarta.validation.constraints.NotNull +import jakarta.validation.constraints.Pattern +import jakarta.validation.constraints.Size +import jakarta.validation.Valid +import io.swagger.v3.oas.annotations.media.Schema + +/** + * A User who is purchasing from the pet store + * @param id + * @param username + * @param firstName + * @param lastName + * @param email + * @param password + * @param phone + * @param userStatus User Status + */ +data class User( + + @Schema(example = "null", description = "") + @get:JsonProperty("id") val id: kotlin.Long? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("username") val username: kotlin.String? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("firstName") val firstName: kotlin.String? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("lastName") val lastName: kotlin.String? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("email") val email: kotlin.String? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("password") val password: kotlin.String? = null, + + @Schema(example = "null", description = "") + @get:JsonProperty("phone") val phone: kotlin.String? = null, + + @Schema(example = "null", description = "User Status") + @get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null +) : java.io.Serializable { + + companion object { + private const val serialVersionUID: kotlin.Long = 1 + } +} + diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/pom.xml b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/pom.xml index 8d80f1de11dc..5f5b9ad8fdcd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/pom.xml +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/pom.xml @@ -161,6 +161,11 @@ jakarta.validation jakarta.validation-api + + + org.springframework.boot + spring-boot-starter-validation + jakarta.annotation jakarta.annotation-api diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/pom.xml b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/pom.xml index 8d80f1de11dc..5f5b9ad8fdcd 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/pom.xml +++ b/samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/pom.xml @@ -161,6 +161,11 @@ jakarta.validation jakarta.validation-api + + + org.springframework.boot + spring-boot-starter-validation + jakarta.annotation jakarta.annotation-api diff --git a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/pom.xml b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/pom.xml index 15416bbf0ea7..827ea7626a5d 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/pom.xml +++ b/samples/server/petstore/kotlin-spring-declarative-interface-wrapped/pom.xml @@ -149,6 +149,11 @@ jakarta.validation jakarta.validation-api + + + org.springframework.boot + spring-boot-starter-validation + jakarta.annotation jakarta.annotation-api diff --git a/samples/server/petstore/kotlin-spring-declarative-interface/pom.xml b/samples/server/petstore/kotlin-spring-declarative-interface/pom.xml index 15416bbf0ea7..827ea7626a5d 100644 --- a/samples/server/petstore/kotlin-spring-declarative-interface/pom.xml +++ b/samples/server/petstore/kotlin-spring-declarative-interface/pom.xml @@ -149,6 +149,11 @@ jakarta.validation jakarta.validation-api + + + org.springframework.boot + spring-boot-starter-validation + jakarta.annotation jakarta.annotation-api diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/api/FakeApi.java index 396950abb8e7..7c01a8ce3335 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/api/FakeApi.java @@ -348,7 +348,7 @@ ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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.23.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 f9f3c667c930..885ef40b3766 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.23.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 770874e8afc1..87bd99730a4b 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.23.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 fdfd5353942c..f18a2d0bcee5 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.23.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 b54195b47503..cffe49bed796 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.23.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 e1d983b46eb8..a0c6397e1611 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 2559da13bf1c..93aca6b11aa3 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/FormatTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/FormatTest.java index f30684b6418e..b78f23f8b686 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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.23.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 5d447d9c8b94..77a4a8896528 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 85b9061b4838..2e6cdbb5a8fe 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.23.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 f691d6df0a87..def89a414872 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 c463bbe78efe..16b988f92332 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 f8a78de07225..289fb021d49d 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 cc89638b7b3a..8db8aa55717b 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 bd748f485ed3..dec4226c3057 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.23.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/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 485c9fb3a40c..7b6bb2206294 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -409,7 +409,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 43408c5d4f42..3d0c6a995a22 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 @@ -25,28 +25,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 9017ec3968a2..88f46630e528 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 2644f121f40a..3d4ffd285caa 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b8799bdd7893..12c221c9b8f8 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 @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 89f4909d4f67..7d3f5fbe40e8 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 @@ -24,16 +24,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 4bf6f87134e1..8f32999910a9 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 @@ -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/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 74434c34c9df..46a81efce315 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 @@ -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/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 0c36311447ba..a6aec1d402ba 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -218,7 +218,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 91d36527d14d..28ab09ba0328 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 @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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/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 eeb57c86a88f..927fe9d2603f 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 @@ -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/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 0a461eaa8eb0..512f422f30bc 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 @@ -23,7 +23,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 cfcc176026f8..8fa0f83091cb 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 @@ -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/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 29ec038b8165..26dbd4554755 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 @@ -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/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 a311e6116f1c..ff1c4f87d2c2 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 @@ -35,7 +35,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 c2d508752382..e26dbeb31712 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 @@ -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/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 485c9fb3a40c..7b6bb2206294 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -409,7 +409,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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 @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b54195b47503..cffe49bed796 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 @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 2559da13bf1c..93aca6b11aa3 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 @@ -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/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index f30684b6418e..b78f23f8b686 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5d447d9c8b94..77a4a8896528 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 @@ -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/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java index 85b9061b4838..2e6cdbb5a8fe 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f691d6df0a87..def89a414872 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 @@ -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/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index c463bbe78efe..16b988f92332 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 @@ -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/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index f8a78de07225..289fb021d49d 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 @@ -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/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index cc89638b7b3a..8db8aa55717b 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 @@ -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/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/FakeApi.java index 9ef3b238cf83..590f46ac1466 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/api/FakeApi.java @@ -409,7 +409,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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 @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b54195b47503..cffe49bed796 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 @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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-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 2559da13bf1c..93aca6b11aa3 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 @@ -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-builtin-validation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/FormatTest.java index f30684b6418e..b78f23f8b686 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-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 5d447d9c8b94..77a4a8896528 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 @@ -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-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 85b9061b4838..2e6cdbb5a8fe 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f691d6df0a87..def89a414872 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 @@ -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-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 c463bbe78efe..16b988f92332 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 @@ -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-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 f8a78de07225..289fb021d49d 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 @@ -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-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 cc89638b7b3a..8db8aa55717b 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 @@ -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-builtin-validation/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-builtin-validation/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-builtin-validation/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 95497902f00e..6341478d30b9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -369,7 +369,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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 @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b54195b47503..cffe49bed796 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 @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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-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 2559da13bf1c..93aca6b11aa3 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 @@ -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-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index f30684b6418e..b78f23f8b686 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-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 5d447d9c8b94..77a4a8896528 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 @@ -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-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 85b9061b4838..2e6cdbb5a8fe 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f691d6df0a87..def89a414872 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 @@ -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-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 c463bbe78efe..16b988f92332 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 @@ -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-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 f8a78de07225..289fb021d49d 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 @@ -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-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 cc89638b7b3a..8db8aa55717b 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 @@ -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-delegate-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None 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 83f142cf8362..970f2979d763 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 @@ -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-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 95497902f00e..6341478d30b9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -369,7 +369,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 73dbb09aa03c..888b9ffafd3c 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 @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 63b5e4597704..d3d39e0cb51e 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 8c64a0596bb5..c87ec6039cb8 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 32c7fcb228da..cf5fd27443a5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 8fd15f093514..cb50167b1b31 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 @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 ab76a8c3e528..1155b84f5297 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 @@ -98,7 +98,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 18c998c76200..5da5b82044b4 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 @@ -28,7 +28,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/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index ac50e55fcc7f..4a75a2cc8942 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -239,7 +239,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 0aefbbfd940d..e710fc166328 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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() { 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 1bc37d5cca68..7af86344e9b4 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 @@ -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() { 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 86e49aa2458e..2091c8db944f 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 a717157cb2ca..f640b1a0e839 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 @@ -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-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 82477e33b9dd..31b5b33b130a 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 @@ -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-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index d01f4691ce35..0200309c675a 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 @@ -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-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 7712425c46f4..f306f5bf2b15 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 @@ -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() { diff --git a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None 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 cf8d05543b7a..36aea3ca89b0 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/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index d68295f0f5a3..bdf35b787744 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -409,7 +409,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 71a07dfb02ad..a3cd041bb199 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 @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 81241315ea23..4a4dcc093121 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 7f26d96482bc..80189dee2bfb 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 246b75e448ae..817d9acb9352 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 d95b2ca5e0b5..66461522ce4d 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 @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 03dd46b3fce3..5a6ab90c8376 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 @@ -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-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index cd75a7379f90..2c56f00ad27c 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 @@ -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-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 1074fd660587..e8576eb23d6b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 0b18e8119c61..06c5002e1c3f 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b0e18eb44360..691720674793 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 @@ -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-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java index 184ac9321619..b5f92669d480 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 375d6f36f8ba..2b5239e264fc 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 @@ -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-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 17e08181f6fe..3330325e4cfe 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 @@ -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-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index 56b17a7d23eb..f609ff220ff6 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 @@ -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-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 2c16b96ab8ec..a184dc48526e 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 @@ -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-implicitHeaders/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/api/FakeApi.java index b557664f9465..e9cac6b6d1af 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/api/FakeApi.java @@ -419,7 +419,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 de6d28c450a9..3c1de6d13d86 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 @@ -31,28 +31,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b942d3d792fc..ef163fa37293 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 @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 2b286b418e08..25919ede761b 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 @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 d9bf7b99edcb..b565be8ca58c 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 @@ -28,13 +28,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 2ba1099ed96c..560bb468210a 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 @@ -29,16 +29,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e6c6a0120ad9..d6bc22aaeb1f 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 @@ -100,7 +100,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 da22f712adf2..9f064e8927a4 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 @@ -30,7 +30,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/FormatTestDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/FormatTestDto.java index 831ee53a8205..1a29201f3f68 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/FormatTestDto.java @@ -219,7 +219,7 @@ public FormatTestDto string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 ca46b1b9eeaa..b274e0ae2862 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -65,13 +64,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 33c3f3c721ed..ec151bf7033c 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 @@ -35,7 +35,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 20f268f80d50..6e4bc5e8f16e 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 @@ -29,7 +29,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 1ca54ad1e87d..6b242ffa15b4 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 @@ -39,10 +39,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 4bfcff056f4b..d7b58b86f262 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 @@ -36,7 +36,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 80142d62352f..5cddc468268f 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 @@ -38,7 +38,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 58a2fb3e7a47..7df71cc9ca70 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 @@ -36,7 +36,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -47,10 +46,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -61,10 +58,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -75,10 +70,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -89,10 +82,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-include-http-request-context/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-include-http-request-context/src/main/resources/openapi.yaml index ffd8d109c347..c93e954114f0 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2348,7 +2348,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None 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 967538cd8250..c93f6eb7a204 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 0bc9358d3a71..c1bd5bcb339e 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-paged-model/src/main/java/org/openapitools/model/UserList.java b/samples/server/petstore/springboot-paged-model/src/main/java/org/openapitools/model/UserList.java index 067fd2ae5ac4..ade7ea9c4d1c 100644 --- a/samples/server/petstore/springboot-paged-model/src/main/java/org/openapitools/model/UserList.java +++ b/samples/server/petstore/springboot-paged-model/src/main/java/org/openapitools/model/UserList.java @@ -28,7 +28,6 @@ public class UserList implements Serializable { private static final long serialVersionUID = 1L; - @Valid private List<@Valid User> content = new ArrayList<>(); private @Nullable String description; 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 83f142cf8362..970f2979d763 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/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index 83e09aa526b6..dda308b698c9 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -382,7 +382,7 @@ default Mono testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestPart(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestPart(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestPart(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) Part binary, @Parameter(name = "date", description = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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 @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b54195b47503..cffe49bed796 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 @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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-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 2559da13bf1c..93aca6b11aa3 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 @@ -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-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java index f30684b6418e..b78f23f8b686 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-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 5d447d9c8b94..77a4a8896528 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 @@ -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-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 85b9061b4838..2e6cdbb5a8fe 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f691d6df0a87..def89a414872 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 @@ -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-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 c463bbe78efe..16b988f92332 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 @@ -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-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 f8a78de07225..289fb021d49d 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 @@ -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-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 cc89638b7b3a..8db8aa55717b 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 @@ -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-reactive-noResponseEntity/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 84ae9dbb7d55..a12c70f0131a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -382,7 +382,7 @@ default Mono> testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestPart(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestPart(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestPart(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) Part binary, @Parameter(name = "date", description = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 31fb21c743c0..ad05af2bbe26 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 @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b54195b47503..cffe49bed796 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 @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 2559da13bf1c..93aca6b11aa3 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 @@ -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-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index f30684b6418e..b78f23f8b686 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5d447d9c8b94..77a4a8896528 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 @@ -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-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java index 85b9061b4838..2e6cdbb5a8fe 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f691d6df0a87..def89a414872 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 @@ -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-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index c463bbe78efe..16b988f92332 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 @@ -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-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index f8a78de07225..289fb021d49d 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 @@ -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-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index cc89638b7b3a..8db8aa55717b 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 @@ -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-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None 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 efb07f463576..b6056edba227 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 @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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-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 2559da13bf1c..93aca6b11aa3 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 @@ -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-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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-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 5d447d9c8b94..77a4a8896528 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 @@ -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-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 b0a12d92e520..98ba747d6219 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 @@ -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-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 1e03db3d466c..903e4321abda 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 @@ -34,7 +34,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 f8a78de07225..289fb021d49d 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 @@ -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-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 cc89638b7b3a..8db8aa55717b 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 @@ -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-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 efb07f463576..b6056edba227 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 @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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-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 2559da13bf1c..93aca6b11aa3 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 @@ -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-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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-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 5d447d9c8b94..77a4a8896528 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 @@ -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-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 b0a12d92e520..98ba747d6219 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 @@ -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-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 1e03db3d466c..903e4321abda 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 @@ -34,7 +34,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 f8a78de07225..289fb021d49d 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 @@ -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-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 cc89638b7b3a..8db8aa55717b 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 @@ -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-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 efb07f463576..b6056edba227 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 @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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-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 2559da13bf1c..93aca6b11aa3 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 @@ -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-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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-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 5d447d9c8b94..77a4a8896528 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 @@ -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-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 b0a12d92e520..98ba747d6219 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 @@ -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-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 1e03db3d466c..903e4321abda 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 @@ -34,7 +34,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 f8a78de07225..289fb021d49d 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 @@ -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-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 cc89638b7b3a..8db8aa55717b 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 @@ -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-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 efb07f463576..b6056edba227 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 @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f9f3c667c930..885ef40b3766 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 770874e8afc1..87bd99730a4b 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fdfd5353942c..f18a2d0bcee5 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e1d983b46eb8..a0c6397e1611 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 @@ -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-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 2559da13bf1c..93aca6b11aa3 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 @@ -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-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 8e3f4db686d8..4e71b796683c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-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 5d447d9c8b94..77a4a8896528 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 @@ -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-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 b0a12d92e520..98ba747d6219 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 @@ -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-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 1e03db3d466c..903e4321abda 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 @@ -34,7 +34,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 f8a78de07225..289fb021d49d 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 @@ -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-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 cc89638b7b3a..8db8aa55717b 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 @@ -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-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 b0a12d92e520..98ba747d6219 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 9ed59dd15a1e..098ce44ac0b8 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 @@ -29,28 +29,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 937733e0549a..ebc956ad943a 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 32a1d96be0b0..434468ea4e9e 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 @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 f15bed66700f..c980f58f280d 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 @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 39ede5ac601b..ded498d443e2 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 @@ -27,16 +27,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 d72a55a278f6..ae9d521b6daa 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 @@ -98,7 +98,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 2d6868eb9a26..c3f4151c8959 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 @@ -28,7 +28,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/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 9029d70bb8ee..1449381edb87 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -42,7 +42,7 @@ public class FormatTest { private Optional<@DecimalMin(value = "67.8") @DecimalMax(value = "123.4") Double> _double = Optional.empty(); - private Optional<@Pattern(regexp = "/[a-z]/i") String> string = Optional.empty(); + private Optional<@Pattern(regexp = "[a-zA-Z]") String> string = Optional.empty(); private byte[] _byte; @@ -222,7 +222,7 @@ public FormatTest string(String string) { @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") - public Optional<@Pattern(regexp = "/[a-z]/i") String> getString() { + public Optional<@Pattern(regexp = "[a-zA-Z]") String> getString() { return string; } 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 19f1c0799dd4..b4a29a2be38c 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 @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index aeb8a5d5b5be..48f541defd36 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 @@ -33,7 +33,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 745fe98704e2..fb76c9a1c011 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 fc168d4164d8..eacb178c0f29 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 @@ -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-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 60a6f2538b0c..575251031916 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 @@ -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-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index cc1db0fbe47b..f16cfeebf214 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 @@ -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-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 0b23bf26f419..b14f978b1fe1 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 @@ -34,7 +34,6 @@ public class XmlItem { private Optional attributeBoolean = Optional.empty(); - @Valid private List wrappedArray = new ArrayList<>(); private Optional nameString = Optional.empty(); @@ -45,10 +44,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(); @@ -59,10 +56,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(); @@ -73,10 +68,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(); @@ -87,10 +80,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-useoptional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 1aaf6bd0d3ec..275f18b59b10 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -422,7 +422,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 8555254362e6..1d5266dd1d52 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.23.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 573e0f576cb4..d6341267c845 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.23.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 56191853c216..10e79aab44a5 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.23.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 464950fd1683..2e17aae7c538 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.23.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 86c7dd42fa70..71cdbd614374 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.23.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 d4a4adc57e5e..639953a21ba6 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 79c04c83fee9..770a1222922e 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/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index 04ae5ff1a94c..6f59a3f4a733 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -219,7 +219,7 @@ public FormatTest string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 f98c9e068cf7..2d5cd85d61cd 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.23.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 e1e11eece065..b3cc12335471 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 19b1c3bfbeca..d85b76e76d15 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.23.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 c71a08007dab..78b60e5b9bcc 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 52a42c214302..d95d84a9e4dc 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 81c26554500d..ce3df357e406 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 b7abfc22160f..e54cb9e44b51 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-virtualan/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml index 3ee3d2f2941d..53ec8083c77d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2360,7 +2360,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None 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 e3bd0e67d389..d793e70ed957 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 @@ -26,10 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b942d3d792fc..ef163fa37293 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 @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 2b286b418e08..25919ede761b 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 @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 59cf388c3fe7..3360e6e702a7 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 @@ -28,13 +28,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e6c6a0120ad9..d6bc22aaeb1f 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 @@ -100,7 +100,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 0e49eb2af025..bbd164ac4a6c 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 @@ -29,7 +29,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 da22f712adf2..9f064e8927a4 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 @@ -30,7 +30,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 ca46b1b9eeaa..b274e0ae2862 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -65,13 +64,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 33c3f3c721ed..ec151bf7033c 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 @@ -35,7 +35,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 bdb8f6c23333..cf2d29ebd102 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 @@ -53,22 +53,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 0d405847c715..58402ea7d6ef 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 @@ -38,7 +38,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 5045419d2397..0cb62bc794c5 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 @@ -39,10 +39,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/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 8e2760f5315d..8769790fcda0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -409,7 +409,7 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "int32", description = "None") @Min(value = 20) @Max(value = 200) @Valid @RequestParam(value = "int32", required = false) Integer int32, @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, @Parameter(name = "float", description = "None") @DecimalMax(value = "987.6") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Pattern(regexp = "/[a-z]/i") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "string", description = "None") @Pattern(regexp = "[a-zA-Z]") @Valid @RequestParam(value = "string", required = false) String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, 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 de6d28c450a9..3c1de6d13d86 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 @@ -31,28 +31,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 b942d3d792fc..ef163fa37293 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 @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 2b286b418e08..25919ede761b 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 @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 d9bf7b99edcb..b565be8ca58c 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 @@ -28,13 +28,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 2ba1099ed96c..560bb468210a 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 @@ -29,16 +29,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 e6c6a0120ad9..d6bc22aaeb1f 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 @@ -100,7 +100,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 da22f712adf2..9f064e8927a4 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 @@ -30,7 +30,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/FormatTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java index 831ee53a8205..1a29201f3f68 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java @@ -219,7 +219,7 @@ public FormatTestDto string(@Nullable String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "[a-zA-Z]") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") public @Nullable String getString() { 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 ca46b1b9eeaa..b274e0ae2862 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 @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -65,13 +64,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 33c3f3c721ed..ec151bf7033c 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 @@ -35,7 +35,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 20f268f80d50..6e4bc5e8f16e 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 @@ -29,7 +29,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.23.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 1ca54ad1e87d..6b242ffa15b4 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 @@ -39,10 +39,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 4bfcff056f4b..d7b58b86f262 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 @@ -36,7 +36,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 80142d62352f..5cddc468268f 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 @@ -38,7 +38,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 58a2fb3e7a47..7df71cc9ca70 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 @@ -36,7 +36,6 @@ public class XmlItemDto { private @Nullable Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private @Nullable String nameString; @@ -47,10 +46,8 @@ public class XmlItemDto { private @Nullable Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private @Nullable String prefixString; @@ -61,10 +58,8 @@ public class XmlItemDto { private @Nullable Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private @Nullable String namespaceString; @@ -75,10 +70,8 @@ public class XmlItemDto { private @Nullable Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private @Nullable String prefixNsString; @@ -89,10 +82,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/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index ffd8d109c347..c93e954114f0 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -1592,7 +1592,7 @@ components: minimum: 67.8 type: number string: - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string byte: format: byte @@ -2348,7 +2348,7 @@ components: type: number string: description: None - pattern: "/[a-z]/i" + pattern: "[a-zA-Z]" type: string pattern_without_delimiter: description: None