From a3ae24a8e50616c82a524ea47b5bc95fe00d69eb Mon Sep 17 00:00:00 2001 From: jpfinne Date: Tue, 16 Apr 2024 22:23:40 +0200 Subject: [PATCH 1/5] allArgConstructor for java --- .github/workflows/openapi-generator.yaml | 17 +- .github/workflows/samples-scala.yaml | 1 + README.md | 3 +- bin/configs/{unmaintained => }/html2.yaml | 0 ...file-rest-client-3.0-jackson-with-xml.yaml | 3 +- ...-microprofile-rest-client-3.0-jackson.yaml | 3 +- bin/configs/java-okhttp-gson-swagger1.yaml | 3 +- bin/configs/java-resttemplate-jakarta.yaml | 1 + bin/configs/java-resttemplate.yaml | 1 + ...in-model-prefix-type-mapping-echo-api.yaml | 2 +- .../kotlin-model-prefix-type-mapping.yaml | 2 +- bin/configs/scala-cask-petstore-new.yaml | 13 + bin/configs/spring-boot-3.yaml | 1 + bin/configs/spring-boot-delegate.yaml | 1 + bin/configs/spring-boot-lombok-data.yaml | 1 + docs/customization.md | 2 + docs/generators.md | 1 + docs/generators/scala-cask.md | 261 ++ .../openapitools/codegen/cmd/Generate.java | 4 +- .../codegen/config/GeneratorSettings.java | 28 +- .../gradle/plugin/tasks/GenerateTask.kt | 4 +- .../codegen/plugin/CodeGenMojo.java | 8 +- .../openapitools/codegen/CodegenConfig.java | 4 +- .../openapitools/codegen/DefaultCodegen.java | 54 +- .../codegen/DefaultGenerator.java | 10 +- .../codegen/InlineModelResolver.java | 13 +- .../codegen/OpenAPINormalizer.java | 11 +- .../codegen/config/CodegenConfigurator.java | 28 +- .../config/CodegenConfiguratorUtils.java | 16 +- .../languages/AbstractCSharpCodegen.java | 6 +- .../languages/AbstractJavaCodegen.java | 135 +- .../codegen/languages/JavaClientCodegen.java | 10 +- .../JavascriptApolloClientCodegen.java | 26 +- .../languages/JavascriptClientCodegen.java | 26 +- .../codegen/languages/OCamlClientCodegen.java | 2 +- .../languages/ScalaCaskServerCodegen.java | 845 ++++++ .../codegen/languages/SpringCodegen.java | 66 +- .../codegen/utils/ModelUtils.java | 25 +- .../Java/libraries/native/api.mustache | 10 +- .../libraries/okhttp-gson/ApiClient.mustache | 23 + .../okhttp-gson/auth/AWS4Auth.mustache | 5 + .../src/main/resources/Java/pojo.mustache | 30 +- .../main/resources/JavaSpring/pojo.mustache | 21 +- .../org.openapitools.codegen.CodegenConfig | 1 + .../main/resources/go/model_simple.mustache | 10 +- .../main/resources/htmlDocs2/index.mustache | 81 +- .../php-nextgen/ObjectSerializer.mustache | 1 - .../resources/php-symfony/Controller.mustache | 6 +- .../php-symfony/api_controller.mustache | 19 +- .../resources/php-symfony/composer.mustache | 16 +- .../serialization/JmsSerializer.mustache | 36 +- .../testing/ControllerTest.mustache | 2 +- .../resources/php/ObjectSerializer.mustache | 1 - .../python-fastapi/model_doc.mustache | 2 +- .../python-fastapi/requirements.mustache | 4 +- .../python-pydantic-v1/model_doc.mustache | 2 +- .../main/resources/python/api_client.mustache | 2 + .../main/resources/python/model_doc.mustache | 2 +- .../main/resources/rust-axum/Cargo.mustache | 4 +- .../src/main/resources/rust-axum/lib.mustache | 12 +- .../main/resources/rust-axum/models.mustache | 16 +- .../server-operation-validate.mustache | 8 +- .../scala-cask/.scalafmt.conf.mustache | 4 + .../resources/scala-cask/Dockerfile.mustache | 13 + .../main/resources/scala-cask/README.mustache | 96 + .../main/resources/scala-cask/api.mustache | 0 .../resources/scala-cask/apiPackage.mustache | 155 + .../resources/scala-cask/apiRoutes.mustache | 61 + .../apiRoutesQueryParamsTyped.mustache | 1 + .../resources/scala-cask/apiService.mustache | 37 + .../resources/scala-cask/appPackage.mustache | 12 + .../resources/scala-cask/appRoutes.mustache | 40 + .../resources/scala-cask/baseApp.mustache | 49 + .../resources/scala-cask/build.sbt.mustache | 29 + .../resources/scala-cask/build.sc.mustache | 43 + .../scala-cask/bulidAndPublish.yml.mustache | 41 + .../resources/scala-cask/example.mustache | 60 + .../resources/scala-cask/exampleApp.mustache | 21 + .../resources/scala-cask/gitignore.mustache | 25 + .../resources/scala-cask/licenseInfo.mustache | 16 + .../main/resources/scala-cask/model.mustache | 60 + .../resources/scala-cask/modelData.mustache | 250 ++ .../scala-cask/modelPackage.mustache | 53 + .../resources/scala-cask/modelTest.mustache | 37 + .../scala-cask/openapiRoute.mustache | 116 + .../scala-cask/parseHttpParams.mustache | 56 + .../scala-cask/pathExtractor.mustache | 1 + .../scala-cask/pathExtractorParams.mustache | 1 + .../scala-cask/project/build.properties | 1 + .../resources/scala-cask/project/plugins.sbt | 3 + .../resources/scala-cask/queryParams.mustache | 1 + .../typescript-node/package.mustache | 5 +- .../org/openapitools/codegen/AllVarsTest.java | 20 + .../codegen/OpenAPINormalizerTest.java | 86 +- .../codegen/go/GoClientCodegenTest.java | 21 + .../codegen/java/AbstractJavaCodegenTest.java | 89 + .../codegen/java/JavaClientCodegenTest.java | 87 +- .../java/spring/SpringCodegenTest.java | 137 +- .../codegen/utils/ModelUtilsTest.java | 6 + .../allof_multiple_ref_and_discriminator.yaml | 54 + .../3_0/java/all_args_constructor.yaml | 125 + .../3_0/postman-collection/SampleProject.yaml | 1 + ...ith-fake-endpoints-models-for-testing.yaml | 7 + .../3_0/simplifyOneOfAnyOf_test.yaml | 5 + .../src/test/resources/3_1/schema.yaml | 17 +- .../3_1/simplifyOneOfAnyOf_test.yaml | 114 + .../src/test/resources/sampleConfig.json | 14 +- .../org/openapitools/client/model/Bird.java | 1 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/DataQuery.java | 2 - .../client/model/DefaultValue.java | 7 - .../client/model/NumberPropertiesOnly.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../org/openapitools/client/model/Query.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - ...deTrueObjectAllOfQueryObjectParameter.java | 3 - .../org/openapitools/client/api/AuthApi.java | 2 + .../org/openapitools/client/api/BodyApi.java | 18 +- .../org/openapitools/client/api/FormApi.java | 3 + .../openapitools/client/api/HeaderApi.java | 1 + .../org/openapitools/client/api/PathApi.java | 1 + .../org/openapitools/client/api/QueryApi.java | 10 + .../org/openapitools/client/ApiClient.java | 13 + .../org/openapitools/client/model/Bird.java | 1 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/DataQuery.java | 2 - .../client/model/DefaultValue.java | 7 - .../client/model/NumberPropertiesOnly.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../org/openapitools/client/model/Query.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - ...deTrueObjectAllOfQueryObjectParameter.java | 3 - .../org/openapitools/client/model/Bird.java | 1 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/DataQuery.java | 2 - .../client/model/DefaultValue.java | 7 - .../client/model/NumberPropertiesOnly.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../org/openapitools/client/model/Query.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - ...deTrueObjectAllOfQueryObjectParameter.java | 3 - .../php-nextgen/.openapi-generator/FILES | 2 +- .../echo_api/php-nextgen/phpunit.xml.dist | 4 +- .../php-nextgen/src/ObjectSerializer.php | 1 - .../docs/Bird.md | 2 +- .../docs/Category.md | 2 +- .../docs/DataQuery.md | 2 +- .../docs/DefaultValue.md | 2 +- .../docs/NumberPropertiesOnly.md | 2 +- .../docs/Pet.md | 2 +- .../docs/Query.md | 2 +- .../docs/Tag.md | 2 +- .../TestFormObjectMultipartRequestMarker.md | 2 +- ...lodeTrueObjectAllOfQueryObjectParameter.md | 2 +- ...lodeTrueArrayStringQueryObjectParameter.md | 2 +- .../openapi_client/api_client.py | 2 + .../echo_api/python-pydantic-v1/docs/Bird.md | 2 +- .../python-pydantic-v1/docs/Category.md | 2 +- .../python-pydantic-v1/docs/DataQuery.md | 2 +- .../python-pydantic-v1/docs/DefaultValue.md | 2 +- .../docs/NumberPropertiesOnly.md | 2 +- .../echo_api/python-pydantic-v1/docs/Pet.md | 2 +- .../echo_api/python-pydantic-v1/docs/Query.md | 2 +- .../echo_api/python-pydantic-v1/docs/Tag.md | 2 +- .../TestFormObjectMultipartRequestMarker.md | 2 +- ...lodeTrueObjectAllOfQueryObjectParameter.md | 2 +- ...lodeTrueArrayStringQueryObjectParameter.md | 2 +- samples/client/echo_api/python/docs/Bird.md | 2 +- .../client/echo_api/python/docs/Category.md | 2 +- .../client/echo_api/python/docs/DataQuery.md | 2 +- .../echo_api/python/docs/DefaultValue.md | 2 +- .../python/docs/NumberPropertiesOnly.md | 2 +- samples/client/echo_api/python/docs/Pet.md | 2 +- samples/client/echo_api/python/docs/Query.md | 2 +- samples/client/echo_api/python/docs/Tag.md | 2 +- .../TestFormObjectMultipartRequestMarker.md | 2 +- ...lodeTrueObjectAllOfQueryObjectParameter.md | 2 +- ...lodeTrueArrayStringQueryObjectParameter.md | 2 +- .../python/openapi_client/api_client.py | 2 + .../echo_api/r/.openapi-generator/FILES | 2 +- .../org/openapitools/client/ApiClient.java | 13 + .../org/openapitools/client/ApiClient.java | 13 + .../R-httr2-wrapper/.openapi-generator/FILES | 2 +- .../petstore/R-httr2/.openapi-generator/FILES | 2 +- .../petstore/R/.openapi-generator/FILES | 2 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 10 +- .../Model/PolymorphicProperty.cs | 28 +- .../Org.OpenAPITools.Test/Api/FakeApiTests.cs | 20 + .../Model/ClassModelTests.cs | 6 +- .../Model/FooGetDefaultResponseTests.cs | 6 +- .../Model/FormatTestTests.cs | 30 +- .../Model/MixedEnumTypeTests.cs | 56 - .../Model/MixedNullableEnumTypeTests.cs | 56 - .../Model/MixedSubIdTests.cs | 65 - .../Model/Model200ResponseTests.cs | 6 +- .../Model/ReturnTests.cs | 27 + .../src/Org.OpenAPITools/Model/OneOfString.cs | 10 +- .../Model/PolymorphicProperty.cs | 28 +- .../Org.OpenAPITools.Test/Api/FakeApiTests.cs | 20 + .../Model/ClassModelTests.cs | 6 +- .../Model/FooGetDefaultResponseTests.cs | 6 +- .../Model/FormatTestTests.cs | 30 +- .../Model/MixedEnumTypeTests.cs | 56 - .../Model/MixedNullableEnumTypeTests.cs | 56 - .../Model/MixedSubIdTests.cs | 65 - .../Model/Model200ResponseTests.cs | 6 +- .../Model/ReturnTests.cs | 27 + .../src/Org.OpenAPITools/Model/OneOfString.cs | 10 +- .../Model/PolymorphicProperty.cs | 28 +- .../src/Org.OpenAPITools/Model/OneOfString.cs | 10 +- .../Model/PolymorphicProperty.cs | 28 +- .../Org.OpenAPITools.Test/Api/FakeApiTests.cs | 20 + .../Model/ClassModelTests.cs | 6 +- .../Model/FooGetDefaultResponseTests.cs | 6 +- .../Model/FormatTestTests.cs | 30 +- .../Model/MixedEnumTypeTests.cs | 56 - .../Model/MixedNullableEnumTypeTests.cs | 56 - .../Model/MixedSubIdTests.cs | 65 - .../Model/Model200ResponseTests.cs | 6 +- .../Model/ReturnTests.cs | 27 + .../src/Org.OpenAPITools/Model/OneOfString.cs | 10 +- .../Model/PolymorphicProperty.cs | 28 +- .../model/AdditionalPropertiesClass.java | 1 - .../client/model/AllOfWithSingleRef.java | 1 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 7 - .../model/FakeBigDecimalMap200Response.java | 1 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 15 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../client/model/NullableClass.java | 11 - .../model/ObjectWithDeprecatedFields.java | 3 - .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../client/model/ParentWithNullable.java | 3 +- .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../model/AdditionalPropertiesClass.java | 10 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 4 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 13 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../client/model/TypeHolderDefault.java | 4 - .../client/model/TypeHolderExample.java | 5 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/XmlItem.java | 28 - .../client/RFC3339DateFormat.java | 2 +- .../client/RFC3339DateFormat.java | 2 +- .../client/api/AnotherFakeApi.java | 5 +- .../openapitools/client/api/DefaultApi.java | 5 +- .../org/openapitools/client/api/FakeApi.java | 59 +- .../client/api/FakeClassnameTags123Api.java | 5 +- .../org/openapitools/client/api/PetApi.java | 29 +- .../org/openapitools/client/api/StoreApi.java | 16 +- .../org/openapitools/client/api/UserApi.java | 16 +- .../org/openapitools/client/api/PetApi.java | 20 +- .../org/openapitools/client/api/StoreApi.java | 10 +- .../org/openapitools/client/api/UserApi.java | 12 +- .../client/api/AnotherFakeApi.java | 3 +- .../openapitools/client/api/DefaultApi.java | 3 +- .../org/openapitools/client/api/FakeApi.java | 41 +- .../client/api/FakeClassnameTags123Api.java | 3 +- .../org/openapitools/client/api/PetApi.java | 19 +- .../org/openapitools/client/api/StoreApi.java | 10 +- .../org/openapitools/client/api/UserApi.java | 12 +- .../org/openapitools/client/ApiClient.java | 13 + .../org/openapitools/client/ApiClient.java | 21 + .../openapitools/client/auth/AWS4Auth.java | 5 + .../org/openapitools/client/ApiClient.java | 13 + .../org/openapitools/client/ApiClient.java | 13 + .../org/openapitools/client/ApiClient.java | 13 + .../org/openapitools/client/ApiClient.java | 13 + .../.openapi-generator/FILES | 8 +- .../java/okhttp-gson-swagger1/README.md | 46 +- .../okhttp-gson-swagger1/api/openapi.yaml | 40 +- .../okhttp-gson-swagger1/docs/CommonApi.md | 1373 +++++++++ .../java/okhttp-gson-swagger1/docs/PetApi.md | 570 ---- .../okhttp-gson-swagger1/docs/StoreApi.md | 266 -- .../java/okhttp-gson-swagger1/docs/UserApi.md | 553 ---- .../org/openapitools/client/ApiClient.java | 13 + .../openapitools/client/api/CommonApi.java | 2645 +++++++++++++++++ .../org/openapitools/client/api/PetApi.java | 1155 ------- .../org/openapitools/client/api/StoreApi.java | 570 ---- .../org/openapitools/client/api/UserApi.java | 1068 ------- .../client/api/CommonApiTest.java | 324 ++ .../openapitools/client/api/PetApiTest.java | 153 - .../openapitools/client/api/StoreApiTest.java | 89 - .../openapitools/client/api/UserApiTest.java | 148 - .../client/model/CategoryTest.java | 2 +- .../client/model/ModelApiResponseTest.java | 2 +- .../openapitools/client/model/OrderTest.java | 2 +- .../openapitools/client/model/PetTest.java | 2 +- .../openapitools/client/model/TagTest.java | 2 +- .../openapitools/client/model/UserTest.java | 2 +- .../org/openapitools/client/ApiClient.java | 13 + .../org/openapitools/client/ApiClient.java | 13 + .../model/AdditionalPropertiesClass.java | 10 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 4 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 13 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../client/model/TypeHolderDefault.java | 4 - .../client/model/TypeHolderExample.java | 5 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/XmlItem.java | 28 - .../model/AdditionalPropertiesClass.java | 10 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 4 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 13 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../client/model/TypeHolderDefault.java | 4 - .../client/model/TypeHolderExample.java | 5 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/XmlItem.java | 28 - .../model/AdditionalPropertiesClass.java | 1 - .../client/model/AllOfWithSingleRef.java | 1 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 7 - .../model/FakeBigDecimalMap200Response.java | 1 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 15 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../client/model/NullableClass.java | 11 - .../model/ObjectWithDeprecatedFields.java | 3 - .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../client/model/ParentWithNullable.java | 3 +- .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/Category.java | 9 +- .../client/model/ModelApiResponse.java | 11 +- .../org/openapitools/client/model/Order.java | 17 +- .../org/openapitools/client/model/Pet.java | 17 +- .../org/openapitools/client/model/Tag.java | 9 +- .../org/openapitools/client/model/User.java | 21 +- .../openapitools/client/model/Category.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Order.java | 5 - .../org/openapitools/client/model/Pet.java | 5 - .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/Category.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Order.java | 5 - .../org/openapitools/client/model/Pet.java | 5 - .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../model/AdditionalPropertiesClass.java | 1 - .../client/model/AllOfWithSingleRef.java | 1 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 7 - .../model/FakeBigDecimalMap200Response.java | 1 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 15 - .../client/model/HasOnlyReadOnly.java | 1 - .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 3 - .../client/model/NullableClass.java | 11 - .../model/ObjectWithDeprecatedFields.java | 3 - .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../client/model/ParentWithNullable.java | 3 +- .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 1 - .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../model/AdditionalPropertiesClass.java | 9 +- .../client/model/AllOfWithSingleRef.java | 9 +- .../org/openapitools/client/model/Animal.java | 11 +- .../model/ArrayOfArrayOfNumberOnly.java | 7 + .../client/model/ArrayOfNumberOnly.java | 7 + .../openapitools/client/model/ArrayTest.java | 11 +- .../client/model/Capitalization.java | 17 +- .../org/openapitools/client/model/Cat.java | 8 + .../openapitools/client/model/Category.java | 9 +- .../client/model/ChildWithNullable.java | 8 + .../openapitools/client/model/ClassModel.java | 7 + .../org/openapitools/client/model/Client.java | 7 + .../client/model/DeprecatedObject.java | 7 + .../org/openapitools/client/model/Dog.java | 8 + .../openapitools/client/model/EnumArrays.java | 9 +- .../openapitools/client/model/EnumTest.java | 21 +- .../model/FakeBigDecimalMap200Response.java | 9 +- .../client/model/FileSchemaTestClass.java | 9 +- .../org/openapitools/client/model/Foo.java | 7 + .../client/model/FooGetDefaultResponse.java | 7 + .../openapitools/client/model/FormatTest.java | 37 +- .../client/model/HasOnlyReadOnly.java | 5 +- .../client/model/HealthCheckResult.java | 7 + .../openapitools/client/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 11 +- .../client/model/Model200Response.java | 9 +- .../client/model/ModelApiResponse.java | 11 +- .../openapitools/client/model/ModelFile.java | 7 + .../openapitools/client/model/ModelList.java | 7 + .../client/model/ModelReturn.java | 7 + .../org/openapitools/client/model/Name.java | 17 +- .../client/model/NullableClass.java | 30 +- .../openapitools/client/model/NumberOnly.java | 7 + .../model/ObjectWithDeprecatedFields.java | 13 +- .../org/openapitools/client/model/Order.java | 17 +- .../client/model/OuterComposite.java | 11 +- .../model/OuterObjectWithEnumProperty.java | 7 + .../client/model/ParentWithNullable.java | 11 +- .../org/openapitools/client/model/Pet.java | 17 +- .../client/model/ReadOnlyFirst.java | 13 +- .../client/model/SpecialModelName.java | 7 + .../org/openapitools/client/model/Tag.java | 9 +- ...neFreeformAdditionalPropertiesRequest.java | 8 + .../org/openapitools/client/model/User.java | 21 +- .../model/AdditionalPropertiesClass.java | 10 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 4 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 13 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../client/model/TypeHolderDefault.java | 4 - .../client/model/TypeHolderExample.java | 5 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/XmlItem.java | 28 - .../model/AdditionalPropertiesClass.java | 10 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 4 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 13 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../client/model/TypeHolderDefault.java | 4 - .../client/model/TypeHolderExample.java | 5 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/XmlItem.java | 28 - .../model/AdditionalPropertiesClass.java | 10 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 4 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 13 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../client/model/TypeHolderDefault.java | 4 - .../client/model/TypeHolderExample.java | 5 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/XmlItem.java | 28 - .../model/AdditionalPropertiesClass.java | 10 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 4 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 13 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../client/model/TypeHolderDefault.java | 4 - .../client/model/TypeHolderExample.java | 5 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/XmlItem.java | 28 - .../model/AdditionalPropertiesClass.java | 10 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 4 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 13 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../client/model/TypeHolderDefault.java | 4 - .../client/model/TypeHolderExample.java | 5 - .../org/openapitools/client/model/User.java | 7 - .../openapitools/client/model/XmlItem.java | 28 - .../model/AdditionalPropertiesClass.java | 1 - .../client/model/AllOfWithSingleRef.java | 1 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 7 - .../model/FakeBigDecimalMap200Response.java | 1 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 15 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../client/model/NullableClass.java | 11 - .../model/ObjectWithDeprecatedFields.java | 3 - .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../client/model/ParentWithNullable.java | 3 +- .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../model/AdditionalPropertiesClass.java | 1 - .../client/model/AllOfWithSingleRef.java | 1 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 7 - .../model/FakeBigDecimalMap200Response.java | 1 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 15 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../client/model/NullableClass.java | 11 - .../model/ObjectWithDeprecatedFields.java | 3 - .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../client/model/ParentWithNullable.java | 3 +- .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../client/model/ByteArrayObject.java | 4 - .../model/AdditionalPropertiesClass.java | 1 - .../client/model/AllOfWithSingleRef.java | 1 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 7 - .../model/FakeBigDecimalMap200Response.java | 1 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 15 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../client/model/NullableClass.java | 11 - .../model/ObjectWithDeprecatedFields.java | 3 - .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../client/model/ParentWithNullable.java | 3 +- .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../model/AdditionalPropertiesClass.java | 1 - .../client/model/AllOfWithSingleRef.java | 1 - .../org/openapitools/client/model/Animal.java | 3 +- .../openapitools/client/model/ArrayTest.java | 2 - .../client/model/Capitalization.java | 5 - .../openapitools/client/model/Category.java | 1 - .../openapitools/client/model/EnumArrays.java | 1 - .../openapitools/client/model/EnumTest.java | 7 - .../model/FakeBigDecimalMap200Response.java | 1 - .../client/model/FileSchemaTestClass.java | 1 - .../openapitools/client/model/FormatTest.java | 15 - .../client/model/HasOnlyReadOnly.java | 5 +- .../openapitools/client/model/MapTest.java | 3 - ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../client/model/Model200Response.java | 1 - .../client/model/ModelApiResponse.java | 2 - .../org/openapitools/client/model/Name.java | 7 +- .../client/model/NullableClass.java | 11 - .../model/ObjectWithDeprecatedFields.java | 3 - .../org/openapitools/client/model/Order.java | 5 - .../client/model/OuterComposite.java | 2 - .../client/model/ParentWithNullable.java | 3 +- .../org/openapitools/client/model/Pet.java | 5 - .../client/model/ReadOnlyFirst.java | 5 +- .../org/openapitools/client/model/Tag.java | 1 - .../org/openapitools/client/model/User.java | 7 - .../.openapi-generator/FILES | 2 +- .../lib/ObjectSerializer.php | 1 - .../OpenAPIClient-php/phpunit.xml.dist | 4 +- .../src/ObjectSerializer.php | 1 - .../.openapi-generator/FILES | 2 +- .../lib/ObjectSerializer.php | 1 - .../php/psr-18/.openapi-generator/FILES | 2 +- .../php/psr-18/lib/ObjectSerializer.php | 1 - .../petstore/typescript-node/npm/package.json | 5 +- .../html2/.openapi-generator/VERSION | 2 +- samples/documentation/html2/index.html | 2012 ++++++++++--- .../docs/AdditionalPropertiesAnyType.md | 2 +- .../docs/AdditionalPropertiesClass.md | 2 +- .../docs/AdditionalPropertiesObject.md | 2 +- ...AdditionalPropertiesWithDescriptionOnly.md | 2 +- .../python-aiohttp/docs/AllOfSuperModel.md | 2 +- .../python-aiohttp/docs/AllOfWithSingleRef.md | 2 +- .../petstore/python-aiohttp/docs/Animal.md | 2 +- .../python-aiohttp/docs/AnyOfColor.md | 2 +- .../petstore/python-aiohttp/docs/AnyOfPig.md | 2 +- .../docs/ArrayOfArrayOfModel.md | 2 +- .../docs/ArrayOfArrayOfNumberOnly.md | 2 +- .../python-aiohttp/docs/ArrayOfNumberOnly.md | 2 +- .../petstore/python-aiohttp/docs/ArrayTest.md | 2 +- .../petstore/python-aiohttp/docs/BasquePig.md | 2 +- .../petstore/python-aiohttp/docs/Bathing.md | 2 +- .../python-aiohttp/docs/Capitalization.md | 2 +- .../petstore/python-aiohttp/docs/Cat.md | 2 +- .../petstore/python-aiohttp/docs/Category.md | 2 +- .../python-aiohttp/docs/CircularAllOfRef.md | 2 +- .../docs/CircularReferenceModel.md | 2 +- .../python-aiohttp/docs/ClassModel.md | 2 +- .../petstore/python-aiohttp/docs/Client.md | 2 +- .../petstore/python-aiohttp/docs/Color.md | 2 +- .../petstore/python-aiohttp/docs/Creature.md | 2 +- .../python-aiohttp/docs/CreatureInfo.md | 2 +- .../petstore/python-aiohttp/docs/DanishPig.md | 2 +- .../python-aiohttp/docs/DeprecatedObject.md | 2 +- .../docs/DiscriminatorAllOfSub.md | 2 +- .../docs/DiscriminatorAllOfSuper.md | 2 +- .../petstore/python-aiohttp/docs/Dog.md | 2 +- .../python-aiohttp/docs/DummyModel.md | 2 +- .../python-aiohttp/docs/EnumArrays.md | 2 +- .../petstore/python-aiohttp/docs/EnumTest.md | 2 +- .../petstore/python-aiohttp/docs/FakeApi.md | 7 +- .../petstore/python-aiohttp/docs/Feeding.md | 2 +- .../petstore/python-aiohttp/docs/File.md | 2 +- .../docs/FileSchemaTestClass.md | 2 +- .../petstore/python-aiohttp/docs/FirstRef.md | 2 +- .../petstore/python-aiohttp/docs/Foo.md | 2 +- .../docs/FooGetDefaultResponse.md | 2 +- .../python-aiohttp/docs/FormatTest.md | 2 +- .../python-aiohttp/docs/HasOnlyReadOnly.md | 2 +- .../python-aiohttp/docs/HealthCheckResult.md | 2 +- .../docs/InnerDictWithProperty.md | 2 +- .../python-aiohttp/docs/InputAllOf.md | 2 +- .../python-aiohttp/docs/IntOrString.md | 2 +- .../petstore/python-aiohttp/docs/ListClass.md | 2 +- .../python-aiohttp/docs/MapOfArrayOfModel.md | 2 +- .../petstore/python-aiohttp/docs/MapTest.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../python-aiohttp/docs/Model200Response.md | 2 +- .../python-aiohttp/docs/ModelApiResponse.md | 2 +- .../python-aiohttp/docs/ModelField.md | 2 +- .../python-aiohttp/docs/ModelReturn.md | 2 +- .../petstore/python-aiohttp/docs/Name.md | 2 +- .../python-aiohttp/docs/NullableClass.md | 2 +- .../python-aiohttp/docs/NullableProperty.md | 2 +- .../python-aiohttp/docs/NumberOnly.md | 2 +- .../docs/ObjectToTestAdditionalProperties.md | 2 +- .../docs/ObjectWithDeprecatedFields.md | 2 +- .../python-aiohttp/docs/OneOfEnumString.md | 2 +- .../petstore/python-aiohttp/docs/Order.md | 2 +- .../python-aiohttp/docs/OuterComposite.md | 2 +- .../docs/OuterObjectWithEnumProperty.md | 2 +- .../petstore/python-aiohttp/docs/Parent.md | 2 +- .../docs/ParentWithOptionalDict.md | 2 +- .../petstore/python-aiohttp/docs/Pet.md | 2 +- .../petstore/python-aiohttp/docs/Pig.md | 2 +- .../python-aiohttp/docs/PoopCleaning.md | 2 +- .../python-aiohttp/docs/PropertyMap.md | 2 +- .../docs/PropertyNameCollision.md | 2 +- .../python-aiohttp/docs/ReadOnlyFirst.md | 2 +- .../docs/SecondCircularAllOfRef.md | 2 +- .../petstore/python-aiohttp/docs/SecondRef.md | 2 +- .../python-aiohttp/docs/SelfReferenceModel.md | 2 +- .../python-aiohttp/docs/SpecialModelName.md | 2 +- .../python-aiohttp/docs/SpecialName.md | 2 +- .../petstore/python-aiohttp/docs/Tag.md | 2 +- .../petstore/python-aiohttp/docs/Task.md | 2 +- .../python-aiohttp/docs/TaskActivity.md | 2 +- .../TestErrorResponsesWithModel400Response.md | 2 +- .../TestErrorResponsesWithModel404Response.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- ...ObjectForMultipartRequestsRequestMarker.md | 2 +- .../petstore/python-aiohttp/docs/Tiger.md | 2 +- ...edDictWithAdditionalModelListProperties.md | 2 +- ...dDictWithAdditionalStringListProperties.md | 2 +- .../petstore/python-aiohttp/docs/User.md | 2 +- .../python-aiohttp/docs/WithNestedOneOf.md | 2 +- .../petstore_api/api/fake_api.py | 19 + .../python-aiohttp/petstore_api/api_client.py | 2 + .../docs/AdditionalPropertiesAnyType.md | 2 +- .../docs/AdditionalPropertiesClass.md | 2 +- .../docs/AdditionalPropertiesObject.md | 2 +- ...AdditionalPropertiesWithDescriptionOnly.md | 2 +- .../docs/AllOfSuperModel.md | 2 +- .../docs/AllOfWithSingleRef.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Animal.md | 2 +- .../docs/AnyOfColor.md | 2 +- .../docs/AnyOfPig.md | 2 +- .../docs/ApiResponse.md | 2 +- .../docs/ArrayOfArrayOfModel.md | 2 +- .../docs/ArrayOfArrayOfNumberOnly.md | 2 +- .../docs/ArrayOfNumberOnly.md | 2 +- .../docs/ArrayTest.md | 2 +- .../docs/BasquePig.md | 2 +- .../docs/Bathing.md | 2 +- .../docs/Capitalization.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Cat.md | 2 +- .../docs/Category.md | 2 +- .../docs/CircularAllOfRef.md | 2 +- .../docs/CircularReferenceModel.md | 2 +- .../docs/ClassModel.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Client.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Color.md | 2 +- .../docs/Creature.md | 2 +- .../docs/CreatureInfo.md | 2 +- .../docs/DanishPig.md | 2 +- .../docs/DeprecatedObject.md | 2 +- .../docs/DiscriminatorAllOfSub.md | 2 +- .../docs/DiscriminatorAllOfSuper.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Dog.md | 2 +- .../docs/DummyModel.md | 2 +- .../docs/EnumArrays.md | 2 +- .../docs/EnumTest.md | 2 +- .../docs/FakeApi.md | 7 +- .../docs/Feeding.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Field.md | 2 +- .../python-pydantic-v1-aiohttp/docs/File.md | 2 +- .../docs/FileSchemaTestClass.md | 2 +- .../docs/FirstRef.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Foo.md | 2 +- .../docs/FooGetDefaultResponse.md | 2 +- .../docs/FormatTest.md | 2 +- .../docs/HasOnlyReadOnly.md | 2 +- .../docs/HealthCheckResult.md | 2 +- .../docs/InnerDictWithProperty.md | 2 +- .../docs/InputAllOf.md | 2 +- .../docs/IntOrString.md | 2 +- .../docs/ListClass.md | 2 +- .../docs/MapOfArrayOfModel.md | 2 +- .../docs/MapTest.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../docs/Model200Response.md | 2 +- .../docs/ModelReturn.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Name.md | 2 +- .../docs/NullableClass.md | 2 +- .../docs/NullableProperty.md | 2 +- .../docs/NumberOnly.md | 2 +- .../docs/ObjectToTestAdditionalProperties.md | 2 +- .../docs/ObjectWithDeprecatedFields.md | 2 +- .../docs/OneOfEnumString.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Order.md | 2 +- .../docs/OuterComposite.md | 2 +- .../docs/OuterObjectWithEnumProperty.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Parent.md | 2 +- .../docs/ParentWithOptionalDict.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Pet.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Pig.md | 2 +- .../docs/PoopCleaning.md | 2 +- .../docs/PropertyMap.md | 2 +- .../docs/PropertyNameCollision.md | 2 +- .../docs/ReadOnlyFirst.md | 2 +- .../docs/SecondCircularAllOfRef.md | 2 +- .../docs/SecondRef.md | 2 +- .../docs/SelfReferenceModel.md | 2 +- .../docs/SpecialModelName.md | 2 +- .../docs/SpecialName.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Tag.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Task.md | 2 +- .../docs/TaskActivity.md | 2 +- .../TestErrorResponsesWithModel400Response.md | 2 +- .../TestErrorResponsesWithModel404Response.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- ...ObjectForMultipartRequestsRequestMarker.md | 2 +- .../python-pydantic-v1-aiohttp/docs/Tiger.md | 2 +- ...edDictWithAdditionalModelListProperties.md | 2 +- ...dDictWithAdditionalStringListProperties.md | 2 +- .../python-pydantic-v1-aiohttp/docs/User.md | 2 +- .../docs/WithNestedOneOf.md | 2 +- .../petstore_api/api/fake_api.py | 18 +- .../docs/AdditionalPropertiesAnyType.md | 2 +- .../docs/AdditionalPropertiesClass.md | 2 +- .../docs/AdditionalPropertiesObject.md | 2 +- ...AdditionalPropertiesWithDescriptionOnly.md | 2 +- .../docs/AllOfSuperModel.md | 2 +- .../docs/AllOfWithSingleRef.md | 2 +- .../python-pydantic-v1/docs/Animal.md | 2 +- .../python-pydantic-v1/docs/AnyOfColor.md | 2 +- .../python-pydantic-v1/docs/AnyOfPig.md | 2 +- .../python-pydantic-v1/docs/ApiResponse.md | 2 +- .../docs/ArrayOfArrayOfModel.md | 2 +- .../docs/ArrayOfArrayOfNumberOnly.md | 2 +- .../docs/ArrayOfNumberOnly.md | 2 +- .../python-pydantic-v1/docs/ArrayTest.md | 2 +- .../python-pydantic-v1/docs/BasquePig.md | 2 +- .../python-pydantic-v1/docs/Bathing.md | 2 +- .../python-pydantic-v1/docs/Capitalization.md | 2 +- .../petstore/python-pydantic-v1/docs/Cat.md | 2 +- .../python-pydantic-v1/docs/Category.md | 2 +- .../docs/CircularAllOfRef.md | 2 +- .../docs/CircularReferenceModel.md | 2 +- .../python-pydantic-v1/docs/ClassModel.md | 2 +- .../python-pydantic-v1/docs/Client.md | 2 +- .../petstore/python-pydantic-v1/docs/Color.md | 2 +- .../python-pydantic-v1/docs/Creature.md | 2 +- .../python-pydantic-v1/docs/CreatureInfo.md | 2 +- .../python-pydantic-v1/docs/DanishPig.md | 2 +- .../docs/DeprecatedObject.md | 2 +- .../docs/DiscriminatorAllOfSub.md | 2 +- .../docs/DiscriminatorAllOfSuper.md | 2 +- .../petstore/python-pydantic-v1/docs/Dog.md | 2 +- .../python-pydantic-v1/docs/DummyModel.md | 2 +- .../python-pydantic-v1/docs/EnumArrays.md | 2 +- .../python-pydantic-v1/docs/EnumTest.md | 2 +- .../python-pydantic-v1/docs/FakeApi.md | 7 +- .../python-pydantic-v1/docs/Feeding.md | 2 +- .../petstore/python-pydantic-v1/docs/Field.md | 2 +- .../petstore/python-pydantic-v1/docs/File.md | 2 +- .../docs/FileSchemaTestClass.md | 2 +- .../python-pydantic-v1/docs/FirstRef.md | 2 +- .../petstore/python-pydantic-v1/docs/Foo.md | 2 +- .../docs/FooGetDefaultResponse.md | 2 +- .../python-pydantic-v1/docs/FormatTest.md | 2 +- .../docs/HasOnlyReadOnly.md | 2 +- .../docs/HealthCheckResult.md | 2 +- .../docs/InnerDictWithProperty.md | 2 +- .../python-pydantic-v1/docs/InputAllOf.md | 2 +- .../python-pydantic-v1/docs/IntOrString.md | 2 +- .../python-pydantic-v1/docs/ListClass.md | 2 +- .../docs/MapOfArrayOfModel.md | 2 +- .../python-pydantic-v1/docs/MapTest.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../docs/Model200Response.md | 2 +- .../python-pydantic-v1/docs/ModelReturn.md | 2 +- .../petstore/python-pydantic-v1/docs/Name.md | 2 +- .../python-pydantic-v1/docs/NullableClass.md | 2 +- .../docs/NullableProperty.md | 2 +- .../python-pydantic-v1/docs/NumberOnly.md | 2 +- .../docs/ObjectToTestAdditionalProperties.md | 2 +- .../docs/ObjectWithDeprecatedFields.md | 2 +- .../docs/OneOfEnumString.md | 2 +- .../petstore/python-pydantic-v1/docs/Order.md | 2 +- .../python-pydantic-v1/docs/OuterComposite.md | 2 +- .../docs/OuterObjectWithEnumProperty.md | 2 +- .../python-pydantic-v1/docs/Parent.md | 2 +- .../docs/ParentWithOptionalDict.md | 2 +- .../petstore/python-pydantic-v1/docs/Pet.md | 2 +- .../petstore/python-pydantic-v1/docs/Pig.md | 2 +- .../python-pydantic-v1/docs/PoopCleaning.md | 2 +- .../python-pydantic-v1/docs/PropertyMap.md | 2 +- .../docs/PropertyNameCollision.md | 2 +- .../python-pydantic-v1/docs/ReadOnlyFirst.md | 2 +- .../docs/SecondCircularAllOfRef.md | 2 +- .../python-pydantic-v1/docs/SecondRef.md | 2 +- .../docs/SelfReferenceModel.md | 2 +- .../docs/SpecialModelName.md | 2 +- .../python-pydantic-v1/docs/SpecialName.md | 2 +- .../petstore/python-pydantic-v1/docs/Tag.md | 2 +- .../petstore/python-pydantic-v1/docs/Task.md | 2 +- .../python-pydantic-v1/docs/TaskActivity.md | 2 +- .../TestErrorResponsesWithModel400Response.md | 2 +- .../TestErrorResponsesWithModel404Response.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- ...ObjectForMultipartRequestsRequestMarker.md | 2 +- .../petstore/python-pydantic-v1/docs/Tiger.md | 2 +- ...edDictWithAdditionalModelListProperties.md | 2 +- ...dDictWithAdditionalStringListProperties.md | 2 +- .../petstore/python-pydantic-v1/docs/User.md | 2 +- .../docs/WithNestedOneOf.md | 2 +- .../petstore_api/api/fake_api.py | 22 +- .../docs/AdditionalPropertiesAnyType.md | 2 +- .../python/docs/AdditionalPropertiesClass.md | 2 +- .../python/docs/AdditionalPropertiesObject.md | 2 +- ...AdditionalPropertiesWithDescriptionOnly.md | 2 +- .../petstore/python/docs/AllOfSuperModel.md | 2 +- .../python/docs/AllOfWithSingleRef.md | 2 +- .../client/petstore/python/docs/Animal.md | 2 +- .../client/petstore/python/docs/AnyOfColor.md | 2 +- .../client/petstore/python/docs/AnyOfPig.md | 2 +- .../python/docs/ArrayOfArrayOfModel.md | 2 +- .../python/docs/ArrayOfArrayOfNumberOnly.md | 2 +- .../petstore/python/docs/ArrayOfNumberOnly.md | 2 +- .../client/petstore/python/docs/ArrayTest.md | 2 +- .../client/petstore/python/docs/BasquePig.md | 2 +- .../client/petstore/python/docs/Bathing.md | 2 +- .../petstore/python/docs/Capitalization.md | 2 +- .../client/petstore/python/docs/Cat.md | 2 +- .../client/petstore/python/docs/Category.md | 2 +- .../petstore/python/docs/CircularAllOfRef.md | 2 +- .../python/docs/CircularReferenceModel.md | 2 +- .../client/petstore/python/docs/ClassModel.md | 2 +- .../client/petstore/python/docs/Client.md | 2 +- .../client/petstore/python/docs/Color.md | 2 +- .../client/petstore/python/docs/Creature.md | 2 +- .../petstore/python/docs/CreatureInfo.md | 2 +- .../client/petstore/python/docs/DanishPig.md | 2 +- .../petstore/python/docs/DeprecatedObject.md | 2 +- .../python/docs/DiscriminatorAllOfSub.md | 2 +- .../python/docs/DiscriminatorAllOfSuper.md | 2 +- .../client/petstore/python/docs/Dog.md | 2 +- .../client/petstore/python/docs/DummyModel.md | 2 +- .../client/petstore/python/docs/EnumArrays.md | 2 +- .../petstore/python/docs/EnumSerialization.md | 11 + .../client/petstore/python/docs/EnumTest.md | 2 +- .../client/petstore/python/docs/FakeApi.md | 7 +- .../client/petstore/python/docs/Feeding.md | 2 +- .../client/petstore/python/docs/File.md | 2 +- .../python/docs/FileSchemaTestClass.md | 2 +- .../client/petstore/python/docs/FirstRef.md | 2 +- .../client/petstore/python/docs/Foo.md | 2 +- .../python/docs/FooGetDefaultResponse.md | 2 +- .../client/petstore/python/docs/FormatTest.md | 2 +- .../petstore/python/docs/HasOnlyReadOnly.md | 2 +- .../petstore/python/docs/HealthCheckResult.md | 2 +- .../python/docs/InnerDictWithProperty.md | 2 +- .../client/petstore/python/docs/InputAllOf.md | 2 +- .../petstore/python/docs/IntOrString.md | 2 +- .../client/petstore/python/docs/ListClass.md | 2 +- .../petstore/python/docs/MapOfArrayOfModel.md | 2 +- .../client/petstore/python/docs/MapTest.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../petstore/python/docs/Model200Response.md | 2 +- .../petstore/python/docs/ModelApiResponse.md | 2 +- .../client/petstore/python/docs/ModelField.md | 2 +- .../petstore/python/docs/ModelReturn.md | 2 +- .../client/petstore/python/docs/Name.md | 2 +- .../petstore/python/docs/NullableClass.md | 2 +- .../petstore/python/docs/NullableProperty.md | 2 +- .../client/petstore/python/docs/NumberOnly.md | 2 +- .../docs/ObjectToTestAdditionalProperties.md | 2 +- .../python/docs/ObjectWithDeprecatedFields.md | 2 +- .../petstore/python/docs/OneOfEnumString.md | 2 +- .../client/petstore/python/docs/Order.md | 2 +- .../petstore/python/docs/OuterComposite.md | 2 +- .../docs/OuterObjectWithEnumProperty.md | 2 +- .../client/petstore/python/docs/Parent.md | 2 +- .../python/docs/ParentWithOptionalDict.md | 2 +- .../client/petstore/python/docs/Pet.md | 2 +- .../client/petstore/python/docs/Pig.md | 2 +- .../petstore/python/docs/PoopCleaning.md | 2 +- .../petstore/python/docs/PropertyMap.md | 2 +- .../python/docs/PropertyNameCollision.md | 2 +- .../petstore/python/docs/ReadOnlyFirst.md | 2 +- .../python/docs/SecondCircularAllOfRef.md | 2 +- .../client/petstore/python/docs/SecondRef.md | 2 +- .../python/docs/SelfReferenceModel.md | 2 +- .../petstore/python/docs/SpecialModelName.md | 2 +- .../petstore/python/docs/SpecialName.md | 2 +- .../client/petstore/python/docs/Tag.md | 2 +- .../client/petstore/python/docs/Task.md | 2 +- .../petstore/python/docs/TaskActivity.md | 2 +- .../TestErrorResponsesWithModel400Response.md | 2 +- .../TestErrorResponsesWithModel404Response.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- ...ObjectForMultipartRequestsRequestMarker.md | 2 +- .../client/petstore/python/docs/Tiger.md | 2 +- ...edDictWithAdditionalModelListProperties.md | 2 +- ...dDictWithAdditionalStringListProperties.md | 2 +- .../client/petstore/python/docs/User.md | 2 +- .../petstore/python/docs/WithNestedOneOf.md | 2 +- .../python/petstore_api/api/fake_api.py | 19 + .../python/petstore_api/api_client.py | 2 + .../petstore_api/models/enum_serialization.py | 37 + .../python/test/test_enum_serialization.py | 33 + .../petstore/python/tests/test_api_client.py | 34 +- .../petstore/python/tests/test_fake_api.py | 25 +- .../java/org/openapitools/model/Category.java | 8 + .../openapitools/model/ModelApiResponse.java | 9 + .../java/org/openapitools/model/Order.java | 12 + .../main/java/org/openapitools/model/Pet.java | 12 + .../main/java/org/openapitools/model/Tag.java | 8 + .../java/org/openapitools/model/User.java | 14 + .../schema/postman-collection/postman.json | 2 +- .../python/test/test_endpoints.py | 7 + .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 8 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Controller/Controller.php | 6 +- .../Controller/PetController.php | 140 +- .../Controller/StoreController.php | 70 +- .../Controller/UserController.php | 132 +- .../Service/JmsSerializer.php | 36 +- .../Tests/Controller/ControllerTest.php | 2 +- .../SymfonyBundle-php/composer.json | 16 +- .../petstore/python-fastapi/requirements.txt | 4 +- .../multipart-v3/.openapi-generator/VERSION | 2 +- .../rust-axum/output/multipart-v3/Cargo.toml | 4 +- .../rust-axum/output/multipart-v3/README.md | 2 +- .../rust-axum/output/multipart-v3/src/lib.rs | 6 +- .../output/multipart-v3/src/server/mod.rs | 3 - .../openapi-v3/.openapi-generator/VERSION | 2 +- .../rust-axum/output/openapi-v3/Cargo.toml | 4 +- .../rust-axum/output/openapi-v3/README.md | 2 +- .../rust-axum/output/openapi-v3/src/lib.rs | 6 +- .../output/openapi-v3/src/server/mod.rs | 46 +- .../output/ops-v3/.openapi-generator/VERSION | 2 +- .../rust-axum/output/ops-v3/Cargo.toml | 4 +- .../rust-axum/output/ops-v3/README.md | 2 +- .../rust-axum/output/ops-v3/src/lib.rs | 6 +- .../rust-axum/output/ops-v3/src/server/mod.rs | 37 - .../.openapi-generator/VERSION | 2 +- .../Cargo.toml | 4 +- .../README.md | 2 +- .../src/lib.rs | 6 +- .../src/models.rs | 6 +- .../src/server/mod.rs | 71 +- .../petstore/.openapi-generator/VERSION | 2 +- .../rust-axum/output/petstore/Cargo.toml | 4 +- .../rust-axum/output/petstore/README.md | 2 +- .../rust-axum/output/petstore/src/lib.rs | 6 +- .../rust-axum/output/petstore/src/models.rs | 8 +- .../output/petstore/src/server/mod.rs | 42 +- .../.openapi-generator/VERSION | 2 +- .../output/ping-bearer-auth/Cargo.toml | 4 +- .../output/ping-bearer-auth/README.md | 2 +- .../output/ping-bearer-auth/src/lib.rs | 6 +- .../output/ping-bearer-auth/src/server/mod.rs | 1 - .../rust-axum-test/.openapi-generator/VERSION | 2 +- .../output/rust-axum-test/Cargo.toml | 4 +- .../rust-axum/output/rust-axum-test/README.md | 2 +- .../output/rust-axum-test/src/lib.rs | 6 +- .../output/rust-axum-test/src/server/mod.rs | 11 +- .../.github/workflows/bulidAndPublish.yml | 41 + samples/server/petstore/scala-cask/.gitignore | 25 + .../scala-cask/.openapi-generator-ignore | 23 + .../scala-cask/.openapi-generator/VERSION | 1 + .../server/petstore/scala-cask/.scalafmt.conf | 4 + samples/server/petstore/scala-cask/README.md | 96 + samples/server/petstore/scala-cask/build.sbt | 29 + samples/server/petstore/scala-cask/build.sc | 43 + .../petstore/scala-cask/example/Dockerfile | 13 + .../petstore/scala-cask/example/Server.scala | 61 + .../scala-cask/project/build.properties | 1 + .../petstore/scala-cask/project/plugins.sbt | 3 + .../src/main/resources/openapi.json | 1032 +++++++ .../main/scala/sample/cask/AppRoutes.scala | 52 + .../src/main/scala/sample/cask/BaseApp.scala | 59 + .../main/scala/sample/cask/ExampleApp.scala | 31 + .../scala/sample/cask/api/OpenApiRoutes.scala | 128 + .../scala/sample/cask/api/PetRoutes.scala | 218 ++ .../scala/sample/cask/api/PetService.scala | 84 + .../scala/sample/cask/api/StoreRoutes.scala | 109 + .../scala/sample/cask/api/StoreService.scala | 58 + .../scala/sample/cask/api/UserRoutes.scala | 197 ++ .../scala/sample/cask/api/UserService.scala | 83 + .../main/scala/sample/cask/api/package.scala | 167 ++ .../scala/sample/cask/model/ApiResponse.scala | 55 + .../sample/cask/model/ApiResponseData.scala | 171 ++ .../scala/sample/cask/model/Category.scala | 51 + .../sample/cask/model/CategoryData.scala | 153 + .../main/scala/sample/cask/model/Order.scala | 76 + .../scala/sample/cask/model/OrderData.scala | 245 ++ .../main/scala/sample/cask/model/Pet.scala | 77 + .../scala/sample/cask/model/PetData.scala | 262 ++ .../main/scala/sample/cask/model/Tag.scala | 51 + .../scala/sample/cask/model/TagData.scala | 147 + .../main/scala/sample/cask/model/User.scala | 76 + .../scala/sample/cask/model/UserData.scala | 292 ++ .../scala/sample/cask/model/package.scala | 65 + .../src/main/scala/sample/cask/package.scala | 24 + .../sample/cask/model/ApiResponseTest.scala | 33 + .../sample/cask/model/CategoryTest.scala | 33 + .../scala/sample/cask/model/OrderTest.scala | 34 + .../scala/sample/cask/model/PetTest.scala | 35 + .../scala/sample/cask/model/TagTest.scala | 33 + .../scala/sample/cask/model/UserTest.scala | 33 + .../model/AdditionalPropertiesAnyType.java | 7 + .../model/AdditionalPropertiesArray.java | 7 + .../model/AdditionalPropertiesBoolean.java | 7 + .../model/AdditionalPropertiesClass.java | 17 + .../model/AdditionalPropertiesInteger.java | 7 + .../model/AdditionalPropertiesNumber.java | 7 + .../model/AdditionalPropertiesObject.java | 7 + .../model/AdditionalPropertiesString.java | 7 + .../java/org/openapitools/model/Animal.java | 8 + .../model/ArrayOfArrayOfNumberOnly.java | 7 + .../openapitools/model/ArrayOfNumberOnly.java | 7 + .../org/openapitools/model/ArrayTest.java | 9 + .../java/org/openapitools/model/BigCat.java | 8 + .../openapitools/model/Capitalization.java | 12 + .../main/java/org/openapitools/model/Cat.java | 8 + .../java/org/openapitools/model/Category.java | 8 + .../openapitools/model/ChildWithNullable.java | 8 + .../org/openapitools/model/ClassModel.java | 7 + .../java/org/openapitools/model/Client.java | 7 + .../model/ContainerDefaultValue.java | 10 + .../main/java/org/openapitools/model/Dog.java | 8 + .../org/openapitools/model/EnumArrays.java | 8 + .../java/org/openapitools/model/EnumTest.java | 11 + .../java/org/openapitools/model/File.java | 7 + .../model/FileSchemaTestClass.java | 8 + .../org/openapitools/model/FormatTest.java | 20 + .../openapitools/model/HasOnlyReadOnly.java | 8 + .../java/org/openapitools/model/MapTest.java | 10 + ...ropertiesAndAdditionalPropertiesClass.java | 9 + .../openapitools/model/Model200Response.java | 8 + .../openapitools/model/ModelApiResponse.java | 9 + .../org/openapitools/model/ModelList.java | 7 + .../org/openapitools/model/ModelReturn.java | 7 + .../java/org/openapitools/model/Name.java | 10 + .../model/NullableMapProperty.java | 7 + .../org/openapitools/model/NumberOnly.java | 7 + .../java/org/openapitools/model/Order.java | 12 + .../openapitools/model/OuterComposite.java | 9 + .../model/ParentWithNullable.java | 8 + .../main/java/org/openapitools/model/Pet.java | 12 + .../org/openapitools/model/ReadOnlyFirst.java | 8 + ...ResponseObjectWithDifferentFieldNames.java | 10 + .../openapitools/model/SpecialModelName.java | 7 + .../main/java/org/openapitools/model/Tag.java | 8 + .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/User.java | 14 + .../java/org/openapitools/model/XmlItem.java | 35 + 1267 files changed, 16968 insertions(+), 8906 deletions(-) rename bin/configs/{unmaintained => }/html2.yaml (100%) create mode 100644 bin/configs/scala-cask-petstore-new.yaml create mode 100644 docs/generators/scala-cask.md create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/.scalafmt.conf.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/Dockerfile.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/README.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/apiPackage.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/apiRoutes.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/apiRoutesQueryParamsTyped.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/apiService.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/appPackage.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/appRoutes.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/baseApp.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/build.sbt.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/build.sc.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/bulidAndPublish.yml.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/example.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/exampleApp.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/gitignore.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/licenseInfo.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/model.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/modelData.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/modelPackage.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/modelTest.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/openapiRoute.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/parseHttpParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/pathExtractor.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/pathExtractorParams.mustache create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/project/build.properties create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/project/plugins.sbt create mode 100644 modules/openapi-generator/src/main/resources/scala-cask/queryParams.mustache create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/AllVarsTest.java create mode 100644 modules/openapi-generator/src/test/resources/3_0/go/allof_multiple_ref_and_discriminator.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_0/java/all_args_constructor.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_1/simplifyOneOfAnyOf_test.yaml delete mode 100644 samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs delete mode 100644 samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs delete mode 100644 samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs delete mode 100644 samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs delete mode 100644 samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs delete mode 100644 samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs delete mode 100644 samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs delete mode 100644 samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs delete mode 100644 samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs create mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/docs/CommonApi.md delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/docs/PetApi.md delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/docs/StoreApi.md delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/docs/UserApi.md create mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/CommonApi.java delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/PetApi.java delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/UserApi.java create mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/CommonApiTest.java delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/PetApiTest.java delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java delete mode 100644 samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/UserApiTest.java create mode 100644 samples/openapi3/client/petstore/python/docs/EnumSerialization.md create mode 100644 samples/openapi3/client/petstore/python/petstore_api/models/enum_serialization.py create mode 100644 samples/openapi3/client/petstore/python/test/test_enum_serialization.py create mode 100644 samples/server/petstore/scala-cask/.github/workflows/bulidAndPublish.yml create mode 100644 samples/server/petstore/scala-cask/.gitignore create mode 100644 samples/server/petstore/scala-cask/.openapi-generator-ignore create mode 100644 samples/server/petstore/scala-cask/.openapi-generator/VERSION create mode 100644 samples/server/petstore/scala-cask/.scalafmt.conf create mode 100644 samples/server/petstore/scala-cask/README.md create mode 100644 samples/server/petstore/scala-cask/build.sbt create mode 100644 samples/server/petstore/scala-cask/build.sc create mode 100644 samples/server/petstore/scala-cask/example/Dockerfile create mode 100644 samples/server/petstore/scala-cask/example/Server.scala create mode 100644 samples/server/petstore/scala-cask/project/build.properties create mode 100644 samples/server/petstore/scala-cask/project/plugins.sbt create mode 100644 samples/server/petstore/scala-cask/src/main/resources/openapi.json create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/AppRoutes.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/BaseApp.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/ExampleApp.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/OpenApiRoutes.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetRoutes.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetService.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreRoutes.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreService.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserRoutes.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserService.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/package.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponse.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponseData.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Category.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/CategoryData.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Order.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/OrderData.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Pet.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/PetData.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Tag.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/TagData.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/User.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/UserData.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/package.scala create mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/package.scala create mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/ApiResponseTest.scala create mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/CategoryTest.scala create mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/OrderTest.scala create mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/PetTest.scala create mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/TagTest.scala create mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/UserTest.scala diff --git a/.github/workflows/openapi-generator.yaml b/.github/workflows/openapi-generator.yaml index 1e9fb800ba5f..6070ca97d95b 100644 --- a/.github/workflows/openapi-generator.yaml +++ b/.github/workflows/openapi-generator.yaml @@ -140,8 +140,23 @@ jobs: with: name: openapi-generator-cli.jar path: modules/openapi-generator-cli/target + - name: Delete samples that are entirely generated + run: | + rm -rf samples/client/petstore/csharp/generichost/net8/AllOf + rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf + rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare + rm -rf samples/client/petstore/csharp/generichost/net8/FormModels + rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes + rm -rf samples/client/petstore/csharp/generichost/net8/OneOf + rm -rf samples/client/petstore/csharp/generichost/net8/Petstore + rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration + rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate + rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore - name: Generate samples - run: bash bin/generate-samples.sh + run: | + bash bin/generate-samples.sh + # when a sample is deleted, you have to generate it twice for all files to get created + bash bin/generate-samples.sh - name: Verify git status run: | if [[ "$(git status --porcelain)" != "" ]]; then diff --git a/.github/workflows/samples-scala.yaml b/.github/workflows/samples-scala.yaml index 953b35355c79..eb1a3ac43cff 100644 --- a/.github/workflows/samples-scala.yaml +++ b/.github/workflows/samples-scala.yaml @@ -32,6 +32,7 @@ jobs: - samples/server/petstore/scalatra - samples/server/petstore/scala-finch # cannot be tested with jdk11 - samples/server/petstore/scala-http4s-server + - samples/server/petstore/scala-cask steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 diff --git a/README.md b/README.md index a011deb81795..89b69acd3651 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | | -------------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 17.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** | -| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) | +| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) | | **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** | | **Configuration files** | [**Apache2**](https://httpd.apache.org/) | | **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** | @@ -1102,6 +1102,7 @@ Here is a list of template creators: * Ruby on Rails 5: @zlx * Rust (rust-server): @metaswitch * Scala Akka: @Bouillie + * Scala Cask: @aaronp * Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert) * Scala Lagom: @gmkumar2005 * Scala Play: @adigerber diff --git a/bin/configs/unmaintained/html2.yaml b/bin/configs/html2.yaml similarity index 100% rename from bin/configs/unmaintained/html2.yaml rename to bin/configs/html2.yaml diff --git a/bin/configs/java-microprofile-rest-client-3.0-jackson-with-xml.yaml b/bin/configs/java-microprofile-rest-client-3.0-jackson-with-xml.yaml index af31232ee24b..8dc08e4a4bb2 100644 --- a/bin/configs/java-microprofile-rest-client-3.0-jackson-with-xml.yaml +++ b/bin/configs/java-microprofile-rest-client-3.0-jackson-with-xml.yaml @@ -8,4 +8,5 @@ additionalProperties: serializationLibrary: jackson artifactId: microprofile-rest-client-3-jackson-with-xml configKey: petstore - microprofileRestClientVersion: "3.0" \ No newline at end of file + microprofileRestClientVersion: "3.0" + hideGenerationTimestamp: true diff --git a/bin/configs/java-microprofile-rest-client-3.0-jackson.yaml b/bin/configs/java-microprofile-rest-client-3.0-jackson.yaml index 92d945a3cb93..06d0814d2f47 100644 --- a/bin/configs/java-microprofile-rest-client-3.0-jackson.yaml +++ b/bin/configs/java-microprofile-rest-client-3.0-jackson.yaml @@ -7,4 +7,5 @@ additionalProperties: serializationLibrary: jackson artifactId: microprofile-rest-client-3-jackson configKey: petstore - microprofileRestClientVersion: "3.0" \ No newline at end of file + microprofileRestClientVersion: "3.0" + hideGenerationTimestamp: true diff --git a/bin/configs/java-okhttp-gson-swagger1.yaml b/bin/configs/java-okhttp-gson-swagger1.yaml index c8fea398d4ce..df09bc1f9df6 100644 --- a/bin/configs/java-okhttp-gson-swagger1.yaml +++ b/bin/configs/java-okhttp-gson-swagger1.yaml @@ -9,4 +9,5 @@ additionalProperties: useOneOfDiscriminatorLookup: "true" disallowAdditionalPropertiesIfNotPresent: false annotationLibrary: "swagger1" - +openapiNormalizer: + SET_TAGS_FOR_ALL_OPERATIONS: common diff --git a/bin/configs/java-resttemplate-jakarta.yaml b/bin/configs/java-resttemplate-jakarta.yaml index 098e0d96e763..4caa56047764 100644 --- a/bin/configs/java-resttemplate-jakarta.yaml +++ b/bin/configs/java-resttemplate-jakarta.yaml @@ -8,3 +8,4 @@ additionalProperties: hideGenerationTimestamp: "true" java8: true useJakartaEe: true + generatedConstructorWithAllArgs: true diff --git a/bin/configs/java-resttemplate.yaml b/bin/configs/java-resttemplate.yaml index e71609cbcf36..d0a43ad8cdf6 100644 --- a/bin/configs/java-resttemplate.yaml +++ b/bin/configs/java-resttemplate.yaml @@ -8,3 +8,4 @@ additionalProperties: hideGenerationTimestamp: "true" java8: true containerDefaultToNull: true + generatedConstructorWithAllArgs: true diff --git a/bin/configs/kotlin-model-prefix-type-mapping-echo-api.yaml b/bin/configs/kotlin-model-prefix-type-mapping-echo-api.yaml index b790566ee439..e765f0def5b5 100644 --- a/bin/configs/kotlin-model-prefix-type-mapping-echo-api.yaml +++ b/bin/configs/kotlin-model-prefix-type-mapping-echo-api.yaml @@ -12,4 +12,4 @@ additionalProperties: enumPropertyNaming: UPPERCASE serializationLibrary: gson openapiNormalizer: - SIMPLIFY_ONEOF_ANYOF=false + SIMPLIFY_ONEOF_ANYOF: false diff --git a/bin/configs/kotlin-model-prefix-type-mapping.yaml b/bin/configs/kotlin-model-prefix-type-mapping.yaml index 993e0f197cf0..841b5af060d0 100644 --- a/bin/configs/kotlin-model-prefix-type-mapping.yaml +++ b/bin/configs/kotlin-model-prefix-type-mapping.yaml @@ -12,4 +12,4 @@ additionalProperties: enumPropertyNaming: UPPERCASE serializationLibrary: gson openapiNormalizer: - SIMPLIFY_ONEOF_ANYOF=false + SIMPLIFY_ONEOF_ANYOF: false diff --git a/bin/configs/scala-cask-petstore-new.yaml b/bin/configs/scala-cask-petstore-new.yaml new file mode 100644 index 000000000000..bb37d3587e7f --- /dev/null +++ b/bin/configs/scala-cask-petstore-new.yaml @@ -0,0 +1,13 @@ +generatorName: scala-cask +outputDir: samples/server/petstore/scala-cask +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-cask +additionalProperties: + hideGenerationTimestamp: "true" + artifactId: scala-cask-petstore + groupId: "cask.groupId" + package: "sample.cask" + modelPackage: "sample.cask.model" + apiPackage: "sample.cask.api" + gitRepoId: "sample-cask-repo" + gitUserId: "sample-cask-user" \ No newline at end of file diff --git a/bin/configs/spring-boot-3.yaml b/bin/configs/spring-boot-3.yaml index 5dea2cbda5ee..091d9b767348 100644 --- a/bin/configs/spring-boot-3.yaml +++ b/bin/configs/spring-boot-3.yaml @@ -11,3 +11,4 @@ additionalProperties: useBeanValidation: true withXml: true hideGenerationTimestamp: "true" + generatedConstructorWithAllArgs: true diff --git a/bin/configs/spring-boot-delegate.yaml b/bin/configs/spring-boot-delegate.yaml index 56199a182d15..21f612a35a85 100644 --- a/bin/configs/spring-boot-delegate.yaml +++ b/bin/configs/spring-boot-delegate.yaml @@ -8,3 +8,4 @@ additionalProperties: hideGenerationTimestamp: "true" java8: true delegatePattern: "true" + generatedConstructorWithAllArgs: true diff --git a/bin/configs/spring-boot-lombok-data.yaml b/bin/configs/spring-boot-lombok-data.yaml index ac48f4332143..3d4110fc1fe2 100644 --- a/bin/configs/spring-boot-lombok-data.yaml +++ b/bin/configs/spring-boot-lombok-data.yaml @@ -7,3 +7,4 @@ additionalProperties: artifactId: springboot-lombok-data hideGenerationTimestamp: "true" additionalModelTypeAnnotations: "@lombok.Data;@lombok.Builder;@lombok.NoArgsConstructor;@lombok.AllArgsConstructor" + generatedConstructorWithAllArgs: true diff --git a/docs/customization.md b/docs/customization.md index 12bc5b0b88ee..28cb619f1ebf 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -304,6 +304,8 @@ You can use also `config.yml` with following equivalent example: apiPackage: "petstore" ``` +Another example of config file can be found in [modules/openapi-generator/src/test/resources/sampleConfig.json](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/sampleConfig.json) + Supported config options can be different per language. Running `config-help -g {lang}` will show available options. **These options are applied via configuration file (e.g. config.json or config.yml) or by passing them with `-p {optionName}={optionValue}`**. (If `-p {optionName}` does not work, please open a [ticket](https://github.com/openapitools/openapi-generator/issues/new) and we'll look into it) diff --git a/docs/generators.md b/docs/generators.md index ca6e426f9b98..749f43f15dbf 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -134,6 +134,7 @@ The following generators are available: * [rust-axum (beta)](generators/rust-axum.md) * [rust-server](generators/rust-server.md) * [scala-akka-http-server (beta)](generators/scala-akka-http-server.md) +* [scala-cask](generators/scala-cask.md) * [scala-finch](generators/scala-finch.md) * [scala-http4s-server](generators/scala-http4s-server.md) * [scala-lagom-server](generators/scala-lagom-server.md) diff --git a/docs/generators/scala-cask.md b/docs/generators/scala-cask.md new file mode 100644 index 000000000000..d187ba569394 --- /dev/null +++ b/docs/generators/scala-cask.md @@ -0,0 +1,261 @@ +--- +title: Documentation for the scala-cask Generator +--- + +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | scala-cask | pass this to the generate command after -g | +| generator stability | STABLE | | +| generator type | SERVER | | +| generator language | Scala | | +| generator default templating engine | mustache | | +| helpTxt | Generates a scala-cask server. | | + +## CONFIG OPTIONS +These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|apiPackage|package for generated api classes| |null| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| +|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|gitRepoId|Git repo ID, e.g. openapi-generator.| |null| +|gitUserId|Git user ID, e.g. openapitools.| |null| +|groupId|groupId in generated pom.xml| |null| +|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| +|modelPackage|package for generated models| |null| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|packageName|packageDescription| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Array|java.util.List| +|ArrayList|java.util.ArrayList| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Seq|scala.collection.immutable.Seq| +|Set|scala.collection.immutable.Set| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|set|Set| + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension +|MockServer|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Uuid|✗| +|Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 +|SignatureAuth|✗|OAS3 +|AWSV4Signature|✗|ToolingExtension + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java index 0f9ec680e1c6..6ce6a8ffb301 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java @@ -515,11 +515,11 @@ public void execute() { applyModelNameMappingsKvpList(modelNameMappings, configurator); applyEnumNameMappingsKvpList(enumNameMappings, configurator); applyOperationIdNameMappingsKvpList(operationIdNameMappings, configurator); - applyOpenAPINormalizerKvpList(openapiNormalizer, configurator); + applyOpenapiNormalizerKvpList(openapiNormalizer, configurator); applyTypeMappingsKvpList(typeMappings, configurator); applyAdditionalPropertiesKvpList(additionalProperties, configurator); applyLanguageSpecificPrimitivesCsvList(languageSpecificPrimitives, configurator); - applyOpenAPIGeneratorIgnoreListCsvList(openapiGeneratorIgnoreList, configurator); + applyOpenapiGeneratorIgnoreListCsvList(openapiGeneratorIgnoreList, configurator); applyReservedWordsMappingsKvpList(reservedWordsMappings, configurator); applyServerVariablesKvpList(serverVariableOverrides, configurator); diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java index 1f7e9e824a4c..30106d484765 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java @@ -321,7 +321,7 @@ public Map getOperationIdNameMappings() { * * @return a map of rules */ - public Map getOpenAPINormalizer() { + public Map getOpenapiNormalizer() { return openapiNormalizer; } @@ -346,7 +346,7 @@ public Set getLanguageSpecificPrimitives() { * * @return the openapi generator ignore list */ - public Set getOpenAPIGeneratorIgnoreList() { + public Set getOpenapiGeneratorIgnoreList() { return openapiGeneratorIgnoreList; } @@ -614,14 +614,14 @@ public static Builder newBuilder(GeneratorSettings copy) { if (copy.getOperationIdNameMappings() != null) { builder.operationIdNameMappings.putAll(copy.getOperationIdNameMappings()); } - if (copy.getOpenAPINormalizer() != null) { - builder.openapiNormalizer.putAll(copy.getOpenAPINormalizer()); + if (copy.getOpenapiNormalizer() != null) { + builder.openapiNormalizer.putAll(copy.getOpenapiNormalizer()); } if (copy.getLanguageSpecificPrimitives() != null) { builder.languageSpecificPrimitives.addAll(copy.getLanguageSpecificPrimitives()); } - if (copy.getOpenAPIGeneratorIgnoreList() != null) { - builder.openapiGeneratorIgnoreList.addAll(copy.getOpenAPIGeneratorIgnoreList()); + if (copy.getOpenapiGeneratorIgnoreList() != null) { + builder.openapiGeneratorIgnoreList.addAll(copy.getOpenapiGeneratorIgnoreList()); } if (copy.getReservedWordsMappings() != null) { builder.reservedWordsMappings.putAll(copy.getReservedWordsMappings()); @@ -1152,7 +1152,7 @@ public Builder withOperationIdNameMapping(String key, String value) { * @param openapiNormalizer the {@code openapiNormalizer} to set * @return a reference to this Builder */ - public Builder withOpenAPINormalizer(Map openapiNormalizer) { + public Builder withOpenapiNormalizer(Map openapiNormalizer) { this.openapiNormalizer = openapiNormalizer; return this; } @@ -1164,7 +1164,7 @@ public Builder withOpenAPINormalizer(Map openapiNormalizer) { * @param value The value of the OpenAPI normalizer rule * @return a reference to this Builder */ - public Builder withOpenAPINormalizer(String key, String value) { + public Builder withOpenapiNormalizer(String key, String value) { if (this.openapiNormalizer == null) { this.openapiNormalizer = new HashMap<>(); } @@ -1203,7 +1203,7 @@ public Builder withLanguageSpecificPrimitive(String value) { * @param openapiGeneratorIgnoreList the {@code openapiGeneratorIgnoreList} to set * @return a reference to this Builder */ - public Builder withOpenAPIGeneratorIgnoreList(Set openapiGeneratorIgnoreList) { + public Builder withOpenapiGeneratorIgnoreList(Set openapiGeneratorIgnoreList) { this.openapiGeneratorIgnoreList = openapiGeneratorIgnoreList; return this; } @@ -1214,7 +1214,7 @@ public Builder withOpenAPIGeneratorIgnoreList(Set openapiGeneratorIgnore * @param value The value of entry to set * @return a reference to this Builder */ - public Builder withOpenAPIGeneratorIgnoreList(String value) { + public Builder withOpenapiGeneratorIgnoreList(String value) { if (this.openapiGeneratorIgnoreList == null) { this.openapiGeneratorIgnoreList = new HashSet<>(); } @@ -1390,9 +1390,9 @@ public boolean equals(Object o) { Objects.equals(getModelNameMappings(), that.getModelNameMappings()) && Objects.equals(getEnumNameMappings(), that.getEnumNameMappings()) && Objects.equals(getOperationIdNameMappings(), that.getOperationIdNameMappings()) && - Objects.equals(getOpenAPINormalizer(), that.getOpenAPINormalizer()) && + Objects.equals(getOpenapiNormalizer(), that.getOpenapiNormalizer()) && Objects.equals(getLanguageSpecificPrimitives(), that.getLanguageSpecificPrimitives()) && - Objects.equals(getOpenAPIGeneratorIgnoreList(), that.getOpenAPIGeneratorIgnoreList()) && + Objects.equals(getOpenapiGeneratorIgnoreList(), that.getOpenapiGeneratorIgnoreList()) && Objects.equals(getReservedWordsMappings(), that.getReservedWordsMappings()) && Objects.equals(getGitHost(), that.getGitHost()) && Objects.equals(getGitUserId(), that.getGitUserId()) && @@ -1428,9 +1428,9 @@ public int hashCode() { getModelNameMappings(), getEnumNameMappings(), getOperationIdNameMappings(), - getOpenAPINormalizer(), + getOpenapiNormalizer(), getLanguageSpecificPrimitives(), - getOpenAPIGeneratorIgnoreList(), + getOpenapiGeneratorIgnoreList(), getReservedWordsMappings(), getGitHost(), getGitUserId(), diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index 7e0217a0501c..d9473159a87e 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -887,7 +887,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac if (openapiNormalizer.isPresent) { openapiNormalizer.get().forEach { entry -> - configurator.addOpenAPINormalizer(entry.key, entry.value) + configurator.addOpenapiNormalizer(entry.key, entry.value) } } @@ -917,7 +917,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac if (openapiGeneratorIgnoreList.isPresent) { openapiGeneratorIgnoreList.get().forEach { - configurator.addOpenAPIGeneratorIgnoreList(it) + configurator.addOpenapiGeneratorIgnoreList(it) } } diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 3b5301ee51ca..6c3b717189be 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -829,7 +829,7 @@ public void execute() throws MojoExecutionException { // Retained for backwards-compatibility with configOptions -> openapi-normalizer if (openapiNormalizer == null && configOptions.containsKey("openapi-normalizer")) { - applyOpenAPINormalizerKvp(configOptions.get("openapi-normalizer").toString(), + applyOpenapiNormalizerKvp(configOptions.get("openapi-normalizer").toString(), configurator); } @@ -846,7 +846,7 @@ public void execute() throws MojoExecutionException { // Retained for backwards-compatibility with configOptions -> openapi-generator-ignore-list if (openapiGeneratorIgnoreList == null && configOptions.containsKey("openapi-generator-ignore-list")) { - applyOpenAPIGeneratorIgnoreListCsv(configOptions + applyOpenapiGeneratorIgnoreListCsv(configOptions .get("openapi-generator-ignore-list").toString(), configurator); } @@ -919,7 +919,7 @@ public void execute() throws MojoExecutionException { // Apply OpenAPI normalizer rules if (openapiNormalizer != null && (configOptions == null || !configOptions.containsKey("openapi-normalizer"))) { - applyOpenAPINormalizerKvpList(openapiNormalizer, configurator); + applyOpenapiNormalizerKvpList(openapiNormalizer, configurator); } // Apply Type Mappings @@ -936,7 +936,7 @@ public void execute() throws MojoExecutionException { // Apply Language Specific Primitives if (openapiGeneratorIgnoreList != null && (configOptions == null || !configOptions.containsKey("openapi-generator-ignore-list"))) { - applyOpenAPIGeneratorIgnoreListCsvList(openapiGeneratorIgnoreList, configurator); + applyOpenapiGeneratorIgnoreListCsvList(openapiGeneratorIgnoreList, configurator); } // Apply Additional Properties diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 1285c00678d2..1c25a69f5dd3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -358,8 +358,8 @@ public interface CodegenConfig { boolean getAddSuffixToDuplicateOperationNicknames(); - boolean getUseOpenAPINormalizer(); + boolean getUseOpenapiNormalizer(); - Set getOpenAPIGeneratorIgnoreList(); + Set getOpenapiGeneratorIgnoreList(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 7830566264b1..77b8134762fe 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -52,7 +52,6 @@ import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.examples.ExampleGenerator; import org.openapitools.codegen.languages.PhpNextgenClientCodegen; -import org.openapitools.codegen.languages.RustAxumServerCodegen; import org.openapitools.codegen.languages.RustServerCodegen; import org.openapitools.codegen.meta.FeatureSet; import org.openapitools.codegen.meta.GeneratorMetadata; @@ -707,7 +706,7 @@ public Map updateAllModels(Map objs) { * Removes importToRemove from the imports of objs, if present. * This is useful to remove imports that are already present in operations-related template files, to avoid importing the same thing twice. * - * @param objs imports will be removed from this objs' imports collection + * @param objs imports will be removed from this objs' imports collection * @param importToRemove the import statement to be removed */ protected void removeImport(OperationsMap objs, String importToRemove) { @@ -2302,7 +2301,7 @@ public String toDefaultParameterValue(Schema schema) { * Any non-null value will cause {{#defaultValue} check to pass. * * @param codegenProperty Codegen Property - * @param schema Parameter schema + * @param schema Parameter schema * @return string presentation of the default value of the parameter */ public String toDefaultParameterValue(CodegenProperty codegenProperty, Schema schema) { @@ -2329,7 +2328,7 @@ public String toDefaultValueWithParam(String name, Schema schema) { * Return null if you do NOT want a default value. * Any non-null value will cause {{#defaultValue} check to pass. * - * @param schema Property schema + * @param schema Property schema * @param codegenProperty Codegen property * @return string presentation of the default value of the property */ @@ -2372,7 +2371,6 @@ public String getSchemaType(Schema schema) { } - protected Schema getSchemaAdditionalProperties(Schema schema) { Schema inner = ModelUtils.getAdditionalProperties(schema); if (inner == null) { @@ -3009,6 +3007,7 @@ protected String toTestCaseName(String specTestCaseName) { /** * A method that allows generators to pre-process test example payloads * This can be useful if one needs to change how values like null in string are represented + * * @param data the test data payload * @return the updated test data payload */ @@ -3019,6 +3018,7 @@ protected Object processTestExampleData(Object data) { /** * Processes any test cases if they exist in the components.x-test-examples vendor extensions * If they exist then cast them to java class instances and return them back in a map + * * @param refToTestCases the component schema name that the test cases are for */ private HashMap extractSchemaTestCases(String refToTestCases) { @@ -3055,7 +3055,7 @@ private HashMap extractSchemaTestCases(String refToTestC /** * Sets the booleans that define the model's type * - * @param model the model to update + * @param model the model to update * @param schema the model's schema */ protected void updateModelForString(CodegenModel model, Schema schema) { @@ -3313,7 +3313,6 @@ protected void setAddProps(Schema schema, IJsonSchemaValidationProperties proper * @param sc The Schema that may contain the discriminator * @param discPropName The String that is the discriminator propertyName in the schema * @param visitedSchemas A set of visited schema names - * */ private CodegenProperty discriminatorFound(String composedSchemaName, Schema sc, String discPropName, Set visitedSchemas) { if (visitedSchemas.contains(composedSchemaName)) { // recursive schema definition found @@ -3400,7 +3399,7 @@ private CodegenProperty discriminatorFound(String composedSchemaName, Schema sc, /** * Recursively look in Schema sc for the discriminator and return it * - * @param sc The Schema that may contain the discriminator + * @param sc The Schema that may contain the discriminator * @param visitedSchemas An array list of visited schemas */ private Discriminator recursiveGetDiscriminator(Schema sc, ArrayList visitedSchemas) { @@ -3944,8 +3943,8 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required) { * This method was kept when required was added to the fromProperty signature * to ensure that the change was non-breaking * - * @param name name of the property - * @param p OAS property schema + * @param name name of the property + * @param p OAS property schema * @return Codegen Property object */ public CodegenProperty fromProperty(String name, Schema p) { @@ -3961,9 +3960,9 @@ public CodegenProperty fromProperty(String name, Schema p) { * Any subsequent processing of the CodegenModel return value must be idempotent * for a given (String name, Schema schema). * - * @param name name of the property - * @param p OAS property schema - * @param required true if the property is required in the next higher object schema, false otherwise + * @param name name of the property + * @param p OAS property schema + * @param required true if the property is required in the next higher object schema, false otherwise * @param schemaIsFromAdditionalProperties true if the property is a required property defined by additional properties schema * If this is the actual additionalProperties schema not defining a required property, then * the value should be false @@ -4742,7 +4741,7 @@ public CodegenOperation fromOperation(String path, if (contentType != null) { contentType = contentType.toLowerCase(Locale.ROOT); } - if (!(this instanceof RustAxumServerCodegen) && contentType != null && + if (contentType != null && (contentType.startsWith("application/x-www-form-urlencoded") || contentType.startsWith("multipart"))) { // process form parameters @@ -5909,10 +5908,10 @@ protected void addImport(Set importsToBeAddedTo, String type) { /** * Add the model name of the child schema in a composed schema to the set of imports * - * @param composed composed schema + * @param composed composed schema * @param childSchema composed schema - * @param model codegen model - * @param modelName model name + * @param model codegen model + * @param modelName model name */ protected void addImport(Schema composed, Schema childSchema, CodegenModel model, String modelName) { if (composed == null || childSchema == null) { @@ -7984,6 +7983,7 @@ protected String getItemsName(Schema containingSchema, String containingSchemaNa protected String getAdditionalPropertiesName() { return "additional_properties"; } + private void addJsonSchemaForBodyRequestInCaseItsNotPresent(CodegenParameter codegenParameter, RequestBody body) { if (codegenParameter.jsonSchema == null) codegenParameter.jsonSchema = Json.pretty(body); @@ -8250,8 +8250,8 @@ public void addOneOfNameExtension(Schema schema, String name) { /** * Add a given ComposedSchema as an interface model to be generated, assuming it has `oneOf` defined * - * @param cs ComposedSchema object to create as interface model - * @param type name to use for the generated interface model + * @param cs ComposedSchema object to create as interface model + * @param type name to use for the generated interface model */ public void addOneOfInterfaceModel(Schema cs, String type) { if (cs.getOneOf() == null) { @@ -8441,7 +8441,7 @@ private List getComposedProperties(List xOfCollection, // in other sub-schemas of allOf/anyOf/oneOf cp.vendorExtensions.putIfAbsent("x-duplicated-data-type", true); } else { - if(isTypeErasedGenerics()) { + if (isTypeErasedGenerics()) { dataTypeSet.add(cp.baseType); } else { dataTypeSet.add(cp.dataType); @@ -8472,13 +8472,17 @@ public List getSupportedVendorExtensions() { } @Override - public boolean getUseInlineModelResolver() { return true; } + public boolean getUseInlineModelResolver() { + return true; + } @Override - public boolean getUseOpenAPINormalizer() { return true; } + public boolean getUseOpenapiNormalizer() { + return true; + } @Override - public Set getOpenAPIGeneratorIgnoreList() { + public Set getOpenapiGeneratorIgnoreList() { return openapiGeneratorIgnoreList; } @@ -8492,7 +8496,9 @@ public boolean isTypeErasedGenerics() { And convert special characters like newline, tab, carriage return Into strings that can be rendered in the language that the generator will output to */ - protected String handleSpecialCharacters(String name) { return name; } + protected String handleSpecialCharacters(String name) { + return name; + } /** * Used to ensure that null or Schema is returned given an input Boolean/Schema/null diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 8760af0bc7d0..b65a5fbd5d68 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -265,7 +265,7 @@ void configureGeneratorProperties() { // normalize the spec try { - if (config.getUseOpenAPINormalizer()) { + if (config.getUseOpenapiNormalizer()) { SemVer version = new SemVer(openAPI.getOpenapi()); if (version.atLeast("3.1.0")) { config.openapiNormalizer().put("NORMALIZE_31SPEC", "true"); @@ -929,8 +929,8 @@ private boolean apiFilePreCheck(String filename, String generator, String templa /* * Generate .openapi-generator-ignore if the option openapiGeneratorIgnoreFile is enabled. */ - private void generateOpenAPIGeneratorIgnoreFile() { - if (config.getOpenAPIGeneratorIgnoreList() == null || config.getOpenAPIGeneratorIgnoreList().isEmpty()) { + private void generateOpenapiGeneratorIgnoreFile() { + if (config.getOpenapiGeneratorIgnoreList() == null || config.getOpenapiGeneratorIgnoreList().isEmpty()) { return; } @@ -982,7 +982,7 @@ private void generateOpenAPIGeneratorIgnoreFile() { Writer fileWriter = Files.newBufferedWriter(ignoreFile.toPath(), StandardCharsets.UTF_8); fileWriter.write(header); // add entries provided by the users - for (String entry : config.getOpenAPIGeneratorIgnoreList()) { + for (String entry : config.getOpenapiGeneratorIgnoreList()) { fileWriter.write(entry); fileWriter.write("\n"); } @@ -1219,7 +1219,7 @@ public List generate() { processUserDefinedTemplates(); // generate .openapi-generator-ignore if the option openapiGeneratorIgnoreFile is enabled - generateOpenAPIGeneratorIgnoreFile(); + generateOpenapiGeneratorIgnoreFile(); List files = new ArrayList<>(); // models diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index 970f33d3b6f1..7ccb89967959 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -770,9 +770,8 @@ private void flattenProperties(OpenAPI openAPI, Map properties, for (Map.Entry propertiesEntry : properties.entrySet()) { String key = propertiesEntry.getKey(); Schema property = propertiesEntry.getValue(); - if (property instanceof ObjectSchema && ((ObjectSchema) property).getProperties() != null - && ((ObjectSchema) property).getProperties().size() > 0) { - ObjectSchema op = (ObjectSchema) property; + if (ModelUtils.isObjectSchema(property)) { + Schema op = property; String modelName = resolveModelName(op.getTitle(), path + "_" + key); Schema model = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(model); @@ -789,8 +788,8 @@ private void flattenProperties(OpenAPI openAPI, Map properties, } } else if (ModelUtils.isArraySchema(property)) { Schema inner = ModelUtils.getSchemaItems(property); - if (inner instanceof ObjectSchema) { - ObjectSchema op = (ObjectSchema) inner; + if (ModelUtils.isObjectSchema(inner)) { + Schema op = inner; if (op.getProperties() != null && op.getProperties().size() > 0) { flattenProperties(openAPI, op.getProperties(), path); String modelName = resolveModelName(op.getTitle(), path + "_" + key); @@ -819,8 +818,8 @@ private void flattenProperties(OpenAPI openAPI, Map properties, } } else if (ModelUtils.isMapSchema(property)) { Schema inner = ModelUtils.getAdditionalProperties(property); - if (inner instanceof ObjectSchema) { - ObjectSchema op = (ObjectSchema) inner; + if (ModelUtils.isObjectSchema(inner)) { + Schema op = inner; if (op.getProperties() != null && op.getProperties().size() > 0) { flattenProperties(openAPI, op.getProperties(), path); String modelName = resolveModelName(op.getTitle(), path + "_" + key); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java index b0b4d2a50fa7..4f129b2f4c68 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java @@ -890,7 +890,7 @@ public boolean isNullTypeSchema(Schema schema) { if (schema.getTypes() != null && !schema.getTypes().isEmpty()) { // 3.1 spec - if (schema.getTypes().size() ==1) { // 1 type only + if (schema.getTypes().size() == 1) { // 1 type only String type = (String) schema.getTypes().iterator().next(); return type == null || "null".equals(type); } else { // more than 1 type so must not be just null @@ -902,6 +902,11 @@ public boolean isNullTypeSchema(Schema schema) { if (Boolean.TRUE.equals(schema.getNullable())) { return true; } + + // for `type: null` + if (schema.getTypes() == null && schema.get$ref() == null) { + return true; + } } else { // 3.0.x or 2.x spec if ((schema.getType() == null || schema.getType().equals("null")) && schema.get$ref() == null) { return true; @@ -938,7 +943,7 @@ private Schema processSimplifyOneOf(Schema schema) { if (oneOfSchemas.size() == 6) { TreeSet ts = new TreeSet<>(); for (Schema s: oneOfSchemas) { - ts.add(s.getType()); + ts.add(ModelUtils.getType(s)); } if (ts.equals(anyTypeTreeSet)) { @@ -1063,7 +1068,7 @@ private Schema processSimplifyAnyOf(Schema schema) { if (anyOfSchemas.size() == 6) { TreeSet ts = new TreeSet<>(); for (Schema s: anyOfSchemas) { - ts.add(s.getType()); + ts.add(ModelUtils.getType(s)); } if (ts.equals(anyTypeTreeSet)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index bee2393d753a..90a35cd5641c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -145,14 +145,14 @@ public static CodegenConfigurator fromFile(String configFile, Module... modules) if(generatorSettings.getOperationIdNameMappings() != null) { configurator.operationIdNameMappings.putAll(generatorSettings.getOperationIdNameMappings()); } - if(generatorSettings.getOpenAPINormalizer() != null) { - configurator.openapiNormalizer.putAll(generatorSettings.getOpenAPINormalizer()); + if(generatorSettings.getOpenapiNormalizer() != null) { + configurator.openapiNormalizer.putAll(generatorSettings.getOpenapiNormalizer()); } if(generatorSettings.getLanguageSpecificPrimitives() != null) { configurator.languageSpecificPrimitives.addAll(generatorSettings.getLanguageSpecificPrimitives()); } - if(generatorSettings.getOpenAPIGeneratorIgnoreList() != null) { - configurator.openapiGeneratorIgnoreList.addAll(generatorSettings.getOpenAPIGeneratorIgnoreList()); + if(generatorSettings.getOpenapiGeneratorIgnoreList() != null) { + configurator.openapiGeneratorIgnoreList.addAll(generatorSettings.getOpenapiGeneratorIgnoreList()); } if(generatorSettings.getReservedWordsMappings() != null) { configurator.reservedWordsMappings.putAll(generatorSettings.getReservedWordsMappings()); @@ -268,9 +268,9 @@ public CodegenConfigurator addOperationIdNameMapping(String key, String value) { return this; } - public CodegenConfigurator addOpenAPINormalizer(String key, String value) { + public CodegenConfigurator addOpenapiNormalizer(String key, String value) { this.openapiNormalizer.put(key, value); - generatorSettingsBuilder.withOpenAPINormalizer(key, value); + generatorSettingsBuilder.withOpenapiNormalizer(key, value); return this; } @@ -286,9 +286,9 @@ public CodegenConfigurator addLanguageSpecificPrimitive(String value) { return this; } - public CodegenConfigurator addOpenAPIGeneratorIgnoreList(String value) { + public CodegenConfigurator addOpenapiGeneratorIgnoreList(String value) { this.openapiGeneratorIgnoreList.add(value); - generatorSettingsBuilder.withOpenAPIGeneratorIgnoreList(value); + generatorSettingsBuilder.withOpenapiGeneratorIgnoreList(value); return this; } @@ -482,9 +482,9 @@ public CodegenConfigurator setOperationIdNameMappings(Map operat return this; } - public CodegenConfigurator setOpenAPINormalizer(Map openapiNormalizer) { + public CodegenConfigurator setOpenapiNormalizer(Map openapiNormalizer) { this.openapiNormalizer = openapiNormalizer; - generatorSettingsBuilder.withOpenAPINormalizer(openapiNormalizer); + generatorSettingsBuilder.withOpenapiNormalizer(openapiNormalizer); return this; } @@ -515,10 +515,10 @@ public CodegenConfigurator setLanguageSpecificPrimitives( return this; } - public CodegenConfigurator setOpenAPIGeneratorIgnoreList( + public CodegenConfigurator setOpenapiGeneratorIgnoreList( Set openapiGeneratorIgnoreList) { this.openapiGeneratorIgnoreList = openapiGeneratorIgnoreList; - generatorSettingsBuilder.withOpenAPIGeneratorIgnoreList(openapiGeneratorIgnoreList); + generatorSettingsBuilder.withOpenapiGeneratorIgnoreList(openapiGeneratorIgnoreList); return this; } @@ -779,9 +779,9 @@ public ClientOptInput toClientOptInput() { config.modelNameMapping().putAll(generatorSettings.getModelNameMappings()); config.enumNameMapping().putAll(generatorSettings.getEnumNameMappings()); config.operationIdNameMapping().putAll(generatorSettings.getOperationIdNameMappings()); - config.openapiNormalizer().putAll(generatorSettings.getOpenAPINormalizer()); + config.openapiNormalizer().putAll(generatorSettings.getOpenapiNormalizer()); config.languageSpecificPrimitives().addAll(generatorSettings.getLanguageSpecificPrimitives()); - config.openapiGeneratorIgnoreList().addAll(generatorSettings.getOpenAPIGeneratorIgnoreList()); + config.openapiGeneratorIgnoreList().addAll(generatorSettings.getOpenapiGeneratorIgnoreList()); config.reservedWordsMappings().putAll(generatorSettings.getReservedWordsMappings()); config.additionalProperties().putAll(generatorSettings.getAdditionalProperties()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java index 962b1f4df617..42f423984060 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java @@ -185,16 +185,16 @@ public static void applyOperationIdNameMappingsKvp(String operationIdNameMapping } } - public static void applyOpenAPINormalizerKvpList(List openapiNormalizer, CodegenConfigurator configurator) { + public static void applyOpenapiNormalizerKvpList(List openapiNormalizer, CodegenConfigurator configurator) { for (String propString : openapiNormalizer) { - applyOpenAPINormalizerKvp(propString, configurator); + applyOpenapiNormalizerKvp(propString, configurator); } } - public static void applyOpenAPINormalizerKvp(String openapiNormalizer, CodegenConfigurator configurator) { + public static void applyOpenapiNormalizerKvp(String openapiNormalizer, CodegenConfigurator configurator) { final Map map = createMapFromKeyValuePairs(openapiNormalizer); for (Map.Entry entry : map.entrySet()) { - configurator.addOpenAPINormalizer(entry.getKey().trim(), entry.getValue().trim()); + configurator.addOpenapiNormalizer(entry.getKey().trim(), entry.getValue().trim()); } } @@ -250,16 +250,16 @@ public static void applyLanguageSpecificPrimitivesCsv(String languageSpecificPri } } - public static void applyOpenAPIGeneratorIgnoreListCsvList(List openapiGeneratorIgnoreList, CodegenConfigurator configurator) { + public static void applyOpenapiGeneratorIgnoreListCsvList(List openapiGeneratorIgnoreList, CodegenConfigurator configurator) { for (String propString : openapiGeneratorIgnoreList) { - applyOpenAPIGeneratorIgnoreListCsv(propString, configurator); + applyOpenapiGeneratorIgnoreListCsv(propString, configurator); } } - public static void applyOpenAPIGeneratorIgnoreListCsv(String openapiGeneratorIgnoreList, CodegenConfigurator configurator) { + public static void applyOpenapiGeneratorIgnoreListCsv(String openapiGeneratorIgnoreList, CodegenConfigurator configurator) { final Set set = createSetFromCsvList(openapiGeneratorIgnoreList); for (String item : set) { - configurator.addOpenAPIGeneratorIgnoreList(item); + configurator.addOpenapiGeneratorIgnoreList(item); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 990bb1eedb17..ddb24d37bf65 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -585,7 +585,7 @@ public Map postProcessAllModels(Map objs) List allOf = composedSchemas.getAllOf(); if (allOf != null) { for (CodegenProperty property : allOf) { - property.name = patchPropertyName(model, property.baseType); + property.name = patchPropertyName(model, camelize(property.baseType)); patchPropertyVendorExtensions(property); } } @@ -594,7 +594,7 @@ public Map postProcessAllModels(Map objs) if (anyOf != null) { removePropertiesDeclaredInComposedTypes(objs, model, anyOf); for (CodegenProperty property : anyOf) { - property.name = patchPropertyName(model, property.baseType); + property.name = patchPropertyName(model, camelize(property.baseType)); property.isNullable = true; patchPropertyVendorExtensions(property); } @@ -604,7 +604,7 @@ public Map postProcessAllModels(Map objs) if (oneOf != null) { removePropertiesDeclaredInComposedTypes(objs, model, oneOf); for (CodegenProperty property : oneOf) { - property.name = patchPropertyName(model, property.baseType); + property.name = patchPropertyName(model, camelize(property.baseType)); property.isNullable = true; patchPropertyVendorExtensions(property); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 76f7bd48b155..66a1db39bc7e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -61,6 +61,7 @@ import java.util.stream.StreamSupport; import static org.openapitools.codegen.utils.CamelizeOption.*; +import static org.openapitools.codegen.utils.OnceLogger.once; import static org.openapitools.codegen.utils.StringUtils.*; public abstract class AbstractJavaCodegen extends DefaultCodegen implements CodegenConfig, @@ -93,6 +94,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code public static final String USE_ONE_OF_INTERFACES = "useOneOfInterfaces"; public static final String LOMBOK = "lombok"; public static final String DEFAULT_TEST_FOLDER = "${project.build.directory}/generated-test-sources/openapi"; + public static final String GENERATE_CONSTRUCTOR_WITH_ALL_ARGS = "generatedConstructorWithAllArgs"; protected String dateLibrary = "java8"; protected boolean supportAsync = false; @@ -142,7 +144,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code protected boolean camelCaseDollarSign = false; protected boolean useJakartaEe = false; protected boolean containerDefaultToNull = false; - + protected boolean generatedConstructorWithAllArgs = false; private Map schemaKeyToModelNameCache = new HashMap<>(); public AbstractJavaCodegen() { @@ -282,6 +284,7 @@ public AbstractJavaCodegen() { cliOptions.add(CliOption.newBoolean(CAMEL_CASE_DOLLAR_SIGN, "Fix camelCase when starting with $ sign. when true : $Value when false : $value")); cliOptions.add(CliOption.newBoolean(USE_JAKARTA_EE, "whether to use Jakarta EE namespace instead of javax")); cliOptions.add(CliOption.newBoolean(CONTAINER_DEFAULT_TO_NULL, "Set containers (array, set, map) default to null")); + cliOptions.add(CliOption.newBoolean(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, "whether to generate a constructor for all arguments").defaultValue(Boolean.FALSE.toString())); cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC)); cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC)); @@ -355,6 +358,10 @@ public void processOpts() { additionalProperties.put(ANNOTATION_LIBRARY, AnnotationLibrary.NONE); } + if (additionalProperties.containsKey(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS)) { + this.setGeneratedConstructorWithAllArgs(convertPropertyToBoolean(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS)); + } + writePropertyBack(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, generatedConstructorWithAllArgs); if (StringUtils.isEmpty(System.getenv("JAVA_POST_PROCESS_FILE"))) { LOGGER.info("Environment variable JAVA_POST_PROCESS_FILE not defined so the Java code may not be properly formatted. To define it, try 'export JAVA_POST_PROCESS_FILE=\"/usr/local/bin/clang-format -i\"' (Linux/Mac)"); @@ -677,11 +684,26 @@ public void processOpts() { }); } + private void setGeneratedConstructorWithAllArgs(boolean aValue) { + this.generatedConstructorWithAllArgs = aValue; + } + + public boolean isGeneratedConstructorWithAllArgs() { + return generatedConstructorWithAllArgs; + } + + /** + * Analyse and post process all Models. + * @param objs the models map. + * @return the processed models map. + **/ @Override public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); objs = super.updateAllModels(objs); + Map allModels = getAllModels(objs); + if (!additionalModelTypeAnnotations.isEmpty()) { for (String modelName : objs.keySet()) { Map models = objs.get(modelName); @@ -703,9 +725,101 @@ public Map postProcessAllModels(Map objs) } } + /* + Add parentVars and parentRequiredVars to every Model which has a parent. + Add isInherited to every model which has children. + This allows + the generation of fluent setter methods for inherited properties + the generation of all arg constructors + ps: This code was specific to SpringCodeGen and now is available to all java generators. + */ + for (ModelsMap modelsAttrs : objs.values()) { + for (ModelMap mo : modelsAttrs.getModels()) { + CodegenModel codegenModel = mo.getModel(); + Set inheritedImports = new HashSet<>(); + Map propertyHash = new HashMap<>(codegenModel.vars.size()); + for (final CodegenProperty property : codegenModel.vars) { + propertyHash.put(property.name, property); + } + List parentModelList = getParentModelList(codegenModel); + for (CodegenModel parentCodegenModel: parentModelList) { + for (final CodegenProperty property : parentCodegenModel.vars) { + // helper list of parentVars simplifies templating + if (!propertyHash.containsKey(property.name)) { + propertyHash.put(property.name, property); + final CodegenProperty parentVar = property.clone(); + parentVar.isInherited = true; + LOGGER.info("adding parent variable {} to {}", property.name, codegenModel.name); + codegenModel.parentVars.add(parentVar); + Set imports = parentVar.getImports(true, this.importBaseType, generatorMetadata.getFeatureSet()).stream().filter(Objects::nonNull).collect(Collectors.toSet()); + for (String imp : imports) { + // Avoid dupes + if (!codegenModel.getImports().contains(imp)) { + inheritedImports.add(imp); + codegenModel.getImports().add(imp); + } + } + } + } + } + if (codegenModel.getParentModel() != null) { + codegenModel.parentRequiredVars = new ArrayList<>(codegenModel.getParentModel().requiredVars); + } + // There must be a better way ... + for (String imp: inheritedImports) { + String qimp = importMapping().get(imp); + if (qimp != null) { + Map toAdd = new HashMap<>(); + toAdd.put("import", qimp); + modelsAttrs.getImports().add(toAdd); + } + } + } + } + + if (isGeneratedConstructorWithAllArgs()) { + // conditionally force the generation of all args constructor. + for (CodegenModel cm : allModels.values()) { + if (isConstructorWithAllArgsAllowed(cm)) { + cm.vendorExtensions.put("generatedConstructorWithAllArgs", true); + List constructorArgs = new ArrayList<>(); + // vendorExtensions.allArgsConstructorVars should be equivalent to allVars + // but it is not reliable if openapiNormalizer.REFACTOR_ALLOF_WITH_PROPERTIES_ONLY is disabled + if (cm.vars.size() + cm.parentVars.size() != cm.allVars.size()) { + once(LOGGER).warn("Unexpected allVars for {} expecting:{} vars. actual:{} vars", cm.name, cm.vars.size() + cm.parentVars.size(), cm.allVars.size()); + } + cm.vendorExtensions.put("allArgsConstructorVars", constructorArgs); + constructorArgs.addAll(cm.vars); + constructorArgs.addAll(cm.parentVars); + } + } + } + return objs; } + private List getParentModelList(CodegenModel codegenModel) { + CodegenModel parentCodegenModel = codegenModel.parentModel; + List parentModelList = new ArrayList<>(); + while (parentCodegenModel != null) { + parentModelList.add(parentCodegenModel); + parentCodegenModel = parentCodegenModel.parentModel; + } + return parentModelList; + } + + /** + * trigger the generation of all arguments constructor or not. + * It avoids generating the same constructor twice. + * + * @return true if an allArgConstructor must be generated + */ + protected boolean isConstructorWithAllArgsAllowed(CodegenModel codegenModel) { + // implementation detail: allVars is not reliable if openapiNormalizer.REFACTOR_ALLOF_WITH_PROPERTIES_ONLY is disabled + return (this.generatedConstructorWithAllArgs && + (!codegenModel.vars.isEmpty() || codegenModel.parentVars.isEmpty())); + } + private void sanitizeConfig() { // Sanitize any config options here. We also have to update the additionalProperties because // the whole additionalProperties object is injected into the main object passed to the mustache layer @@ -999,6 +1113,10 @@ private String getBeanValidation(Schema items) { return getNumberBeanValidation(items); } + if (ModelUtils.isLongSchema(items)) { + return getLongBeanValidation(items); + } + if (ModelUtils.isIntegerSchema(items)) { return getIntegerBeanValidation(items); } @@ -1021,6 +1139,21 @@ private String getIntegerBeanValidation(Schema items) { return ""; } + private String getLongBeanValidation(Schema items) { + if (items.getMinimum() != null && items.getMaximum() != null) { + return String.format(Locale.ROOT, "@Min(%sL) @Max(%sL)", items.getMinimum(), items.getMaximum()); + } + + if (items.getMinimum() != null) { + return String.format(Locale.ROOT, "@Min(%sL)", items.getMinimum()); + } + + if (items.getMaximum() != null) { + return String.format(Locale.ROOT, "@Max(%sL)", items.getMaximum()); + } + return ""; + } + private String getNumberBeanValidation(Schema items) { if (items.getMinimum() != null && items.getMaximum() != null) { return String.format(Locale.ROOT, "@DecimalMin(value = \"%s\", inclusive = %s) @DecimalMax(value = \"%s\", inclusive = %s)", diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index a69084590fd6..60b829a0d564 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -39,7 +39,6 @@ import java.io.File; import java.util.*; -import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -1148,6 +1147,15 @@ public ModelsMap postProcessModels(ModelsMap objs) { return objs; } + @Override + protected boolean isConstructorWithAllArgsAllowed(CodegenModel codegenModel) { + // implementation detail: allVars is not reliable if openapiNormalizer.REFACTOR_ALLOF_WITH_PROPERTIES_ONLY is disabled + if (codegenModel.readOnlyVars.size() != codegenModel.vars.size() + codegenModel.parentVars.size()) { + return super.isConstructorWithAllArgsAllowed(codegenModel); + } + return false; + } + public void setUseOneOfDiscriminatorLookup(boolean useOneOfDiscriminatorLookup) { this.useOneOfDiscriminatorLookup = useOneOfDiscriminatorLookup; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 0191719c9c75..9676b9bf34ca 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -17,11 +17,13 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.examples.Example; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; @@ -671,10 +673,10 @@ public String toDefaultValueWithParam(String name, Schema p) { public void setParameterExampleValue(CodegenParameter p) { String example; - if (p.defaultValue == null) { - example = p.example; - } else { + if (p.example == null) { example = p.defaultValue; + } else { + example = p.example; } String type = p.baseType; @@ -740,6 +742,24 @@ public void setParameterExampleValue(CodegenParameter p) { p.example = example; } + @Override + public void setParameterExampleValue(CodegenParameter codegenParameter, Parameter parameter) { + Schema schema = parameter.getSchema(); + + if (parameter.getExample() != null) { + codegenParameter.example = parameter.getExample().toString(); + } else if (parameter.getExamples() != null && !parameter.getExamples().isEmpty()) { + Example example = parameter.getExamples().values().iterator().next(); + if (example.getValue() != null) { + codegenParameter.example = example.getValue().toString(); + } + } else if (schema != null && schema.getExample() != null) { + codegenParameter.example = schema.getExample().toString(); + } + + setParameterExampleValue(codegenParameter); + } + protected String setPropertyExampleValue(CodegenProperty p) { String example; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 9586efe7f7f8..1eaede84d600 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -18,11 +18,13 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.examples.Example; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; @@ -671,10 +673,10 @@ public String toDefaultValueWithParam(String name, Schema p) { public void setParameterExampleValue(CodegenParameter p) { String example; - if (p.defaultValue == null) { - example = p.example; - } else { + if (p.example == null) { example = p.defaultValue; + } else { + example = p.example; } String type = p.baseType; @@ -740,6 +742,24 @@ public void setParameterExampleValue(CodegenParameter p) { p.example = example; } + @Override + public void setParameterExampleValue(CodegenParameter codegenParameter, Parameter parameter) { + Schema schema = parameter.getSchema(); + + if (parameter.getExample() != null) { + codegenParameter.example = parameter.getExample().toString(); + } else if (parameter.getExamples() != null && !parameter.getExamples().isEmpty()) { + Example example = parameter.getExamples().values().iterator().next(); + if (example.getValue() != null) { + codegenParameter.example = example.getValue().toString(); + } + } else if (schema != null && schema.getExample() != null) { + codegenParameter.example = schema.getExample().toString(); + } + + setParameterExampleValue(codegenParameter); + } + protected String setPropertyExampleValue(CodegenProperty p) { String example; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index 4af3005fdd71..d023dc130522 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -281,7 +281,7 @@ private boolean isEnumSchema(Schema schema) { private void collectEnumSchemas(String parentName, String sName, Schema schema) { if (ModelUtils.isArraySchema(schema)) { collectEnumSchemas(parentName, sName, ModelUtils.getSchemaItems(schema)); - } else if (schema instanceof MapSchema && schema.getAdditionalProperties() instanceof Schema) { + } else if (ModelUtils.isMapSchema(schema) && schema.getAdditionalProperties() instanceof Schema) { collectEnumSchemas(parentName, sName, (Schema) schema.getAdditionalProperties()); } else if (isEnumSchema(schema)) { String h = hashEnum(schema); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java new file mode 100644 index 000000000000..67126e407c07 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java @@ -0,0 +1,845 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.languages; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.Schema; +import org.apache.commons.io.FileUtils; +import org.openapitools.codegen.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; +import org.openapitools.codegen.model.OperationsMap; +import org.openapitools.codegen.serializer.SerializerUtils; +import org.openapitools.codegen.utils.ModelUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.nio.charset.StandardCharsets; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static org.openapitools.codegen.utils.StringUtils.camelize; + +public class ScalaCaskServerCodegen extends AbstractScalaCodegen implements CodegenConfig { + public static final String PROJECT_NAME = "projectName"; + + private final Logger LOGGER = LoggerFactory.getLogger(ScalaCaskServerCodegen.class); + + public CodegenType getTag() { + return CodegenType.SERVER; + } + + public String getName() { + return "scala-cask"; + } + + public String getHelp() { + return "Generates a scala-cask server."; + } + + protected String artifactVersion = "0.0.1"; + + static String ApiServiceTemplate = "apiService.mustache"; + + public ScalaCaskServerCodegen() { + super(); + + outputFolder = "generated-code/scala-cask"; + + embeddedTemplateDir = templateDir = "scala-cask"; + apiPackage = "Apis"; + modelPackage = "Models"; + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + + outputFolder = "generated-code/cask"; + + modelTestTemplateFiles.put("modelTest.mustache", ".scala"); + modelTemplateFiles.put("model.mustache", ".scala"); + modelTemplateFiles.put("modelData.mustache", "Data.scala"); + + apiTemplateFiles.put("api.mustache", ".scala"); + apiTemplateFiles.put("apiRoutes.mustache", ".scala"); + apiTemplateFiles.put(ApiServiceTemplate, "Service.scala"); + + embeddedTemplateDir = templateDir = "scala-cask"; + + setReservedWordsLowerCase( + Arrays.asList( + "abstract", "continue", "for", "new", "switch", "assert", + "default", "if", "package", "synchronized", "boolean", "do", "goto", "private", + "this", "break", "double", "implements", "protected", "throw", "byte", "else", + "import", "public", "throws", "case", "enum", "instanceof", "return", "transient", + "catch", "extends", "int", "short", "try", "char", "final", "interface", "static", + "void", "class", "finally", "long", "strictfp", "volatile", "const", "float", + "native", "super", "while", "type") + ); + + defaultIncludes = new HashSet( + Arrays.asList("double", + "Int", + "Long", + "Float", + "Double", + "char", + "float", + "String", + "boolean", + "Boolean", + "Double", + "Integer", + "Long", + "Float", + "List", + "Set", + "Map") + ); + + typeMapping.put("integer", "Int"); + typeMapping.put("long", "Long"); + //TODO binary should be mapped to byte array + // mapped to String as a workaround + typeMapping.put("binary", "String"); + + cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC)); + cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC)); + cliOptions.add(new CliOption(CodegenConstants.GIT_REPO_ID, CodegenConstants.GIT_REPO_ID_DESC)); + cliOptions.add(new CliOption(CodegenConstants.GIT_USER_ID, CodegenConstants.GIT_USER_ID_DESC)); + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, CodegenConstants.PACKAGE_DESCRIPTION)); + } + + @Override + public String toDefaultValue(Schema p) { + if (ModelUtils.isMapSchema(p)) { + String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + return "Map[String, " + inner + "]() "; + } + return super.toDefaultValue(p); + } + + @Override + public String testPackage() { + return "src/test/scala"; + } + + public String toModelTestFilename(String name) { + String n = super.toModelTestFilename(name); + return (modelPackage + "." + n).replace('.', '/'); + } + + private String ensureProp(String key, String defaultValue) { + if (additionalProperties.containsKey(key) && !additionalProperties.get(key).toString().trim().isEmpty()) { + return (String) additionalProperties.get(key); + } else { + additionalProperties.put(key, defaultValue); + return defaultValue; + } + } + + @Override + public void processOpts() { + super.processOpts(); + + final String groupId = ensureProp(CodegenConstants.GROUP_ID, "org.openapitools"); + ensureProp(CodegenConstants.ARTIFACT_ID, "caskgen"); + artifactVersion = ensureProp(CodegenConstants.ARTIFACT_VERSION, "0.0.1"); + gitRepoId = ensureProp(CodegenConstants.GIT_REPO_ID, ""); + gitUserId = ensureProp(CodegenConstants.GIT_USER_ID, ""); + + String basePackage = ensureProp(CodegenConstants.PACKAGE_NAME, groupId + ".server"); + apiPackage = ensureProp(CodegenConstants.API_PACKAGE, basePackage + ".api"); + modelPackage = ensureProp(CodegenConstants.MODEL_PACKAGE, basePackage + ".model"); + + + final String apiPath = "src/main/scala/" + apiPackage.replace('.', '/'); + final String modelPath = "src/main/scala/" + modelPackage.replace('.', '/'); + + final List appFullPath = Arrays.stream(apiPath.split("/")).collect(Collectors.toList()); + final String appFolder = String.join("/", appFullPath.subList(0, appFullPath.size() - 1)); + + additionalProperties.put("appName", "Cask App"); + additionalProperties.put("appDescription", "A cask service"); + additionalProperties.put("infoUrl", "https://openapi-generator.tech"); + additionalProperties.put("infoEmail", infoEmail); + additionalProperties.put("licenseInfo", "All rights reserved"); + additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html"); + additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); + additionalProperties.put("openbrackets", "{{"); + additionalProperties.put("closebrackets", "}}"); + + supportingFiles.add(new SupportingFile("example.mustache", "example", "Server.scala")); + supportingFiles.add(new SupportingFile("Dockerfile.mustache", "example", "Dockerfile")); + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + supportingFiles.add(new SupportingFile("build.sbt.mustache", "", "build.sbt")); + supportingFiles.add(new SupportingFile("bulidAndPublish.yml.mustache", "", ".github/workflows/bulidAndPublish.yml")); + supportingFiles.add(new SupportingFile("build.sc.mustache", "", "build.sc")); + supportingFiles.add(new SupportingFile(".scalafmt.conf.mustache", "", ".scalafmt.conf")); + supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); + supportingFiles.add(new SupportingFile("appPackage.mustache", appFolder, "package.scala")); + supportingFiles.add(new SupportingFile("apiPackage.mustache", apiPath, "package.scala")); + supportingFiles.add(new SupportingFile("modelPackage.mustache", modelPath, "package.scala")); + supportingFiles.add(new SupportingFile("exampleApp.mustache", appFolder, "ExampleApp.scala")); + supportingFiles.add(new SupportingFile("baseApp.mustache", appFolder, "BaseApp.scala")); + supportingFiles.add(new SupportingFile("openapiRoute.mustache", apiPath, "OpenApiRoutes.scala")); + supportingFiles.add(new SupportingFile("appRoutes.mustache", appFolder, "AppRoutes.scala")); + supportingFiles.add(new SupportingFile("project/build.properties", "project", "build.properties")); + supportingFiles.add(new SupportingFile("project/plugins.sbt", "project", "plugins.sbt")); + + + instantiationTypes.put("array", "Seq"); + instantiationTypes.put("map", "Map"); + + importMapping = new HashMap(); + importMapping.put("BigDecimal", "scala.math.BigDecimal"); + importMapping.put("UUID", "java.util.UUID"); + importMapping.put("File", "java.io.File"); + importMapping.put("Date", "java.time.LocalDate as Date"); + importMapping.put("Timestamp", "java.sql.Timestamp"); + importMapping.put("Map", "Map"); + importMapping.put("HashMap", "Map"); + importMapping.put("Array", "Seq"); + importMapping.put("ArrayList", "Seq"); + importMapping.put("List", "Seq"); + importMapping.put("DateTime", "java.time.LocalDateTime"); + importMapping.put("LocalDateTime", "java.time.LocalDateTime"); + importMapping.put("LocalDate", "java.time.LocalDate"); + importMapping.put("OffsetDateTime", "java.time.OffsetDateTime"); + importMapping.put("LocalTime", "java.time.LocalTime"); + } + + static boolean consumesMimetype(CodegenOperation op, String mimetype) { + // people don't always/often specify the 'consumes' property, so we assume true when + // the optional 'consumes' is null or empty + boolean defaultRetValue = true; + + final List> consumes = op.consumes; + if (consumes != null) { + for (Map c : consumes) { + final String mt = c.get("mediaType"); + if (mt.equalsIgnoreCase(mimetype)) { + return true; + } + } + return false; + } else { + return defaultRetValue; + } + } + + + static String formatMap(Map map) { + StringBuilder mapAsString = new StringBuilder("{"); + for (Object key : map.keySet().stream().sorted().collect(Collectors.toList())) { + mapAsString.append(key + " -- " + map.get(key) + ",\n"); + } + if (mapAsString.length() > 1) { + mapAsString.delete(mapAsString.length() - 2, mapAsString.length()); + } + mapAsString.append("}"); + return mapAsString.toString(); + } + + @Override + public String toApiName(String name) { + if (name.isEmpty()) { + return "DefaultApi"; + } + name = sanitizeName(name); + return camelize(name); + } + + @Override + public String apiFilename(String templateName, String tag) { + String suffix = apiTemplateFiles().get(templateName); + String fn = toApiFilename(tag); + if (templateName.equals(ApiServiceTemplate)) { + return apiFileFolder() + '/' + fn + suffix; + } else { + return apiFileFolder() + '/' + fn + "Routes" + suffix; + } + } + + static String capitalise(String p) { + if (p.length() < 2) { + return p.toUpperCase(Locale.ROOT); + } else { + String first = "" + p.charAt(0); + return first.toUpperCase(Locale.ROOT) + p.substring(1); + } + } + + + // thanks FlaskConnectionCodeGen + private static List> getOperations(Map objs) { + List> result = new ArrayList>(); + Map apiInfo = (Map) objs.get("apiInfo"); + List> apis = (List>) apiInfo.get("apis"); + for (Map api : apis) { + Map operations = (Map) api.get("operations"); + result.add(operations); + } + return result; + } + + @Override + public Map postProcessSupportingFileData(Map objs) { + List> operations = getOperations(objs); + for (int i = 0; i < operations.size(); i++) { + operations.get(i).put("hasMore", i < operations.size() - 1); + } + objs.put("operations", operations); + return super.postProcessSupportingFileData(objs); + } + + protected String getResourceFolder() { + String src = getSourceFolder(); + + List parts = Arrays.stream(src.split("/", -1)).collect(Collectors.toList()); + if (parts.isEmpty()) { + return "resources"; + } else { + String srcMain = String.join("/", parts.subList(0, parts.size() - 1)); + return srcMain + "/resources"; + } + } + + @Override + public void processOpenAPI(OpenAPI openAPI) { + String jsonOpenAPI = SerializerUtils.toJsonString(openAPI); + + try { + String outputFile = getOutputDir() + "/" + getResourceFolder() + "/openapi.json"; + FileUtils.writeStringToFile(new File(outputFile), jsonOpenAPI, StandardCharsets.UTF_8); + LOGGER.info("wrote file to {}", outputFile); + } catch (Exception e) { + LOGGER.error(e.getMessage(), e); + } + } + + + public static class ParamPart { + final CodegenParameter param; + final String name; + final boolean isParam; + + // flag for if there are more path parts + boolean hasMore; + // flag for if there are more path parts which are parameters + boolean hasMoreParams; + + final String conversion; + + public ParamPart(String name, CodegenParameter param) { + this.name = name; + this.param = param; + this.isParam = param != null; + this.hasMore = true; + this.conversion = !isParam || param.isString ? "" : ".to" + param.dataType; + } + } + + /** + * Cask will compile but 'initialize' can throw a route overlap exception: + *

+ * {{{ + * Routes overlap with wildcards: get /user/logout, get /user/:username, get /user/login + * }}} + *

+ * Note: The same error persists even if the suffixes are unique: + * {{{ + * Routes overlap with wildcards: get /user/logout/3, get /user/:username/1, get /user/login/2 + * }}} + *

+ * To fix this, we need to identify and resolve conflicts in our generated code. + *

+ * # How do we identify conflicts? + *

+ *

+ * 1. group routes by their non-param prefixes. + *

+ * 2. add an "x-annotation" vendor extension for operations + *

+ * 3. add a list of "RouteGroups" which can manually delegate as per below + *

+ *

+ * # How do we resolve conflicts? + *

+ * We leave out the cask route annotation on the conflicting operations, e.g. : + * {{{ + * //conflict: @cask.get("/user/:username") + * def getUserByName(username: String, request: cask.Request) = ... + * }}} + *

+ * and we introduce a new discriminator function to "manually" call those conflicts: + * {{{ + * + * @cask.get("/user", subpath = true) + * def userRouteDescriminator(request: cask.Request) = { + * request.remainingPathSegments match { + * case Seq("logout") => logoutUser(request) + * case Seq("login") => loginUser(request) + * case Seq(param) => getUserByName(param, request) + * } + * } + * }}} + */ + public static class OperationGroup { + List operations = new ArrayList<>(); + final String pathPrefix; + final String httpMethod; + final String caskAnnotation; + final String methodName; + + // TODO - multiple operations may have the same query params, so we'll need to somehow merge them (and take the right type) + public boolean hasGroupQueryParams() { + return operations.stream().flatMap(op -> op.queryParams.stream()).count() > 0; + } + + /** + * This is invoked from `scala-cask/apiRoutesQueryParamsTyped.mustache` + * + * @return the CodegenParameters + */ + public List getGroupQueryParams() { + List list = operations.stream().flatMap(op -> op.queryParams.stream()).map(p -> { + final CodegenParameter copy = p.copy(); + copy.vendorExtensions.put("x-default-value", defaultValue(p)); + copy.required = false; // all our query params are optional for our work-around as it's a super-set of a few different routes + copy.dataType = asScalaDataType(copy, false, true, true); + copy.defaultValue = defaultValue(copy); + return copy; + } + ).collect(Collectors.toList()); + + return list; + } + + @Override + public String toString() { + List ops = operations.stream().map(o -> o.path + "\n").collect(Collectors.toList()); + return httpMethod + " " + pathPrefix + " w/ " + operations.size() + " operations:\n" + String.join("", ops); + } + + public OperationGroup(String httpMethod, String pathPrefix) { + this.httpMethod = httpMethod; + this.pathPrefix = pathPrefix; + caskAnnotation = "@cask." + httpMethod.toLowerCase(Locale.ROOT); + + List stripped = Arrays.stream(pathPrefix.split("/", -1)) + .map(ScalaCaskServerCodegen::capitalise).collect(Collectors.toList()); + + methodName = "routeWorkAroundFor" + capitalise(httpMethod) + String.join("", stripped); + } + + public void add(CodegenOperation op) { + if (!op.path.startsWith(pathPrefix)) { + throw new IllegalArgumentException("inconsistent path: " + pathPrefix); + } + if (!op.httpMethod.equals(httpMethod)) { + throw new IllegalArgumentException("inconsistent method: " + httpMethod); + } + + final List pathParts = new ArrayList<>(); + final List parts = Arrays.stream(op.path.substring(pathPrefix.length()).split("/", -1)).filter(p -> !p.isEmpty()).collect(Collectors.toList()); + for (int i = 0; i < parts.size(); i++) { + String p = parts.get(i); + ScalaCaskServerCodegen.ParamPart pp = hasBrackets(p) ? new ScalaCaskServerCodegen.ParamPart(chompBrackets(p), pathParamForName(op, chompBrackets(p))) : new ScalaCaskServerCodegen.ParamPart(p, null); + pathParts.add(pp); + } + + List paramPathParts = pathParts.stream().filter(p -> p.isParam).collect(Collectors.toList()); + if (!paramPathParts.isEmpty()) { + final String lastParamName = paramPathParts.get(paramPathParts.size() - 1).name; + paramPathParts.forEach(p -> p.hasMoreParams = !p.name.equals(lastParamName)); + } + if (!pathParts.isEmpty()) { + pathParts.get(pathParts.size() - 1).hasMore = false; + } + + op.vendorExtensions.put("x-path-remaining", pathParts); + op.vendorExtensions.put("x-has-path-remaining", !paramPathParts.isEmpty()); + operations.add(op); + } + + public boolean contains(CodegenOperation op) { + return operations.contains(op); + } + + public void updateAnnotations() { + operations.forEach(op -> { + String annotation = op.vendorExtensions.get("x-annotation").toString(); + String conflicts = String.join(", ", operations.stream().map(o -> o.path).collect(Collectors.toList())); + op.vendorExtensions.put("x-annotation", "// conflicts with [" + conflicts + "] after" + pathPrefix + ", ignoring " + annotation); + }); + operations = operations.stream().sorted((a, b) -> a.pathParams.size() - b.pathParams.size()).collect(Collectors.toList()); + } + } + + + static List group(List operationList) { + Map groupedByPrefix = new HashMap<>(); + operationList.forEach(op -> { + String prefix = nonParamPathPrefix(op); + String key = op.httpMethod + " " + prefix; + if (!op.pathParams.isEmpty()) { + final ScalaCaskServerCodegen.OperationGroup group = groupedByPrefix.getOrDefault(key, new ScalaCaskServerCodegen.OperationGroup(op.httpMethod, prefix)); + group.add(op); + groupedByPrefix.put(key, group); + } + }); + return groupedByPrefix.values().stream().collect(Collectors.toList()); + } + + static String nonParamPathPrefix(CodegenOperation op) { + if (op.pathParams.isEmpty()) { + return op.path; + } + + final String firstParam = op.pathParams.stream().findFirst().get().paramName; + final int i = op.path.indexOf(firstParam); + final String path = chompSuffix(op.path.substring(0, i - 1), "/"); + return path; + } + + static List createRouteGroups(List operationList) { + + List groups = group(operationList); + operationList.forEach((op) -> { + // for the usage/call site + final String scalaPath = pathWithBracketPlaceholdersRemovedAndXPathIndexAdded(op); + op.vendorExtensions.put("x-cask-path", scalaPath); + + final String annotation = "@cask." + op.httpMethod.toLowerCase(Locale.ROOT); + op.vendorExtensions.put("x-annotation", annotation); + + for (final ScalaCaskServerCodegen.OperationGroup group : groups) { + if (!group.contains(op)) { + if (op.path.startsWith(group.pathPrefix) && op.httpMethod.equalsIgnoreCase(group.httpMethod)) { + group.add(op); + } + } + } + }); + + List trimmed = groups.stream().filter(g -> g.operations.size() > 1).map(g -> { + g.updateAnnotations(); + return g; + }).collect(Collectors.toList()); + return trimmed; + } + + @Override + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { + final Map operations = (Map) objs.get("operations"); + final List operationList = (List) operations.get("operation"); + + objs.put("route-groups", createRouteGroups(operationList)); + + operationList.forEach(ScalaCaskServerCodegen::postProcessOperation); + return objs; + } + + @Override + public ModelsMap postProcessModels(ModelsMap objs) { + objs.getModels().stream().map(ModelMap::getModel).forEach(this::postProcessModel); + return objs; + } + + private void setDefaultValueForCodegenProperty(CodegenProperty p) { + + if (p.defaultValue == null || p.defaultValue.trim().isEmpty()) { + if (p.getIsEnumOrRef()) { + p.defaultValue = "null"; + } else { + p.defaultValue = defaultValueNonOption(p); + } + } else if (p.defaultValue.contains("Seq.empty")) { + p.defaultValue = "Nil"; + } + } + + private void postProcessModel(CodegenModel model) { + model.getAllVars().forEach(this::setDefaultValueForCodegenProperty); + model.getVars().forEach(this::setDefaultValueForCodegenProperty); + + model.getVars().forEach(ScalaCaskServerCodegen::postProcessProperty); + model.getAllVars().forEach(ScalaCaskServerCodegen::postProcessProperty); + } + + private static void postProcessOperation(CodegenOperation op) { + // force http method to lower case + op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); + + /* Put in 'x-consumes-json' and 'x-consumes-xml' */ + op.vendorExtensions.put("x-consumes-json", consumesMimetype(op, "application/json")); + op.vendorExtensions.put("x-consumes-xml", consumesMimetype(op, "application/xml")); + + op.bodyParams.stream().filter((b) -> b.isBodyParam).forEach((p) -> { + p.vendorExtensions.put("x-consumes-json", consumesMimetype(op, "application/json")); + p.vendorExtensions.put("x-consumes-xml", consumesMimetype(op, "application/xml")); + }); + + /* put in 'x-container-type' to help with unmarshalling from json */ + op.allParams.forEach((p) -> p.vendorExtensions.put("x-container-type", containerType(p.dataType))); + op.bodyParams.forEach((p) -> p.vendorExtensions.put("x-container-type", containerType(p.dataType))); + + final String paramList = op.allParams.stream().map((p) -> p.paramName).collect(Collectors.joining(", ")); + op.vendorExtensions.put("x-param-list", paramList); + + final Stream typed = op.allParams.stream().map((p) -> p.paramName + " : " + asScalaDataType(p, p.required, false)); + op.vendorExtensions.put("x-param-list-typed", String.join(", ", typed.collect(Collectors.toList()))); + + final Stream typedJson = op.allParams.stream().map((p) -> p.paramName + " : " + asScalaDataType(p, p.required, true)); + op.vendorExtensions.put("x-param-list-typed-json", String.join(", ", typedJson.collect(Collectors.toList()))); + + // for the declaration site + op.vendorExtensions.put("x-cask-path-typed", routeArgs(op)); + op.vendorExtensions.put("x-query-args", queryArgs(op)); + + List responses = op.responses.stream().map(r -> r.dataType).filter(Objects::nonNull).collect(Collectors.toList()); + op.vendorExtensions.put("x-response-type", responses.isEmpty() ? "Unit" : String.join(" | ", responses)); + } + + private static void postProcessProperty(CodegenProperty p) { + p.vendorExtensions.put("x-datatype-model", asScalaDataType(p, p.required, false)); + p.vendorExtensions.put("x-defaultValue-model", defaultValue(p, p.required, p.defaultValue)); + String dataTypeData = asScalaDataType(p, p.required, true); + p.vendorExtensions.put("x-datatype-data", dataTypeData); + + + p.vendorExtensions.put("x-containertype-data", containerType(dataTypeData)); + + p.vendorExtensions.put("x-defaultValue-data", defaultValueNonOption(p, p.defaultValue)); + + // the 'asModel' logic for modelData.mustache + // + // if it's optional (not required), then wrap the value in Option() + // ... unless it's a map or array, in which case it can just be empty + // + p.vendorExtensions.put("x-wrap-in-optional", !p.required && !p.isArray && !p.isMap); + + // if it's an array or optional, we need to map it as a model -- unless it's a map, + // in which case we have to map the values + boolean hasItemModel = p.items != null && p.items.isModel; + boolean isObjectArray = p.isArray && hasItemModel; + boolean isOptionalObj = !p.required && p.isModel; + p.vendorExtensions.put("x-map-asModel", (isOptionalObj || isObjectArray) && !p.isMap); + + // when deserialising map objects, the logic is tricky. + p.vendorExtensions.put("x-deserialize-asModelMap", p.isMap && hasItemModel); + + // for some reason, an openapi spec with pattern field like this: + // pattern: '^[A-Za-z]+$' + // will result in the pattern property text of + // pattern: '/^[A-Za-z]+$/' + if (p.pattern != null && p.pattern.startsWith("/") && p.pattern.endsWith("/")) { + p.pattern = p.pattern.substring(1, p.pattern.length() - 1); + } + + } + + + /** + * Cask path params use the :pathParam syntax rather than the {pathParam} syntax + * + * @param op + * @return + */ + private static String pathWithBracketPlaceholdersRemovedAndXPathIndexAdded(CodegenOperation op) { + String[] items = op.path.split("/", -1); + String scalaPath = ""; + for (int i = 0; i < items.length; ++i) { + final String nextPart = hasBrackets(items[i]) ? ":" + chompBrackets(items[i]) : items[i]; + if (i != items.length - 1) { + scalaPath = scalaPath + nextPart + "/"; + } else { + scalaPath = scalaPath + nextPart; + } + } + return scalaPath; + } + + private static CodegenParameter pathParamForName(CodegenOperation op, String pathParam) { + final CodegenParameter param = op.pathParams.stream().filter(p -> p.paramName.equals(pathParam)).findFirst().get(); + if (param == null) { + throw new RuntimeException("Bug: path param " + pathParam + " not found"); + } + return param; + } + + /** + * The path placeholders as well as query parameters + * + * @param op the codegen operations + * @return a list of both the path and query parameters as typed arguments (e.g. "aPathArg : Int, request: cask.Request, aQueryArg : Option[Long]") + */ + private static String routeArgs(CodegenOperation op) { + final Stream pathParamNames = Arrays.stream(op.path.split("/", -1)).filter(ScalaCaskServerCodegen::hasBrackets).map(p -> { + final CodegenParameter param = pathParamForName(op, chompBrackets(p)); + return param.paramName + " : " + asScalaDataType(param, param.required, true); + }); + + + final List pathList = pathParamNames.collect(Collectors.toList()); + + // we always include the cask request + pathList.add("request: cask.Request"); + + final Stream queryParams = op.queryParams.stream().map(p -> { + p.vendorExtensions.put("x-default-value", defaultValue(p)); + return p.paramName + " : " + asScalaDataType(p, p.required, true, true); + }); + pathList.addAll(queryParams.collect(Collectors.toList())); + return pathList.isEmpty() ? "" : (String.join(", ", pathList)); + } + + private static String defaultValue(CodegenParameter p) { + return defaultValue(p, p.required, p.defaultValue); + } + + private static String defaultValue(IJsonSchemaValidationProperties p, boolean required, String fallbackDefaultValue) { + if (!required && !(p.getIsArray() || p.getIsMap())) { + return "None"; + } + return defaultValueNonOption(p, fallbackDefaultValue); + } + + private static String defaultValueNonOption(IJsonSchemaValidationProperties p, String fallbackDefaultValue) { + if (p.getIsArray()) { + if (p.getUniqueItems()) { + return "Set.empty"; + } + return "Nil"; + } + if (p.getIsMap()) { + return "Map.empty"; + } + if (p.getIsNumber()) { + return "0"; + } + if (p.getIsEnum()) { + return fallbackDefaultValue; + } + if (p.getIsBoolean()) { + return "false"; + } + if (p.getIsUuid()) { + return "java.util.UUID.randomUUID()"; + } + if (p.getIsString()) { + return "\"\""; + } + return fallbackDefaultValue; + } + + private static String defaultValueNonOption(CodegenProperty p) { + if (p.getIsArray()) { + return "Nil"; + } + if (p.getIsMap()) { + return "Map.empty"; + } + if (p.isNumber || p.isNumeric) { + return "0"; + } + if (p.isBoolean) { + return "false"; + } + if (p.isUuid) { + return "java.util.UUID.randomUUID()"; + } + if (p.isModel) { + return "null"; + } + if (p.isDate || p.isDateTime) { + return "null"; + } + if (p.isString) { + return "\"\""; + } + return p.defaultValue; + } + + private static String queryArgs(final CodegenOperation op) { + final List list = op.queryParams.stream().map(p -> p.paramName).collect(Collectors.toList()); + final String prefix = list.isEmpty() ? "" : ", "; + return prefix + String.join(", ", list); + } + + /** + * For our model classes, we have two variants: + *

+ * 1) a {model}.scala one which is a validated, model class + * 2) a {model}Data.scala one which is just our data-transfer-object (DTO) which is written primarily for e.g. json serialisation + *

+ * The data variant can have nulls and other non-scala things, but they know how to create validated model objects. + *

+ * This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data varients. + *

+ * e.g. consider this example: + * ``` + * case class Foo(bar : Bar, bazz :List[Bazz]) + * case class Bar(x : Option[String] = None) + * case class Bazz(y : Int) + *

+ * // vs + *

+ * case class FooData(bar : BarData, bazz :List[BazzData]) + * case class BarData(x : String = "") + * case class BazzData(y : Int) + * ``` + */ + private static String asScalaDataType(final IJsonSchemaValidationProperties param, boolean required, boolean useJason) { + return asScalaDataType(param, required, useJason, !useJason); + } + + private static String asScalaDataType(final IJsonSchemaValidationProperties param, boolean required, boolean useJason, boolean allowOptional) { + String dataType = (param.getIsModel() && useJason) ? param.getDataType() + "Data" : param.getDataType(); + + final String dataSuffix = useJason && param.getItems() != null && param.getItems().getIsModel() ? "Data" : ""; + if (dataType.startsWith("List[")) { + dataType = dataType.replace("List[", "Seq["); + dataType = dataType.replace("]", dataSuffix + "]"); + } else if (dataType.startsWith("Set[")) { + dataType = dataType.replace("]", dataSuffix + "]"); + } else if (!required && allowOptional) { + dataType = "Option[" + dataType + "]"; + } + return dataType; + } + + private static String chompBrackets(String str) { + return str.replace("{", "").replace("}", ""); + } + + private static String chompSuffix(String str, String suffix) { + return str.endsWith(suffix) ? chompSuffix(str.substring(0, str.length() - suffix.length()), suffix) : str; + } + + private static boolean hasBrackets(String str) { + return str.matches("^\\{(.*)\\}$"); + } + + static String containerType(String dataType) { + String fixedForList = dataType.replaceAll(".*\\[(.*)\\]", "$1"); + + // if it is a map, we want the value type + final String[] parts = fixedForList.split(","); + return parts[parts.length - 1]; + } +} 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 124ce49c1aee..b44c75f12700 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 @@ -28,7 +28,6 @@ import io.swagger.v3.oas.models.PathItem; import io.swagger.v3.oas.models.media.MediaType; import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.tags.Tag; import java.io.File; @@ -1168,66 +1167,19 @@ public CodegenModel fromModel(String name, Schema model) { return codegenModel; } - /** - * Analyse and post process all Models. - * Add parentVars to every Model which has a parent. This allows to generate - * fluent setter methods for inherited properties. - * @param objs the models map. - * @return the processed models map. - */ @Override - public Map postProcessAllModels(Map objs) { - objs = super.postProcessAllModels(objs); - objs = super.updateAllModels(objs); - - for (ModelsMap modelsAttrs : objs.values()) { - for (ModelMap mo : modelsAttrs.getModels()) { - CodegenModel codegenModel = mo.getModel(); - Set inheritedImports = new HashSet<>(); - Map propertyHash = new HashMap<>(codegenModel.vars.size()); - for (final CodegenProperty property : codegenModel.vars) { - propertyHash.put(property.name, property); - } - CodegenModel parentCodegenModel = codegenModel.parentModel; - while (parentCodegenModel != null) { - for (final CodegenProperty property : parentCodegenModel.vars) { - // helper list of parentVars simplifies templating - if (!propertyHash.containsKey(property.name)) { - propertyHash.put(property.name, property); - final CodegenProperty parentVar = property.clone(); - parentVar.isInherited = true; - LOGGER.info("adding parent variable {}", property.name); - codegenModel.parentVars.add(parentVar); - Set imports = parentVar.getImports(true, this.importBaseType, generatorMetadata.getFeatureSet()).stream().filter(Objects::nonNull).collect(Collectors.toSet()); - for (String imp: imports) { - // Avoid dupes - if (!codegenModel.getImports().contains(imp)) { - inheritedImports.add(imp); - codegenModel.getImports().add(imp); - } - } - } - } - parentCodegenModel = parentCodegenModel.getParentModel(); - } - if (codegenModel.getParentModel() != null) { - codegenModel.parentRequiredVars = new ArrayList<>(codegenModel.getParentModel().requiredVars); - } - // There must be a better way ... - for (String imp: inheritedImports) { - String qimp = importMapping().get(imp); - if (qimp != null) { - Map toAdd = new HashMap<>(); - toAdd.put("import", qimp); - modelsAttrs.getImports().add(toAdd); - } - } - } + protected boolean isConstructorWithAllArgsAllowed(CodegenModel codegenModel) { + if (lombokAnnotations != null && lombokAnnotations.containsKey("allArgsConstructor")) { + // constructor generated by lombok + return false; } - return objs; + if ((!generatedConstructorWithRequiredArgs && !codegenModel.vars.isEmpty() ) + || !codegenModel.optionalVars.isEmpty()) { + return super.isConstructorWithAllArgsAllowed(codegenModel); + } + return false; } - /* * Add dynamic imports based on the parameters and vendor extensions of an operation. * The imports are expanded by the mustache {{import}} tag available to model and api diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index de5b7013775b..bbaf74bf4245 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -460,7 +460,7 @@ public static boolean isObjectSchema(Schema schema) { return (schema instanceof ObjectSchema) || // must not be a map - (SchemaTypeUtil.OBJECT_TYPE.equals(schema.getType()) && !(schema instanceof MapSchema)) || + (SchemaTypeUtil.OBJECT_TYPE.equals(schema.getType()) && !(ModelUtils.isMapSchema(schema))) || // must have at least one property (schema.getType() == null && schema.getProperties() != null && !schema.getProperties().isEmpty()); } @@ -509,10 +509,6 @@ public static boolean isComposedSchema(Schema schema) { * @return true if the specified schema is a Composed schema. */ public static boolean isComplexComposedSchema(Schema schema) { - if (!(schema instanceof ComposedSchema)) { - return false; - } - int count = 0; if (schema.getAllOf() != null && !schema.getAllOf().isEmpty()) { @@ -2130,6 +2126,25 @@ public static boolean hasAnyOf(Schema schema) { return false; } + /** + * Returns schema type. + * For 3.1 spec, return the first one. + * + * @param schema the schema + * @return schema type + */ + public static String getType(Schema schema) { + if (schema == null) { + return null; + } + + if (schema instanceof JsonSchema) { + return String.valueOf(schema.getTypes().iterator().next()); + } else { + return schema.getType(); + } + } + /** * Returns true if any of the common attributes of the schema (e.g. readOnly, default, maximum, etc) is defined. * diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index e198fdf720bf..7255bd4cf5f5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -204,7 +204,7 @@ public class {{classname}} { try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef<{{{returnType}}}>()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -274,7 +274,7 @@ public class {{classname}} { localVarResponse.statusCode(), localVarResponse.headers().map(), {{#returnType}} - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef<{{{returnType}}}>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}) // closes the InputStream {{/returnType}} {{^returnType}} null @@ -317,7 +317,7 @@ public class {{classname}} { new ApiResponse<{{{returnType}}}>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef<{{{returnType}}}>())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -540,6 +540,7 @@ public class {{classname}} { } return localVarRequestBuilder; } + {{#vendorExtensions.x-group-parameters}} {{#hasParams}} @@ -588,9 +589,6 @@ public class {{classname}} { } } - {{>generatedAnnotation}} - private static final class GenericTypeRef extends TypeReference {} - {{/hasParams}} {{/vendorExtensions.x-group-parameters}} {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache index b031a2404941..53dddf3269cd 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache @@ -652,6 +652,29 @@ public class ApiClient { throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + {{#withAWSV4Signature}} + for (Authentication auth : authentications.values()) { + if (auth instanceof AWS4Auth) { + ((AWS4Auth) auth).setCredentials(accessKey, secretKey, sessionToken); + ((AWS4Auth) auth).setRegion(region); + ((AWS4Auth) auth).setService(service); + return; + } + } + {{/withAWSV4Signature}} + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/AWS4Auth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/AWS4Auth.mustache index a9ee5ff646c8..24bfb4c1f91a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/AWS4Auth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/auth/AWS4Auth.mustache @@ -16,6 +16,7 @@ import java.util.stream.Collectors; import software.amazon.awssdk.auth.credentials.AnonymousCredentialsProvider; import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; +import software.amazon.awssdk.auth.credentials.AwsSessionCredentials; import software.amazon.awssdk.auth.credentials.AwsCredentials; import software.amazon.awssdk.auth.signer.Aws4Signer; import software.amazon.awssdk.auth.signer.params.Aws4SignerParams; @@ -41,6 +42,10 @@ public class AWS4Auth implements Authentication { this.credentials = AwsBasicCredentials.create(accessKey, secretKey); } + public void setCredentials(String accessKey, String secretKey, String sessionToken) { + this.credentials = AwsSessionCredentials.create(accessKey, secretKey, sessionToken); + } + public void setRegion(String region) { this.region = region; } diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache index ebf0883d4f3c..c02a76d07dd0 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache @@ -83,18 +83,18 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/vendorExtensions.x-field-extra-annotation}} {{#vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} - private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); {{/isContainer}} {{^isContainer}} - private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} {{#isContainer}} - private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} {{^isContainer}} - {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -114,7 +114,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens } {{#vendorExtensions.x-has-readonly-properties}} {{^withXml}} - + /** + * Constructor with only readonly parameters{{#generatedConstructorWithAllArgs}}{{^vendorExtensions.generatedConstructorWithAllArgs}} and all parameters{{/vendorExtensions.generatedConstructorWithAllArgs}}{{/generatedConstructorWithAllArgs}} + */ {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} public {{classname}}( {{#readOnlyVars}} @@ -128,8 +130,22 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens } {{/withXml}} {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.generatedConstructorWithAllArgs}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.allArgsConstructorVars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.allArgsConstructorVars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.generatedConstructorWithAllArgs}} +{{#vars}} {{^isReadOnly}} public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -279,7 +295,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/vars}} {{#parent}} - {{#allVars}} + {{#readWriteVars}} {{#isOverridden}} @Override public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { @@ -293,7 +309,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens } {{/isOverridden}} - {{/allVars}} + {{/readWriteVars}} {{/parent}} @Override public boolean equals(Object o) { diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index bb230120be8a..60cf035c1d74 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -105,7 +105,7 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}} {{/lombok.NoArgsConstructor}} /** - * Constructor with only required parameters + * Constructor with only required parameters{{#generatedConstructorWithAllArgs}}{{^vendorExtensions.generatedConstructorWithAllArgs}} and all parameters{{/vendorExtensions.generatedConstructorWithAllArgs}}{{/generatedConstructorWithAllArgs}} */ public {{classname}}({{#requiredVars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/requiredVars}}) { {{#parent}} @@ -125,6 +125,25 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}} {{/hasRequired}} {{/generatedConstructorWithRequiredArgs}} {{/lombok.RequiredArgsConstructor}} + {{#vendorExtensions.generatedConstructorWithAllArgs}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.allArgsConstructorVars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.allArgsConstructorVars}}) { + {{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); + {{/parent}} + {{#vars}} + {{#openApiNullable}} + this.{{name}} = {{#isNullable}}JsonNullable.of({{/isNullable}}{{#useOptional}}{{^required}}{{^isNullable}}{{^isContainer}}Optional.ofNullable({{/isContainer}}{{/isNullable}}{{/required}}{{/useOptional}}{{name}}{{#isNullable}}){{/isNullable}}{{#useOptional}}{{^required}}{{^isNullable}}{{^isContainer}}){{/isContainer}}{{/isNullable}}{{/required}}{{/useOptional}}; + {{/openApiNullable}} + {{^openApiNullable}} + this.{{name}} = {{name}}; + {{/openApiNullable}} + {{/vars}} + } + {{/vendorExtensions.generatedConstructorWithAllArgs}} {{/lombok.Data}} {{#vars}} {{^lombok.Data}} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 11c50f7c1703..9849aa702f36 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -115,6 +115,7 @@ org.openapitools.codegen.languages.RustClientCodegen org.openapitools.codegen.languages.RustServerCodegen org.openapitools.codegen.languages.ScalatraServerCodegen org.openapitools.codegen.languages.ScalaAkkaClientCodegen +org.openapitools.codegen.languages.ScalaCaskServerCodegen org.openapitools.codegen.languages.ScalaPekkoClientCodegen org.openapitools.codegen.languages.ScalaAkkaHttpServerCodegen org.openapitools.codegen.languages.ScalaFinchServerCodegen diff --git a/modules/openapi-generator/src/main/resources/go/model_simple.mustache b/modules/openapi-generator/src/main/resources/go/model_simple.mustache index f5a6b6c53ef4..48c6a81c23ad 100644 --- a/modules/openapi-generator/src/main/resources/go/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_simple.mustache @@ -3,16 +3,14 @@ var _ MappedNullable = &{{classname}}{} // {{classname}} {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} type {{classname}} struct { -{{#parent}} -{{^isMap}} +{{#parentModel.name}} {{^isArray}} - {{{parent}}} + {{{parentModel.name}}} {{/isArray}} -{{/isMap}} {{#isArray}} - Items {{{parent}}} + Items {{{parentModel.name}}} {{/isArray}} -{{/parent}} +{{/parentModel.name}} {{#vars}} {{^-first}} {{/-first}} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache index 65c210b79292..2865781b099c 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache @@ -445,48 +445,49 @@

- {{#schema}} -
-
- -
- + var view = new JSONSchemaView(schema, 3); + $('#responses-{{baseName}}-{{nickname}}-{{code}}-schema-data').val(JSON.stringify(schema)); + var result = $('#responses-{{baseName}}-{{nickname}}-schema-{{code}}'); + result.empty(); + result.append(view.render()); + }); +
- {{#examples}} -
-
{{example}}
-
- {{/examples}} - {{/schema}} + +
+ {{#examples}} +
+
{{example}}
+
+ {{/examples}} {{#hasHeaders}}
diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache index 8c8b10a39343..b48c1b911ecb 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache @@ -377,7 +377,6 @@ class ObjectSerializer * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[]|null $httpHeaders HTTP headers - * @param string|null $discriminator discriminator if polymorphism is used * * @return mixed a single or an array of $class instances */ diff --git a/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache b/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache index b74fa68699ca..455b5586ef7a 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache @@ -92,7 +92,7 @@ class Controller extends AbstractController $json = $this->exceptionToArray($exception); $json['statusCode'] = $statusCode; - return new Response(json_encode($json, 15, 512), $statusCode, $headers); + return new Response(json_encode($json, 15), $statusCode, $headers); } /** @@ -219,7 +219,7 @@ class Controller extends AbstractController public static function isContentTypeAllowed(Request $request, array $consumes = []): bool { if (!empty($consumes) && $consumes[0] !== '*/*') { - $currentFormat = $request->getContentType(); + $currentFormat = $request->getContentTypeFormat(); foreach ($consumes as $mimeType) { // canonize mime type if (is_string($mimeType) && false !== $pos = strpos($mimeType, ';')) { @@ -230,7 +230,7 @@ class Controller extends AbstractController // add custom format to request $format = $mimeType; $request->setFormat($format, $format); - $currentFormat = $request->getContentType(); + $currentFormat = $request->getContentTypeFormat(); } if ($format === $currentFormat) { diff --git a/modules/openapi-generator/src/main/resources/php-symfony/api_controller.mustache b/modules/openapi-generator/src/main/resources/php-symfony/api_controller.mustache index 715374267713..9dd5c4ef18ab 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/api_controller.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/api_controller.mustache @@ -101,6 +101,10 @@ class {{controllerName}} extends Controller // HTTP basic authentication required $security{{name}} = $request->headers->get('authorization'); {{/isBasicBasic}} + {{#isBasicBearer}} + // HTTP bearer authentication required + $security{{name}} = $request->headers->get('authorization'); + {{/isBasicBearer}} {{#isOAuth}} // Oauth required $security{{name}} = $request->headers->get('authorization'); @@ -148,7 +152,7 @@ class {{controllerName}} extends Controller {{#allParams}} {{^isFile}} {{#isBodyParam}} - $inputFormat = $request->getMimeType($request->getContentType()); + $inputFormat = $request->getMimeType($request->getContentTypeFormat()); ${{paramName}} = $this->deserialize(${{paramName}}, '{{#isContainer}}{{#items}}array<{{dataType}}>{{/items}}{{/isContainer}}{{^isContainer}}{{#isEnumRef}}\{{modelPackage}}\{{dataType}}{{/isEnumRef}}{{^isEnumRef}}{{dataType}}{{/isEnumRef}}{{/isContainer}}', $inputFormat); {{/isBodyParam}} {{^isBodyParam}} @@ -178,17 +182,12 @@ class {{controllerName}} extends Controller {{#returnType}}$result = {{/returnType}}$handler->{{operationId}}({{#allParams}}${{paramName}}, {{/allParams}}$responseCode, $responseHeaders); - // Find default response message - $message = '{{#responses}}{{#isDefault}}{{message}}{{/isDefault}}{{/responses}}'; - - // Find a more specific message, if available - switch ($responseCode) { + $message = match($responseCode) { {{#responses}} - case {{code}}: - $message = '{{message}}'; - break; + {{code}} => '{{message}}', {{/responses}} - } + default => '{{#responses}}{{#isDefault}}{{message}}{{/isDefault}}{{/responses}}', + }; return new Response( {{#returnType}}$result !== null ?$this->serialize($result, $responseFormat):''{{/returnType}}{{^returnType}}''{{/returnType}}, diff --git a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache index 2e66acfed8dd..026bd4fb3acb 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache @@ -24,19 +24,19 @@ } ], "require": { - "php": ">=7.4.0|>=8.0.2", + "php": ">=8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "symfony/validator": "^5.0|^6.0", - "jms/serializer-bundle": "^4.0", - "symfony/framework-bundle": "^5.0|^6.0" + "symfony/validator": "^6.4|^7.0", + "jms/serializer-bundle": "^5.4", + "symfony/framework-bundle": "^6.4|^7.0" }, "require-dev": { - "phpunit/phpunit": "^9.5", - "friendsofphp/php-cs-fixer": "^2.16.3", - "symfony/browser-kit": "^5.0|^6.0", - "symfony/yaml": "^5.0|^6.0", + "phpunit/phpunit": "^10.5|^11.0", + "friendsofphp/php-cs-fixer": "*", + "symfony/browser-kit": "^6.4|7.0", + "symfony/yaml": "^6.4|^7.0", "hoa/regex": "~1.0" }, "autoload": { diff --git a/modules/openapi-generator/src/main/resources/php-symfony/serialization/JmsSerializer.mustache b/modules/openapi-generator/src/main/resources/php-symfony/serialization/JmsSerializer.mustache index 62f167951e1e..e5ff50c3f7fe 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/serialization/JmsSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/serialization/JmsSerializer.mustache @@ -47,14 +47,11 @@ class JmsSerializer implements SerializerInterface private function convertFormat(string $format): ?string { - switch ($format) { - case 'application/json': - return 'json'; - case 'application/xml': - return 'xml'; - } - - return null; + return match($format) { + 'application/json' => 'json', + 'application/xml' => 'xml', + default => null, + }; } private function deserializeString($data, string $type) @@ -132,22 +129,13 @@ class JmsSerializer implements SerializerInterface } // Parse the string using the correct separator - switch ($format) { - case 'csv': - $data = explode(',', $data); - break; - case 'ssv': - $data = explode(' ', $data); - break; - case 'tsv': - $data = explode("\t", $data); - break; - case 'pipes': - $data = explode('|', $data); - break; - default; - $data = []; - } + $data = match($format) { + 'csv' => explode(',', $data), + 'ssv' => explode(' ', $data), + 'tsv' => explode("\t", $data), + 'pipes' => explode('|', $data), + default => [], + }; // Deserialize each of the array elements foreach ($data as $key => $item) { diff --git a/modules/openapi-generator/src/main/resources/php-symfony/testing/ControllerTest.mustache b/modules/openapi-generator/src/main/resources/php-symfony/testing/ControllerTest.mustache index e4d5039db846..ac285dd0fca8 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/testing/ControllerTest.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/testing/ControllerTest.mustache @@ -55,7 +55,7 @@ class ControllerTest extends TestCase ); } - public function dataProviderIsContentTypeAllowed(): array + public static function dataProviderIsContentTypeAllowed(): array { return [ 'usual JSON content type' => [ diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index 938e213aabb0..6fe5101c306a 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -387,7 +387,6 @@ class ObjectSerializer * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used * * @return object|array|null a single or an array of $class instances */ diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/model_doc.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/model_doc.mustache index deb49f248848..1a745348960a 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/model_doc.mustache @@ -26,7 +26,7 @@ print {{classname}}.to_json() # convert the object into a dict {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict = {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_instance.to_dict() # create an instance of {{classname}} from a dict -{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_form_dict = {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict) +{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_from_dict = {{classname}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict) ``` {{/isEnum}} [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache index d8e19d7ac0f3..f33ba924deca 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache @@ -5,7 +5,7 @@ async-generator==1.10 certifi==2023.7.22 chardet==4.0.0 click==7.1.2 -dnspython==2.1.0 +dnspython==2.6.1 email-validator==2.0.0 fastapi==0.109.2 graphene==2.1.8 @@ -14,7 +14,7 @@ graphql-relay==2.0.1 h11==0.12.0 httptools==0.1.2 httpx==0.24.1 -idna==2.10 +idna==3.7 itsdangerous==1.1.0 Jinja2==2.11.3 MarkupSafe==2.0.1 diff --git a/modules/openapi-generator/src/main/resources/python-pydantic-v1/model_doc.mustache b/modules/openapi-generator/src/main/resources/python-pydantic-v1/model_doc.mustache index dd54470b3be5..1f8d55555f73 100644 --- a/modules/openapi-generator/src/main/resources/python-pydantic-v1/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python-pydantic-v1/model_doc.mustache @@ -25,7 +25,7 @@ print {{classname}}.to_json() # convert the object into a dict {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict = {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_instance.to_dict() # create an instance of {{classname}} from a dict -{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_form_dict = {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict) +{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_from_dict = {{classname}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict) ``` {{/isEnum}} [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 67395798dde6..97b8f8d84c72 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -358,6 +358,8 @@ class ApiClient: """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value elif isinstance(obj, SecretStr): return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): diff --git a/modules/openapi-generator/src/main/resources/python/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/model_doc.mustache index eff8f21e3e0b..6099ddf1954a 100644 --- a/modules/openapi-generator/src/main/resources/python/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_doc.mustache @@ -26,7 +26,7 @@ print({{classname}}.to_json()) # convert the object into a dict {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict = {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_instance.to_dict() # create an instance of {{classname}} from a dict -{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_form_dict = {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict) +{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_from_dict = {{classname}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict) ``` {{/isEnum}} [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/modules/openapi-generator/src/main/resources/rust-axum/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust-axum/Cargo.mustache index d313de7116bb..47bdeba6b61c 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/Cargo.mustache @@ -42,7 +42,7 @@ conversion = [ async-trait = "0.1" axum = { version = "0.7" } axum-extra = { version = "0.9", features = ["cookie", "multipart"] } -base64 = "0.21" +base64 = "0.22" bytes = "1" chrono = { version = "0.4", features = ["serde"] } frunk = { version = "0.4", optional = true } @@ -62,7 +62,7 @@ tokio = { version = "1", default-features = false, features = [ ] } tracing = { version = "0.1", features = ["attributes"] } uuid = { version = "1", features = ["serde"] } -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache b/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache index ef07e5afa963..d96088f86a4a 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache @@ -1,5 +1,13 @@ -#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] -#![allow(unused_imports, unused_attributes)] +#![allow( + missing_docs, + trivial_casts, + unused_variables, + unused_mut, + unused_extern_crates, + non_camel_case_types, + unused_imports, + unused_attributes +)] #![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; diff --git a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache index f4760d0a9b71..44ed4ed6bf4b 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache @@ -36,10 +36,10 @@ use crate::{models, types::*}; {{/maxLength}} {{#pattern}} {{^isByteArray}} - regex = "RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.uppercase}}", + regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.uppercase}}), {{/isByteArray}} {{#isByteArray}} - custom ="validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.lowercase}}" + custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.lowercase}}"), {{/isByteArray}} {{/pattern}} {{#maximum}} @@ -128,10 +128,10 @@ use crate::{models, types::*}; {{/maxLength}} {{#pattern}} {{^isByteArray}} - regex = "RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.uppercase}}", + regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.uppercase}}), {{/isByteArray}} {{#isByteArray}} - custom ="validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.lowercase}}" + custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.lowercase}}"), {{/isByteArray}} {{/pattern}} {{#maximum}} @@ -232,10 +232,10 @@ use crate::{models, types::*}; {{/maxLength}} {{#pattern}} {{^isByteArray}} - regex = "RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.uppercase}}", + regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.uppercase}}), {{/isByteArray}} {{#isByteArray}} - custom ="validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.lowercase}}" + custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.lowercase}}"), {{/isByteArray}} {{/pattern}} {{#maximum}} @@ -639,10 +639,10 @@ pub struct {{{classname}}} { {{/maxLength}} {{#pattern}} {{^isByteArray}} - regex = "RE_{{#lambda.uppercase}}{{{classname}}}_{{{name}}}{{/lambda.uppercase}}", + regex(path = *RE_{{#lambda.uppercase}}{{{classname}}}_{{{name}}}{{/lambda.uppercase}}), {{/isByteArray}} {{#isByteArray}} - custom ="validate_byte_{{#lambda.lowercase}}{{{classname}}}_{{{name}}}{{/lambda.lowercase}}" + custom(function = "validate_byte_{{#lambda.lowercase}}{{{classname}}}_{{{name}}}{{/lambda.lowercase}}"), {{/isByteArray}} {{/pattern}} {{#maximum}} diff --git a/modules/openapi-generator/src/main/resources/rust-axum/server-operation-validate.mustache b/modules/openapi-generator/src/main/resources/rust-axum/server-operation-validate.mustache index 6bacec901701..54a0ab28e35a 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/server-operation-validate.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/server-operation-validate.mustache @@ -22,10 +22,10 @@ {{/maxLength}} {{#pattern}} {{#isString}} - regex = "RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}", + regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}), {{/isString}} {{^isString}} - custom ="validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.lowercase}}", + custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.lowercase}}"), {{/isString}} {{/pattern}} {{#maximum}} @@ -59,7 +59,7 @@ {{^x-consumes-plain-text}} {{^hasValidation}} {{^isMap}} - #[validate] + #[validate(nested)] {{/isMap}} {{/hasValidation}} body: &'a {{{dataType}}}, @@ -218,4 +218,4 @@ Ok(( {{/x-consumes-multipart}} {{/x-consumes-multipart-related}} )) -} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/.scalafmt.conf.mustache b/modules/openapi-generator/src/main/resources/scala-cask/.scalafmt.conf.mustache new file mode 100644 index 000000000000..e150d4c409d2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/.scalafmt.conf.mustache @@ -0,0 +1,4 @@ +version = 3.6.1 +align.preset = more // For pretty alignment. +maxColumn = 100 +runner.dialect = scala3 \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/Dockerfile.mustache b/modules/openapi-generator/src/main/resources/scala-cask/Dockerfile.mustache new file mode 100644 index 000000000000..0c5487539733 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/Dockerfile.mustache @@ -0,0 +1,13 @@ +FROM virtuslab/scala-cli:latest as build +WORKDIR /app +COPY ./Server.scala /app/ +# note: this assumes a published server stub jar. +# If you've published this locally, you would need to copy those into this image, +# perhaps by using coursier fetch +RUN scala-cli --power package /app/Server.scala --assembly -o app.jar + +# The main image +FROM openjdk:23-slim +WORKDIR /app +COPY --from=build /app/app.jar /app/ +ENTRYPOINT ["java", "-jar", "/app/app.jar"] diff --git a/modules/openapi-generator/src/main/resources/scala-cask/README.mustache b/modules/openapi-generator/src/main/resources/scala-cask/README.mustache new file mode 100644 index 000000000000..39e65480193a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/README.mustache @@ -0,0 +1,96 @@ +# REST Service + +This project contains the data models and REST services, generated from the [openapi-generator](https://github.com/OpenAPITools/openapi-generator) project. + +The server implementation is based on Li's excellent [cask](https://com-lihaoyi.github.io/cask/) library. + +# How to use this code + +This code was designed so that it can be packaged up and semantically-versioned alongside your open-api schema. + +That approach supports having separate "contract" repositories for microservice projects, where the pipeline for the +contract repo might produce versioned jar artefacts which can then easily be brought in / referenced by a separate service project which simply +implements the business logic. + +You can read more about this approach [here](https://github.com/kindservices/contract-first-rest) + +# How to implement your business logic +There are a few options for using this code/applying your business logic for the services. + +## Option 1 (preferred): Package and publish this boilerplate +Typically, OpenApi templates are written to generate code which co-exists alongside the handwritten business logic. + +While that works, it's also not ideal: + * You have to ensure the generated code isn't checked in + * Team members, build pipelines, etc all have to regenerate and recompile the same boilerplate code over and over + * People can encounter IDE issues with generated code + +Instead, you have the option of simply packaging/publishing this generated code, and then allowing service implementations +to simply bring in the published code as a dependency. + +The steps to do that are: + +### Build/Publish +This project is built using [sbt](https://www.scala-sbt.org/download/), so you can run `sbt publish` (or `sbt publishLocal`) + +Or, for a zero-install docker build: +```bash +docker run -it --rm -v $(pwd):/app -w /app sbtscala/scala-sbt:eclipse-temurin-17.0.4_1.7.1_3.2.0 sbt publishLocal +``` + +### Create a new separate implementation project +Once published, you can create your server implementation in a new, clean, separate project based on [the example](./example) + +This means all the boilerplate endpoint and model code is brought in as "just another jar", and you're free to +create a greenfield project in whatever language (scala, java, kotlin) and build system of your choosing. + +We show a simple, minimalistic example of a starting point in [the example project](./example) + +## Option 2: Extend this generated example +You can configure this project (for instance, setting up your own .gitignore rules and scripts) to leave the generated code as-is +and provide your implementation alongside the generated code. + +The place to start is by providing your own implementation of the Services defined in the `api` package - +perhaps by creating your 'MyService.scala' code in a new `impl` package. + +You then have several options for how to wire those in: + +1) Create a new BaseApp instance to create your own Main entry point +Follow the pattern in App.scala, but by passing your own implementations to BaseApp, +ensuring you call `start` to start the server + +```bash +@main def run() = BaseApp(/* your services here/*).start() +``` + +2) Extend either BaseApp class or mix in the AppRoutes trait +You can create your own main entry point with further control of the main cask app by extending +the BaseApp or otherwise creating your own CaskApp which mixes in the AppRoutes + +```bash +object MyApp extends BaseApp(/* your services here/*) { + // any overrides, new routes, etc here + start() +} +``` + + +# Customising the generated code + +A typical config.yml used to alter the generated code may look like this: +``` +groupId: "ex.amp.le" +artifactId: "pets-test" +apiPackage: "ex.ample.api" +modelPackage: "ex.ample.model" +``` + +Which you would then pass to the generator like this: +``` +docker run --rm \ +-v ${PWD}:/local openapitools/openapi-generator-cli generate \ +-i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.yaml \ +-g scala-cask \ +-c /local/config.yml \ +-o /local/path/to/output_dir +``` diff --git a/modules/openapi-generator/src/main/resources/scala-cask/api.mustache b/modules/openapi-generator/src/main/resources/scala-cask/api.mustache new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/modules/openapi-generator/src/main/resources/scala-cask/apiPackage.mustache b/modules/openapi-generator/src/main/resources/scala-cask/apiPackage.mustache new file mode 100644 index 000000000000..6acc47b31000 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/apiPackage.mustache @@ -0,0 +1,155 @@ +{{>licenseInfo}} +package {{apiPackage}} + + +import cask.FormEntry +import io.undertow.server.handlers.form.{FormData, FormParserFactory} + +import java.io.File +import scala.jdk.CollectionConverters.* +import java.time.LocalDate +import java.util.UUID +import scala.reflect.ClassTag +import scala.util.* + +// needed for BigDecimal params +given cask.endpoints.QueryParamReader.SimpleParam[BigDecimal](BigDecimal.apply) + +// a parsed value from an HTTP request +opaque type Parsed[A] = Either[String, A] + +object Parsed { + def apply[A](value: A): Parsed[A] = Right(value) + + def eval[A](value: => A): Parsed[A] = Try(value) match { + case Failure(exp) => Left(s"Error: ${exp.getMessage}") + case Success(ok) => Right(ok) + } + + def fromTry[A](value : Try[A]) = value match { + case Failure(err) => Left(err.getMessage) + case Success(ok) => Right(ok) + } + + def fail[A](msg: String): Parsed[A] = Left(msg) + + def optionalValue(map: Map[String, collection.Seq[String]], key: String): Parsed[Option[String]] = { + map.get(key) match { + case Some(Seq(only: String)) => Parsed(Option(only)) + case Some(Seq()) => Parsed(None) + case Some(many) => Parsed.fail(s"${many.size} values set for '$key'") + case None => Parsed(None) + } + } + + def singleValue(map: Map[String, collection.Seq[String]], key : String): Parsed[String] = { + map.get(key) match { + case Some(Seq(only : String)) => Parsed(only) + case Some(Seq()) => Parsed("") + case Some(many) => Parsed.fail(s"${many.size} values set for '$key'") + case None => Parsed.fail(s"required '$key' was not set") + } + } + + def manyValues(map: Map[String, collection.Seq[String]], key : String, required: Boolean): Parsed[List[String]] = { + map.get(key) match { + case Some(many) => Parsed(many.toList) + case None if required => Parsed.fail(s"required '$key' was not set") + case None => Parsed(Nil) + } + } +} + +extension[A] (parsed: Parsed[A]) { + def toEither: Either[String, A] = parsed + + def asLong(using ev : A =:= String): Parsed[Long] = as[Long](_.toLongOption) + def asBoolean(using ev : A =:= String): Parsed[Boolean] = as[Boolean](_.toBooleanOption) + def asInt(using ev : A =:= String): Parsed[Int] = as[Int](_.toIntOption) + def asByte(using ev : A =:= String): Parsed[Byte] = as[Byte](_.toByteOption) + def asUuid(using ev : A =:= String): Parsed[UUID] = as[UUID](x => Try(UUID.fromString(x)).toOption) + def asFloat(using ev : A =:= String): Parsed[Float] = as[Float](_.toFloatOption) + def asDouble(using ev : A =:= String): Parsed[Double] = as[Double](_.toDoubleOption) + def asDate(using ev: A =:= String): Parsed[LocalDate] = as[LocalDate](x => Try(LocalDate.parse(x)).toOption) + + private def as[B : ClassTag](f : String => Option[B])(using ev : A =:= String): Parsed[B] = parsed.flatMap { str => + f(ev(str)) match { + case None => Parsed.fail(s"'$str' cannot be parsed as a ${implicitly[ClassTag[B]].runtimeClass}") + case Some(x) => Parsed(x) + } + } + + + def mapError(f : String => String) : Parsed[A] = parsed match { + case Left(msg) => Left(f(msg)) + case right => right + } + + def map[B](f: A => B): Parsed[B] = parsed match { + case Right(value) => Right(f(value)) + case Left(err) => Left(err) + } + def flatMap[B](f : A => Parsed[B]): Parsed[B] = parsed match { + case Right(value) => f(value) + case Left(err) => Left(err) + } +} + + +extension (request: cask.Request) { + + def formSingleValueRequired(paramName: String): Parsed[String] = { + val data = formDataForKey(paramName).map(_.getValue).toSeq + Parsed.singleValue(Map(paramName -> data), paramName) + } + def formSingleValueOptional(paramName: String): Parsed[Option[String]] = { + val data = formDataForKey(paramName).map(_.getValue).toSeq + Parsed.optionalValue(Map(paramName -> data), paramName) + } + + def formValueAsFileOptional(paramName: String): Parsed[Option[File]] = { + val data = formDataForKey(paramName) + data.map(_.getFileItem.getFile.toFile).toSeq match { + case Seq() => Parsed(None) + case Seq(file) => Parsed(Option(file)) + case many => Parsed.fail(s"${many.size} file values set for '$paramName'") + } + } + + def formValueAsFileRequired(paramName: String): Parsed[File] = { + val data = formDataForKey(paramName) + data.map(_.getFileItem.getFile.toFile).toSeq match { + case Seq() => Parsed.fail(s"No file form data was submitted for '$paramName'. The submitted form keys were: ${formDataKeys.mkString(",")}") + case Seq(file) => Parsed(file) + case many => Parsed.fail(s"${many.size} file values set for '$paramName'") + } + } + + def formManyValues(paramName: String, required: Boolean): Parsed[List[String]] = { + val data = formDataForKey(paramName).map(_.getValue).toSeq + Parsed.manyValues(Map(paramName -> data), paramName, required) + } + + def formData: FormData = FormParserFactory.builder().build().createParser(request.exchange).parseBlocking() + + def formDataKeys: Iterator[String] = formData.iterator().asScala + + def formDataForKey(paramName: String): Iterable[FormData.FormValue] = formData.get(paramName).asScala + + def headerSingleValueOptional(paramName: String): Parsed[Option[String]] = Parsed.optionalValue(request.headers, paramName) + def headerSingleValueRequired(paramName: String): Parsed[String] = Parsed.singleValue(request.headers, paramName) + + def headerManyValues(paramName: String, required: Boolean): Parsed[List[String]] = Parsed.manyValues(request.headers, paramName, required) + + def bodyAsString = new String(request.readAllBytes(), "UTF-8") + + def pathValue(index: Int, paramName: String, required : Boolean): Parsed[String] = { + request + .remainingPathSegments + .lift(index) match { + case Some(value) => Right(value) + case None if required => Left(s"'$paramName'' is a required path parameter at path position $index") + case None => Right("") + } + } +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/apiRoutes.mustache b/modules/openapi-generator/src/main/resources/scala-cask/apiRoutes.mustache new file mode 100644 index 000000000000..db3cdd65cb44 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/apiRoutes.mustache @@ -0,0 +1,61 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.8.3" +//> using lib "com.lihaoyi::scalatags:0.12.0" +{{>licenseInfo}} + +// this is generated from apiRoutes.mustache +package {{apiPackage}} + +import {{modelPackage}}.* + +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +{{#imports}}import {{import}} +{{/imports}} + +class {{classname}}Routes(service : {{classname}}Service) extends cask.Routes { + +{{#route-groups}} + // route group for {{methodName}} + {{caskAnnotation}}("{{pathPrefix}}", true) + def {{methodName}}(request: cask.Request{{>apiRoutesQueryParamsTyped}}) = { + request.remainingPathSegments match { + {{#operations}} + case Seq({{>pathExtractor}}) => {{operationId}}({{>pathExtractorParams}}request{{>queryParams}}) + {{/operations}} + case _ => cask.Response("Not Found", statusCode = 404) + } + } +{{/route-groups}} + +{{#operations}} + {{#operation}} + /** {{summary}} + * {{description}} + */ + {{vendorExtensions.x-annotation}}("{{vendorExtensions.x-cask-path}}") + def {{operationId}}({{vendorExtensions.x-cask-path-typed}}) = { + {{#authMethods}} + // auth method {{name}} : {{type}}, keyParamName: {{keyParamName}} + {{/authMethods}} + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = {{>parseHttpParams}} + + result match { + case Left(error) => cask.Response(error, 500) + {{#responses}} + {{#dataType}} + case Right(value : {{dataType}}) => cask.Response(data = write(value), {{code}}, headers = Seq("Content-Type" -> "application/json")) + {{/dataType}} + {{/responses}} + case Right(other) => cask.Response(s"$other", 200) + } + } + {{/operation}} +{{/operations}} + + initialize() +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/apiRoutesQueryParamsTyped.mustache b/modules/openapi-generator/src/main/resources/scala-cask/apiRoutesQueryParamsTyped.mustache new file mode 100644 index 000000000000..8356421c485b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/apiRoutesQueryParamsTyped.mustache @@ -0,0 +1 @@ +{{#hasGroupQueryParams}},{{/hasGroupQueryParams}}{{#groupQueryParams}}{{paramName}} : {{dataType}} = {{defaultValue}}{{^-last}},{{/-last}}{{/groupQueryParams}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/apiService.mustache b/modules/openapi-generator/src/main/resources/scala-cask/apiService.mustache new file mode 100644 index 000000000000..30ea17b60dde --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/apiService.mustache @@ -0,0 +1,37 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.8.3" +//> using lib "com.lihaoyi::scalatags:0.12.0" +{{>licenseInfo}} + +// generated from apiService.mustache +package {{apiPackage}} + +{{#imports}}import _root_.{{import}} +{{/imports}} + +import _root_.{{modelPackage}}.* + +object {{classname}}Service { + def apply() : {{classname}}Service = new {{classname}}Service { +{{#operations}} + {{#operation}} + override def {{operationId}}({{vendorExtensions.x-param-list-typed}}) : {{vendorExtensions.x-response-type}} = ??? + {{/operation}} +{{/operations}} + } +} + +/** + * The {{classname}} business-logic + */ +trait {{classname}}Service { +{{#operations}} +{{#operation}} + /** {{{summary}}} + * {{{description}}} + * @return {{returnType}} + */ + def {{operationId}}({{vendorExtensions.x-param-list-typed}}) : {{vendorExtensions.x-response-type}} +{{/operation}} +{{/operations}} +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/appPackage.mustache b/modules/openapi-generator/src/main/resources/scala-cask/appPackage.mustache new file mode 100644 index 000000000000..614e06bb9e1d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/appPackage.mustache @@ -0,0 +1,12 @@ +{{>licenseInfo}} +package {{packageName}} + +def box(str: String): String = { + val lines = str.linesIterator.toList + val maxLen = (0 +: lines.map(_.length)).max + val boxed = lines.map { line => + s" | ${line.padTo(maxLen, ' ')} |" + } + val bar = " +-" + ("-" * maxLen) + "-+" + (bar +: boxed :+ bar).mkString("\n") +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/appRoutes.mustache b/modules/openapi-generator/src/main/resources/scala-cask/appRoutes.mustache new file mode 100644 index 000000000000..5006b4677757 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/appRoutes.mustache @@ -0,0 +1,40 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.9.2" +//> using lib "com.lihaoyi::scalatags:0.8.2" +{{>licenseInfo}} + +// this file was generated from app.mustache +package {{packageName}} + +{{#imports}}import {{import}} +{{/imports}} +import _root_.{{modelPackage}}.* +import _root_.{{apiPackage}}.* + +/** + * This trait encapsulates the business logic (services) and the + * http routes which handle the http requests sent to those services. + * + * There are default 'not implemented' implementations for the service. + * + * If you wanted fine-grained control over the routes and services, you could + * extend the cask.MainRoutes and mix in this trait by using this: + * + * \{\{\{ + * override def allRoutes = appRoutes + * \}\}\} + * + * More typically, however, you would extend the 'BaseApp' class + */ +trait AppRoutes { +{{#operations}} + def app{{classname}}Service : {{classname}}Service = {{classname}}Service() + def routeFor{{classname}} : {{classname}}Routes = {{classname}}Routes(app{{classname}}Service) +{{/operations}} + + def appRoutes = Seq( +{{#operations}} + routeFor{{classname}} {{^-last}},{{/-last}} +{{/operations}} + ) +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/baseApp.mustache b/modules/openapi-generator/src/main/resources/scala-cask/baseApp.mustache new file mode 100644 index 000000000000..b8f019873c56 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/baseApp.mustache @@ -0,0 +1,49 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.9.2" +//> using lib "com.lihaoyi::scalatags:0.8.2" +{{>licenseInfo}} + +// this file was generated from app.mustache +package {{packageName}} + +{{#imports}}import {{import}} +{{/imports}} +import _root_.{{modelPackage}}.* +import _root_.{{apiPackage}}.* + +/** + * This class was created with the intention of being extended by some runnable object, + * passing in the custom business logic services + */ +class BaseApp({{#operations}} + override val app{{classname}}Service : {{classname}}Service = {{classname}}Service(), +{{/operations}} + override val port : Int = sys.env.get("PORT").map(_.toInt).getOrElse(8080)) extends cask.MainRoutes with AppRoutes { + + /** routes for the UI + * Subclasses can override to turn this off + */ + def openApiRoute: Option[cask.Routes] = Option(OpenApiRoutes(port)) + + override def allRoutes = appRoutes ++ openApiRoute + + {{^operations}} + // no operations! + {{/operations}} + + override def host: String = "0.0.0.0" + + def start() = locally { + initialize() + println(box(s""" 🚀 browse to localhost:$port 🚀 + | host : $host + | port : $port + | verbose : $verbose + | debugMode : $debugMode + |""".stripMargin)) + + // if java.awt.Desktop.isDesktopSupported then { + // java.awt.Desktop.getDesktop.browse(new java.net.URI(s"http://localhost:${port}")) + // } + } +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/build.sbt.mustache b/modules/openapi-generator/src/main/resources/scala-cask/build.sbt.mustache new file mode 100644 index 000000000000..ae0a5ae12e54 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/build.sbt.mustache @@ -0,0 +1,29 @@ +name := "{{artifactId}}" +organization:="{{groupId}}" +version := "0.0.1-SNAPSHOT" +scalaVersion := "3.3.1" +scalafmtOnCompile := true +libraryDependencies ++= Seq( + "com.lihaoyi" %% "cask" % "0.9.2" , + "com.lihaoyi" %% "upickle" % "3.2.0", + "org.scalatest" %% "scalatest" % "3.2.18" % Test +) + +publishMavenStyle := true + +val githubUser = "{{{gitUserId}}}" +val githubRepo = "{{{gitRepoId}}}" +publishTo := Some("GitHub Package Registry" at s"https://maven.pkg.github.com/$githubUser/$githubRepo") + +sys.env.get("GITHUB_TOKEN") match { + case Some(token) if !token.isEmpty => + credentials += Credentials( + "GitHub Package Registry", + "maven.pkg.github.com", + githubUser, + token + ) + case _ => + println("\n\t\tGITHUB_TOKEN not set - assuming a local build\n\n") + credentials ++= Nil +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/build.sc.mustache b/modules/openapi-generator/src/main/resources/scala-cask/build.sc.mustache new file mode 100644 index 000000000000..a31414db150c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/build.sc.mustache @@ -0,0 +1,43 @@ +import mill._, scalalib._, scalafmt._, publish._ + +// Mill build file (see https://mill-build.com/mill/Intro_to_Mill.html). +// run with: +// +// mill _.compile +// mill _.reformat +// mill _.publishLocal +// mill _.test.test +object {{artifactId}} extends SbtModule with ScalafmtModule with PublishModule { + def scalaVersion = "3.3.1" + + def pomSettings = PomSettings( + description = "{{artifactId}}", + organization = "{{groupId}}", + url = "https://github.com//{{artifactId}}", + licenses = Seq(License.MIT), + versionControl = VersionControl.github("", "{{artifactId}}"), + developers = Seq( + // Developer("", "", "https://github.com/") + ) + ) + + def publishVersion: mill.T[String] = T("0.0.1-SNAPSHOT") + + def ivyDeps = Agg( + ivy"com.lihaoyi::cask:0.9.2" , + ivy"com.lihaoyi::upickle:3.2.0" + ) + + override def sources = T.sources(millSourcePath / os.up / "src" / "main" / "scala") + override def resources = T.sources(millSourcePath / os.up / "src" / "main" / "resources") + + object test extends SbtModuleTests { + def ivyDeps = Agg( + ivy"org.scalactic::scalactic:3.2.18", + ivy"org.scalatest::scalatest:3.2.18" + ) + + def testFramework = "org.scalatest.tools.Framework" + override def sources = T.sources(millSourcePath / os.up / "src" / "test" / "scala") + } +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/bulidAndPublish.yml.mustache b/modules/openapi-generator/src/main/resources/scala-cask/bulidAndPublish.yml.mustache new file mode 100644 index 000000000000..ead5b4c0dcb6 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/bulidAndPublish.yml.mustache @@ -0,0 +1,41 @@ +name: Scala CI with sbt + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Cache sbt dependencies + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.m2 + key: ${{{openbrackets}}} runner.os {{{closebrackets}}}-sbt-${{{openbrackets}}} hashFiles('**/*.sbt') {{{closebrackets}}} + restore-keys: | + ${{{openbrackets}}} runner.os {{{closebrackets}}}-sbt- + + - name: Build with sbt + run: sbt clean compile + + - name: Test with sbt + run: sbt test + + - name: Publish to GitHub Packages + run: sbt publish + env: + GITHUB_TOKEN: ${{{openbrackets}}} secrets.GITHUB_TOKEN {{{closebrackets}}} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/example.mustache b/modules/openapi-generator/src/main/resources/scala-cask/example.mustache new file mode 100644 index 000000000000..3d6b5cca7794 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/example.mustache @@ -0,0 +1,60 @@ +//> using scala "3.3.1" +//> using lib "{{groupId}}::{{artifactId}}:0.0.1-SNAPSHOT" +//> using repositories https://maven.pkg.github.com/{{{gitUserId}}}/{{{gitRepoId}}} + + +/** +* This single file can contain the business logic for a REST service. +* ==================================== +* == zero-install build with docker == +* ==================================== +* +* +* ``` +* docker build . -t {{artifactId}}:latest +* ``` +* ====================== +* == Building Locally == +* ====================== +* This project can be built using [[scala-clit][https://scala-cli.virtuslab.org]] +* +* To simply run the project +* ``` +* scala-cli Server.scala +* ``` +* +* To create a runnable jar, run: +* ``` +* scala-cli --power package Server.scala -o app-assembly --assembly +* ``` +* +* To produce a docker image (no need for the Dockerfile), run: +* ``` +* scala-cli --power package --docker Server.scala --docker-image-repository app-docker +* ``` +* +* To generate an IDE project: +* ``` +* scala-cli setup-ide . --scala 3.3 +* ``` +*/ +package app + +import {{packageName}}.BaseApp +import {{apiPackage}}.* +import {{modelPackage}}.* + +import java.io.File + +// TODO - write your business logic for your services here (the defaults all return 'not implemented'): +{{#operations}} +val my{{classname}}Service : {{classname}}Service = {{classname}}Service() // <-- replace this with your implementation +{{/operations}} + +/** This is your main entry point for your REST service + * It extends BaseApp which defines the business logic for your services + */ +object Server extends BaseApp({{#operations}}app{{classname}}Service = my{{classname}}Service{{^-last}}, +{{/-last}}{{/operations}}): + start() + diff --git a/modules/openapi-generator/src/main/resources/scala-cask/exampleApp.mustache b/modules/openapi-generator/src/main/resources/scala-cask/exampleApp.mustache new file mode 100644 index 000000000000..f1247210dac8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/exampleApp.mustache @@ -0,0 +1,21 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.9.2" +//> using lib "com.lihaoyi::scalatags:0.8.2" +{{>licenseInfo}} + +// this file was generated from app.mustache +package {{packageName}} + +{{#imports}}import {{import}} +{{/imports}} +import _root_.{{modelPackage}}.* +import _root_.{{apiPackage}}.* + +/** + * This is an example of how you might extends BaseApp for a runnable application. + * + * See the README.md for how to create your own app + */ +object ExampleApp extends BaseApp() { + start() +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/gitignore.mustache b/modules/openapi-generator/src/main/resources/scala-cask/gitignore.mustache new file mode 100644 index 000000000000..56f2b272a080 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/gitignore.mustache @@ -0,0 +1,25 @@ +# scala specific +*.class +*.log + +# sbt specific +.cache +.history +.lib/ +dist/* +target/ +lib_managed/ +src_managed/ +project/boot/ +project/plugins/project/ + +# Scala-IDE specific +.scala_dependencies +.worksheet + +# Mill specific +out + +# IntelliJ specific +.idea +*.iml diff --git a/modules/openapi-generator/src/main/resources/scala-cask/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/scala-cask/licenseInfo.mustache new file mode 100644 index 000000000000..02c79936aa5f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/licenseInfo.mustache @@ -0,0 +1,16 @@ +/** + * {{{appName}}} + * {{{appDescription}}} + * + {{#version}} + * OpenAPI spec version: {{{version}}} + * + {{/version}} + {{#infoEmail}} + * Contact: {{{infoEmail}}} + * + {{/infoEmail}} + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ diff --git a/modules/openapi-generator/src/main/resources/scala-cask/model.mustache b/modules/openapi-generator/src/main/resources/scala-cask/model.mustache new file mode 100644 index 000000000000..c4b430b7ceda --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/model.mustache @@ -0,0 +1,60 @@ +{{>licenseInfo}} +// this model was generated using model.mustache +package {{modelPackage}} +{{#imports}}import {{import}} +{{/imports}} +import scala.util.control.NonFatal + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +{{#models}} +{{#model}} +case class {{classname}}( + {{#vars}} + {{#description}} +/* {{{description}}} */ + {{/description}} + {{name}}: {{#isEnum}}{{^required}}Option[{{/required}}{{classname}}.{{datatypeWithEnum}}{{^required}}]{{/required}}{{/isEnum}}{{^isEnum}}{{{vendorExtensions.x-datatype-model}}}{{/isEnum}}{{^required}} = {{{vendorExtensions.x-defaultValue-model}}} {{/required}}{{^-last}},{{/-last}} + + {{/vars}}) { + + def asJson: String = asData.asJson + + def asData : {{classname}}Data = { + {{classname}}Data( + {{#vars}} + {{name}} = {{name}}{{#vendorExtensions.x-map-asModel}}.map(_.asData){{/vendorExtensions.x-map-asModel}}{{#vendorExtensions.x-wrap-in-optional}}.getOrElse({{{defaultValue}}}){{/vendorExtensions.x-wrap-in-optional}}{{^-last}},{{/-last}} + {{/vars}} + ) + } + +} + +object {{classname}}{ + + given RW[{{classname}}] = {{classname}}Data.readWriter.bimap[{{classname}}](_.asData, _.asModel) + + enum Fields(fieldName : String) extends Field(fieldName) { + {{#vars}} + case {{name}} extends Fields("{{name}}") + {{/vars}} + } + +{{#vars}} + {{#isEnum}} + // baseName={{{baseName}}} + // nameInCamelCase = {{{nameInCamelCase}}} + enum {{datatypeWithEnum}} derives ReadWriter { + {{#_enum}} + case {{.}} + {{/_enum}} + } + {{/isEnum}} +{{/vars}} + +} + +{{/model}} +{{/models}} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/modelData.mustache b/modules/openapi-generator/src/main/resources/scala-cask/modelData.mustache new file mode 100644 index 000000000000..8dfdef358f6e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/modelData.mustache @@ -0,0 +1,250 @@ +{{>licenseInfo}} +// this model was generated using modelData.mustache +package {{modelPackage}} +{{#imports}}import {{import}} +{{/imports}} +import scala.util.control.NonFatal +import scala.util.* + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +{{#models}} +{{#model}} +/** {{classname}}Data a data transfer object, primarily for simple json serialisation. + * It has no validation - there may be nulls, values out of range, etc + */ +case class {{classname}}Data( + {{#vars}} + {{#description}} +/* {{{description}}} */ + {{/description}} + {{name}}: {{#isEnum}}{{classname}}.{{datatypeWithEnum}}{{/isEnum}}{{^isEnum}}{{{vendorExtensions.x-datatype-data}}}{{/isEnum}}{{^required}} = {{{vendorExtensions.x-defaultValue-data}}} {{/required}}{{^-last}},{{/-last}} + + {{/vars}}) { + + def asJson: String = write(this) + + def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { + val errors = scala.collection.mutable.ListBuffer[ValidationError]() + {{#vars}} + // ================== + // {{name}} + {{#pattern}} + // validate against pattern '{{{pattern}}}' + if (errors.isEmpty || !failFast) { + val regex = """{{{pattern}}}""" + if {{name}} == null || !regex.r.matches({{name}}) then + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, s"value '${{name}}' doesn't match pattern $regex") + } + {{/pattern}} + + {{#minimum}} + // validate against {{#exclusiveMinimum}}exclusive {{/exclusiveMinimum}}minimum {{minimum}} + if (errors.isEmpty || !failFast) { + if !({{name}} >{{^exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}) then + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, s"value '${{name}}' is not greater than the {{#exclusiveMinimum}}exclusive {{/exclusiveMinimum}}minimum value {{minimum}}") + } + {{/minimum}} + + {{#maximum}} + // validate against {{#exclusiveMaximum}}exclusive {{/exclusiveMaximum}}maximum {{maximum}} + if (errors.isEmpty || !failFast) { + if !({{name}} <{{^exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}) then + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, s"value '${{name}}' is not greater than the {{#exclusiveMaximum}}exclusive {{/exclusiveMaximum}}maximum value {{maximum}}") + } + {{/maximum}} + + {{#minLength}} + // validate min length {{minLength}} + if (errors.isEmpty || !failFast) { + val len = if {{name}} == null then 0 else {{name}}.length + if (len < {{minLength}}) { + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, s"length $len is shorter than the min length {{minLength}}") + } + } + {{/minLength}} + + {{#maxLength}} + // validate max length {{maxLength}} + if (errors.isEmpty || !failFast) { + val len = if {{name}} == null then 0 else {{name}}.length + if (len < {{maxLength}}) { + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, s"length $len is longer than the max length {{maxLength}}") + } + } + {{/maxLength}} + + {{#isEmail}} + // validate {{name}} is a valid email address + if (errors.isEmpty || !failFast) { + val emailRegex = """^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$""" + // validate {{name}} is email + if ({{name}} == null || !emailRegex.r.matches({{name}})) { + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, s"${{name}} is not a valid email address according to the pattern $emailRegex") + } + } + {{/isEmail}} + + {{#required}}{{^isPrimitiveType}} + if (errors.isEmpty || !failFast) { + if ({{name}} == null) { + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, "{{name}} is a required field and cannot be null") + } + } + {{/isPrimitiveType}}{{/required}} + + {{#uniqueItems}} + // validate {{name}} has unique items + if (errors.isEmpty || !failFast) { + if ({{name}} != null) { + {{name}}.foldLeft(Set[{{{vendorExtensions.x-containertype-data}}}]()) { + case (set, next) if set.contains(next) => + errors += ValidationError( + path :+ {{classname}}.Fields.{{name}}, + s"duplicate value: $next" + ) + set + next + case (set, next) => set + next + } + } + } + {{/uniqueItems}} + + {{#multipleOf}} + if (errors.isEmpty || !failFast) { + // validate {{name}} multiple of {{multipleOf}} + if ({{name}} % {{multipleOf}} != 0) { + errors += ValidationError( + path :+ {{classname}}.Fields.{{name}}, + s"${{name}} is not a multiple of {{multipleOf}}" + ) + } + } + {{/multipleOf}} + + {{#minItems}} + // validate min items {{minItems}} + if (errors.isEmpty || !failFast) { + val len = if {{name}} == null then 0 else {{name}}.size + if (len < {{minItems}}) { + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, s"{{name}} has $len, which is less than the min items {{minItems}}") + } + } + {{/minItems}} + + {{#maxItems}} + // validate min items {{maxItems}} + if (errors.isEmpty || !failFast) { + val len = if {{name}} == null then 0 else {{name}}.size + if (len > {{maxItems}}) { + errors += ValidationError(path :+ {{classname}}.Fields.{{name}}, s"{{name}} has $len, which is greater than the max items {{maxItems}}") + } + } + {{/maxItems}} + + {{#minProperties}} + TODO - minProperties + {{/minProperties}} + + {{#maxProperties}} + TODO - maxProperties + {{/maxProperties}} + + {{#items}}{{#isModel}} + if (errors.isEmpty || !failFast) { + if ({{name}} != null) { + {{name}}.zipWithIndex.foreach { + case (value, i) if errors.isEmpty || !failFast => + errors ++= value.validationErrors( + path :+ {{classname}}.Fields.{{name}} :+ Field(i.toString), + failFast) + case (value, i) => + } + } + } + {{/isModel}}{{/items}} + {{#isModel}} + // validating {{name}} + if (errors.isEmpty || !failFast) { + if {{name}} != null then errors ++= {{name}}.validationErrors(path :+ {{classname}}.Fields.{{name}}, failFast) + } + {{/isModel}} + + {{/vars}} + errors.toSeq + } + + def validated(failFast : Boolean = false) : scala.util.Try[{{classname}}] = { + validationErrors(Vector(), failFast) match { + case Seq() => Success(asModel) + case first +: theRest => Failure(ValidationErrors(first, theRest)) + } + } + + /** use 'validated' to check validation */ + def asModel : {{classname}} = { + {{classname}}( + {{#vars}} + {{name}} = {{#vendorExtensions.x-wrap-in-optional}}Option({{/vendorExtensions.x-wrap-in-optional}} + {{name}} + {{#vendorExtensions.x-wrap-in-optional}}){{/vendorExtensions.x-wrap-in-optional}} + {{#vendorExtensions.x-map-asModel}}.map(_.asModel){{/vendorExtensions.x-map-asModel}}{{^-last}},{{/-last}} + {{/vars}} + ) + } +} + +object {{classname}}Data { + + given readWriter : RW[{{classname}}Data] = macroRW + + def fromJsonString(jason : String) : {{classname}}Data = try { + read[{{classname}}Data](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") + } + + def manyFromJsonString(jason : String) : Seq[{{classname}}Data] = try { + read[List[{{classname}}Data]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") + } + + def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[{{classname}}]] = { + Try(manyFromJsonString(jason)).flatMap { list => + list.zipWithIndex.foldLeft(Try(Vector[{{classname}}]())) { + case (Success(list), (next, i)) => + next.validated(failFast) match { + case Success(ok) => Success(list :+ ok) + case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } + + def mapFromJsonString(jason : String) : Map[String, {{classname}}Data] = try { + read[Map[String, {{classname}}Data]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") + } + + + def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, {{classname}}]] = { + Try(mapFromJsonString(jason)).flatMap { map => + map.foldLeft(Try(Map[String, {{classname}}]())) { + case (Success(map), (key, next)) => + next.validated(failFast) match { + case Success(ok) => Success(map.updated(key, ok)) + case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } +} + +{{/model}} +{{/models}} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/modelPackage.mustache b/modules/openapi-generator/src/main/resources/scala-cask/modelPackage.mustache new file mode 100644 index 000000000000..f582c3e9fb11 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/modelPackage.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} +package {{modelPackage}} + +// model package +import upickle.default._ +import java.time.* +import java.time.format.DateTimeFormatter + +/** + * This base class lets us refer to fields in exceptions + */ +class Field(val name : String) + +final case class ValidationErrors( + first: ValidationError, + remaining: Seq[ValidationError], + message: String +) extends Exception(message) + +object ValidationErrors { + def apply(first: ValidationError, remaining: Seq[ValidationError]) = { + val noun = if remaining.isEmpty then "error" else "errors" + new ValidationErrors( + first, + remaining, + remaining.mkString(s"${remaining.size + 1} $noun found: ${first}", "\n\t", "") + ) + } +} + + +final case class ValidationError(path : Seq[Field], message : String) extends Exception(message) { + override def toString = s"ValidationError for ${path.mkString(".")}: $message" +} + +given ReadWriter[ZonedDateTime] = readwriter[String].bimap[ZonedDateTime]( + zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), + str => ZonedDateTime.parse(str, DateTimeFormatter.ISO_INSTANT)) + +given ReadWriter[LocalDateTime] = readwriter[String].bimap[LocalDateTime]( + zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), + str => LocalDateTime.parse(str, DateTimeFormatter.ISO_INSTANT)) + +given ReadWriter[LocalDate] = readwriter[String].bimap[LocalDate]( + zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), + str => LocalDate.parse(str, DateTimeFormatter.ISO_INSTANT)) + +given ReadWriter[OffsetDateTime] = readwriter[String].bimap[OffsetDateTime]( + zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), + str => scala.util.Try(OffsetDateTime.parse(str, DateTimeFormatter.ISO_DATE_TIME)).getOrElse( + OffsetDateTime.parse(str, DateTimeFormatter.ISO_INSTANT) + ) +) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/modelTest.mustache b/modules/openapi-generator/src/main/resources/scala-cask/modelTest.mustache new file mode 100644 index 000000000000..cbeae14cecc4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/modelTest.mustache @@ -0,0 +1,37 @@ +{{>licenseInfo}} +// this model was generated using modelTest.mustache +package {{modelPackage}} +{{#imports}}import {{import}} +{{/imports}} + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import scala.util.* + +{{#models}} +{{#model}} +class {{classname}}Test extends AnyWordSpec with Matchers { + +{{#operations}} + // operation {{classname}} + // + {{#examples}} + key = {{key}} + value= {{value}} + {{/examples}} +{{/operations}} + "{{classname}}.fromJson" should { + """not parse invalid json""" in { + val Failure(err) = Try({{classname}}Data.fromJsonString("invalid jason")) + err.getMessage should startWith ("Error parsing json 'invalid jason'") + } + """parse {{example}}""" ignore { + val Failure(err : ValidationErrors) = {{classname}}Data.fromJsonString("""{{example}}""").validated() + + sys.error("TODO") + } + } + +} +{{/model}} +{{/models}} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/openapiRoute.mustache b/modules/openapi-generator/src/main/resources/scala-cask/openapiRoute.mustache new file mode 100644 index 000000000000..58c350635553 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/openapiRoute.mustache @@ -0,0 +1,116 @@ +{{>licenseInfo}} + +// generated from openapiRoute.mustache +package {{apiPackage}} + +import cask.model.Response + +import java.nio.file.{Files, Path, Paths} + +/** + * This code will try and download the swagger UI static files on startup + * + * That behaviour can be altered by: + * - setting the environment variable SWAGGER_ON to false + * - setting the environment variable SWAGGER_UI_URL to either the URL of a swagger UI zip or setting it to the empty string + * + */ +object OpenApiRoutes { + + def swaggerUIUrl: Option[String] = { + // flag to turn SWAGGER off + def useSwaggerUI = sys.env.get("SWAGGER_ON").map(_.toBoolean).getOrElse(true) + + val defaultUrl = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.11.9.zip" + Option(sys.env.getOrElse("SWAGGER_UI_URL", defaultUrl)) + .map(_.trim) + .filterNot(_.isEmpty) + .filter(_ => useSwaggerUI) + } + def apply(localPort: Int) = new OpenApiRoutes(localPort, swaggerUIUrl) +} + +class OpenApiRoutes(localPort: Int, swaggerUrl: Option[String]) extends cask.Routes { + + def openApiDir = "ui" + + @cask.get("/") + def index() = cask.Redirect("/ui/index.html") + + @cask.staticFiles("/ui") + def staticUI() = openApiDir + + @cask.staticResources("/openapi.json") + def staticOpenApi() = "openapi.json" + + /** This code will try and download the swagger UI artefacts to a local directory to serve up + */ + object extract { + + def openApiDirPath: Path = Paths.get(openApiDir) + def hasSwagger = Files.exists(openApiDirPath) && Files.isDirectory(openApiDirPath) + + import java.io.{BufferedInputStream, FileOutputStream, InputStream} + import java.net.URL + import java.util.zip.{ZipEntry, ZipInputStream} + import scala.util.Using + + def apply(url: String) = { + if !hasSwagger then downloadAndExtractZip(url, openApiDir) + } + + def downloadAndExtractZip(url: String, outputDir: String): Unit = { + val urlConn = new URL(url).openConnection() + urlConn.setRequestProperty("User-Agent", "Mozilla/5.0") + + Using(urlConn.getInputStream) { inputStream => + val zipIn = new ZipInputStream(new BufferedInputStream(inputStream)) + LazyList.continually(zipIn.getNextEntry).takeWhile(_ != null).foreach { entry => + + def isDist = entry.getName.contains("/dist/") + def isNotMap = !entry.getName.endsWith(".map") + + if (!entry.isDirectory && isDist && isNotMap) { + val fileName = entry.getName.split("/").last + extractFile(entry.getName, zipIn, s"$outputDir/$fileName") + } + zipIn.closeEntry() + } + } + } + + def extractFile(name: String, zipIn: ZipInputStream, filePath: String): Unit = { + val fullPath = Paths.get(filePath).toAbsolutePath + if !Files.exists(fullPath.getParent) then { + Files.createDirectories(fullPath.getParent) + } + + // config hack - we replace the default url from this swagger conf to use our localhost + // + if name.endsWith("swagger-initializer.js") then { + val textLines = scala.io.Source.fromInputStream(zipIn).getLines().map { + case line if line.contains("url:") => + s""" url: "http://localhost:$localPort/openapi.json",""" + case line => line + } + + // keeping this compatible for java 8, where this is from >= java 11: + // Files.writeString(fullPath, textLines.mkString("\n")) + scala.util.Using(new java.io.PrintWriter(fullPath.toFile))(_.write(textLines.mkString("\n"))) + } else { + Using(new FileOutputStream(filePath)) { outputStream => + val buffer = new Array[Byte](1024) + LazyList + .continually(zipIn.read(buffer)) + .takeWhile(_ != -1) + .foreach(outputStream.write(buffer, 0, _)) + } + } + } + } + + // extract the swagger UI resources to our local directory + swaggerUrl.foreach(url => extract(url)) + + initialize() +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/parseHttpParams.mustache b/modules/openapi-generator/src/main/resources/scala-cask/parseHttpParams.mustache new file mode 100644 index 000000000000..18193e0606c2 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/parseHttpParams.mustache @@ -0,0 +1,56 @@ + for { +{{#pathParams}} + {{#isString}} + {{paramName}} <- Parsed({{paramName}}) + {{/isString}} + {{^isString}} + {{paramName}} <- Parsed({{paramName}}) + {{/isString}} +{{/pathParams}} +{{#headerParams}} + {{#required}} + {{paramName}} <- request.headerSingleValueRequired("{{paramName}}") + {{/required}} + {{^required}} + {{paramName}} <- request.headerSingleValueOptional("{{paramName}}") + {{/required}} +{{/headerParams}} +{{#formParams}} + {{#required}} + {{paramName}} <- {{#isFile}}request.formValueAsFileRequired("{{paramName}}"){{/isFile}}{{^isFile}}request.formSingleValueRequired("{{paramName}}"){{/isFile}} + {{/required}} + {{^required}} + {{paramName}} <- {{#isFile}}request.formValueAsFileOptional("{{paramName}}"){{/isFile}}{{^isFile}}request.formSingleValueOptional("{{paramName}}"){{/isFile}} + {{/required}} +{{/formParams}} +{{#bodyParams}} + {{#vendorExtensions.x-consumes-json}} + {{#isArray}} + {{paramName}} <- Parsed.fromTry({{vendorExtensions.x-container-type}}Data.manyFromJsonStringValidated(request.bodyAsString)).mapError(e => s"Error parsing json as an array of {{vendorExtensions.x-container-type}} from >${request.bodyAsString}< : ${e}") /* array */ + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{#vendorExtensions.x-deserialize-asModelMap}} + {{paramName}} <- Parsed.eval(read[Map[String, {{vendorExtensions.x-container-type}}](request.bodyAsString)).mapError(e => s"Error parsing json as a string map of {{vendorExtensions.x-container-type}} from >${request.bodyAsString}< : ${e}") /* x-deserialize-asModelMap */ + {{/vendorExtensions.x-deserialize-asModelMap}} + {{^vendorExtensions.x-deserialize-asModelMap}} + {{paramName}} <- Parsed.eval(read[Map[String, {{vendorExtensions.x-container-type}}]](request.bodyAsString)).mapError(e => s"Error parsing json as a string map of {{vendorExtensions.x-container-type}} from >${request.bodyAsString}< : ${e}") /* not x-deserialize-asModelMap */ + {{/vendorExtensions.x-deserialize-asModelMap}} + {{/isMap}} + {{^isMap}} + {{paramName}}Data <- Parsed.eval({{vendorExtensions.x-container-type}}Data.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as {{vendorExtensions.x-container-type}} from >${request.bodyAsString}< : ${e}") /* not array or map */ + {{paramName}} <- Parsed.fromTry({{paramName}}Data.validated(failFast)) + {{/isMap}} + {{/isArray}} + {{/vendorExtensions.x-consumes-json}} + {{^vendorExtensions.x-consumes-json}} + {{#vendorExtensions.x-consumes-xml}} + {{paramName}} <- Parsed.fail("TODO - xml deserialisation not yet supported. see src/main/resources/scala-cask/parseHttpParams.mustache in https://github.com/OpenAPITools/openapi-generator") + {{/vendorExtensions.x-consumes-xml}} + {{^vendorExtensions.x-consumes-xml}} + {{paramName}} <- Parsed.fail("TODO - content deserialisation. see src/main/resources/scala-cask/parseHttpParams.mustache in https://github.com/OpenAPITools/openapi-generator") + {{/vendorExtensions.x-consumes-xml}} + {{/vendorExtensions.x-consumes-json}} +{{/bodyParams}} + result <- Parsed.eval(service.{{operationId}}({{vendorExtensions.x-param-list}})) + } yield result \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/pathExtractor.mustache b/modules/openapi-generator/src/main/resources/scala-cask/pathExtractor.mustache new file mode 100644 index 000000000000..9890a8865a23 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/pathExtractor.mustache @@ -0,0 +1 @@ +{{#vendorExtensions.x-path-remaining}}{{#isParam}}{{name}}{{/isParam}}{{^isParam}}"{{name}}"{{/isParam}}{{^-last}},{{/-last}}{{/vendorExtensions.x-path-remaining}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/pathExtractorParams.mustache b/modules/openapi-generator/src/main/resources/scala-cask/pathExtractorParams.mustache new file mode 100644 index 000000000000..89a51b83b40e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/pathExtractorParams.mustache @@ -0,0 +1 @@ +{{#vendorExtensions.x-path-remaining}}{{#isParam}}{{name}}{{conversion}}{{/isParam}}{{#hasMoreParams}}, {{/hasMoreParams}}{{/vendorExtensions.x-path-remaining}}{{#vendorExtensions.x-has-path-remaining}},{{/vendorExtensions.x-has-path-remaining}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/project/build.properties b/modules/openapi-generator/src/main/resources/scala-cask/project/build.properties new file mode 100644 index 000000000000..04267b14af69 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.9.9 diff --git a/modules/openapi-generator/src/main/resources/scala-cask/project/plugins.sbt b/modules/openapi-generator/src/main/resources/scala-cask/project/plugins.sbt new file mode 100644 index 000000000000..4f3f02c2de45 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/project/plugins.sbt @@ -0,0 +1,3 @@ +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") + +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-cask/queryParams.mustache b/modules/openapi-generator/src/main/resources/scala-cask/queryParams.mustache new file mode 100644 index 000000000000..fc9a800ed2be --- /dev/null +++ b/modules/openapi-generator/src/main/resources/scala-cask/queryParams.mustache @@ -0,0 +1 @@ +{{#hasQueryParams}},{{/hasQueryParams}}{{#queryParams}}{{paramName}}{{#required}}{{^isMap}}{{^isArray}}.getOrElse({{#isString}}""{{/isString}}{{#isNumber}}0{{/isNumber}}{{#isBoolean}}false{{/isBoolean}}){{/isArray}}{{/isMap}}{{/required}}{{^-last}}, {{/-last}}{{/queryParams}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-node/package.mustache b/modules/openapi-generator/src/main/resources/typescript-node/package.mustache index d013eab0374e..b9dc19c81a7a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/package.mustache @@ -16,9 +16,8 @@ "author": "OpenAPI-Generator Contributors", "license": "Unlicense", "dependencies": { - "bluebird": "^3.5.0", - "request": "^2.81.0", - "rewire": "^3.0.2" + "bluebird": "^3.7.2", + "request": "^2.88.2" }, "devDependencies": { "@types/bluebird": "^3.5.33", diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/AllVarsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/AllVarsTest.java new file mode 100644 index 000000000000..f7a1c8914c0a --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/AllVarsTest.java @@ -0,0 +1,20 @@ +package org.openapitools.codegen; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.Schema; +import org.openapitools.codegen.languages.SpringCodegen; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.utils.ModelUtils; +import org.testng.annotations.Test; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AllVarsTest { + + +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/OpenAPINormalizerTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/OpenAPINormalizerTest.java index a57d7dfd8814..5dc0b8f3cf51 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/OpenAPINormalizerTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/OpenAPINormalizerTest.java @@ -158,6 +158,10 @@ public void testOpenAPINormalizerSimplifyOneOfAnyOf() { assertEquals(schema2.getOneOf().size(), 4); assertNull(schema2.getNullable()); + Schema schema2b = openAPI.getComponents().getSchemas().get("OneOfTest2"); + assertEquals(schema2b.getOneOf().size(), 2); + assertNull(schema2b.getNullable()); + Schema schema5 = openAPI.getComponents().getSchemas().get("OneOfNullableTest"); assertEquals(schema5.getOneOf().size(), 3); assertNull(schema5.getNullable()); @@ -189,6 +193,11 @@ public void testOpenAPINormalizerSimplifyOneOfAnyOf() { assertTrue(schema4 instanceof IntegerSchema); assertTrue(schema4.getNullable()); + Schema schema4b = openAPI.getComponents().getSchemas().get("OneOfTest2"); + assertNull(schema4b.getOneOf()); + assertTrue(schema4b instanceof StringSchema); + assertTrue(schema4b.getNullable()); + Schema schema6 = openAPI.getComponents().getSchemas().get("OneOfNullableTest"); assertEquals(schema6.getOneOf().size(), 2); assertTrue(schema6.getNullable()); @@ -532,7 +541,7 @@ public void testSetContainerToNullable() { @Test public void testSetPrimitiveTypesToNullable() { // test `string|integer|number|boolean` - OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0//setPrimitiveTypesToNullable_test.yaml"); + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/setPrimitiveTypesToNullable_test.yaml"); Schema schema = openAPI.getComponents().getSchemas().get("Person"); assertEquals(((Schema) schema.getProperties().get("lastName")).getNullable(), null); @@ -552,7 +561,7 @@ public void testSetPrimitiveTypesToNullable() { assertEquals(((Schema) schema2.getProperties().get("first_boolean")).getNullable(), true); // test `number` only - OpenAPI openAPI2 = TestUtils.parseSpec("src/test/resources/3_0//setPrimitiveTypesToNullable_test.yaml"); + OpenAPI openAPI2 = TestUtils.parseSpec("src/test/resources/3_0/setPrimitiveTypesToNullable_test.yaml"); Schema schema3 = openAPI2.getComponents().getSchemas().get("Person"); assertEquals(((Schema) schema3.getProperties().get("lastName")).getNullable(), null); @@ -572,7 +581,7 @@ public void testSetPrimitiveTypesToNullable() { } @Test - public void testOpenAPINormalizerSimplifyOneOfAnyOf31Spec() { + public void testOpenAPINormalizerSimplifyOneOfAnyOf31SpecForIssue18184 () { // to test the rule SIMPLIFY_ONEOF_ANYOF in 3.1 spec OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_1/issue_18184.yaml"); // test spec contains anyOf with a ref to enum and another scheme type is null @@ -636,6 +645,77 @@ public void testOpenAPINormalizerProcessingArraySchema31Spec() { assertEquals(((Schema) schema6.getProperties().get("arrayOfStrings")).getItems().getTypes().contains("string"), true); assertEquals(((Schema) schema6.getProperties().get("arrayOfStrings")).getItems().getType(), "string"); assertEquals(((Schema) schema6.getProperties().get("arrayOfStrings")).getType(), "array"); + } + + @Test + public void testOpenAPINormalizerSimplifyOneOfAnyOf31Spec() { + // to test the rule SIMPLIFY_ONEOF_ANYOF with 3.1 spec + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_1/simplifyOneOfAnyOf_test.yaml"); + + Schema schema = openAPI.getComponents().getSchemas().get("AnyOfTest"); + assertEquals(schema.getAnyOf().size(), 4); + assertNull(schema.getNullable()); + + Schema schema2 = openAPI.getComponents().getSchemas().get("OneOfTest"); + assertEquals(schema2.getOneOf().size(), 4); + assertNull(schema2.getNullable()); + + Schema schema2b = openAPI.getComponents().getSchemas().get("OneOfTest2"); + assertEquals(schema2b.getOneOf().size(), 2); + assertNull(schema2b.getNullable()); + + Schema schema5 = openAPI.getComponents().getSchemas().get("OneOfNullableTest"); + assertEquals(schema5.getOneOf().size(), 3); + assertNull(schema5.getNullable()); + + Schema schema7 = openAPI.getComponents().getSchemas().get("Parent"); + assertEquals(((Schema) schema7.getProperties().get("number")).getAnyOf().size(), 1); + + Schema schema9 = openAPI.getComponents().getSchemas().get("AnyOfStringArrayOfString"); + assertEquals(schema9.getAnyOf().size(), 2); + + Schema schema11 = openAPI.getComponents().getSchemas().get("AnyOfAnyType"); + assertEquals(schema11.getAnyOf().size(), 6); + + Schema schema13 = openAPI.getComponents().getSchemas().get("OneOfAnyType"); + assertEquals(schema13.getOneOf().size(), 6); + Map options = new HashMap<>(); + options.put("SIMPLIFY_ONEOF_ANYOF", "true"); + OpenAPINormalizer openAPINormalizer = new OpenAPINormalizer(openAPI, options); + openAPINormalizer.normalize(); + + Schema schema3 = openAPI.getComponents().getSchemas().get("AnyOfTest"); + assertNull(schema3.getAnyOf()); + assertEquals(ModelUtils.getType(schema3), "string"); + assertTrue(schema3.getNullable()); + + Schema schema4 = openAPI.getComponents().getSchemas().get("OneOfTest"); + assertNull(schema4.getOneOf()); + assertEquals(ModelUtils.getType(schema4), "integer"); + assertTrue(schema4.getNullable()); + + Schema schema4b = openAPI.getComponents().getSchemas().get("OneOfTest2"); + assertNull(schema4b.getOneOf()); + assertEquals(ModelUtils.getType(schema4b), "string"); + assertTrue(schema4b.getNullable()); + + Schema schema6 = openAPI.getComponents().getSchemas().get("OneOfNullableTest"); + assertEquals(schema6.getOneOf().size(), 2); + assertTrue(schema6.getNullable()); + + Schema schema8 = openAPI.getComponents().getSchemas().get("Parent"); + assertEquals(((Schema) schema8.getProperties().get("number")).get$ref(), "#/components/schemas/Number"); + + Schema schema10 = openAPI.getComponents().getSchemas().get("AnyOfStringArrayOfString"); + assertEquals(schema10.getAnyOf().size(), 2); + + Schema schema12 = openAPI.getComponents().getSchemas().get("AnyOfAnyType"); + assertEquals(schema12.getAnyOf(), null); + assertEquals(schema12.getType(), null); + + Schema schema14 = openAPI.getComponents().getSchemas().get("OneOfAnyType"); + assertEquals(schema14.getOneOf(), null); + assertEquals(schema14.getType(), null); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java index cbf73e2877bb..b8fcfdcdc7c5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java @@ -291,6 +291,27 @@ public void verifyApiTestWithNullResponse() throws IOException { "httpRes, err := apiClient.PetAPI.PetDelete(context.Background()).Execute()"); } + @Test + public void verifyApiWithAllOfMultipleRefAndDiscriminator() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("go") + .setGitUserId("OpenAPITools") + .setGitRepoId("openapi-generator") + .setInputSpec("src/test/resources/3_0/go/allof_multiple_ref_and_discriminator.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + TestUtils.assertFileExists(Paths.get(output + "/model_final_item.go")); + TestUtils.assertFileContains(Paths.get(output + "/model_final_item.go"), + "BaseItem"); + } + @Test public void testAdditionalPropertiesWithGoMod() throws Exception { File output = Files.createTempDirectory("test").toFile(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java index 95a9f9f6b69d..73184b4a5030 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java @@ -24,6 +24,8 @@ import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.parser.core.models.ParseOptions; + +import java.math.BigDecimal; import java.time.OffsetDateTime; import java.time.ZonedDateTime; import java.util.*; @@ -945,6 +947,93 @@ public void ignoreBeanValidationAnnotationsContainerTest() { Assert.assertEquals(defaultValue, "List"); } + @Test + public void AnnotationsContainerTest() { + final P_AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); + codegen.additionalProperties().put("useBeanValidation", true); + + // 1. string type + Schema schema = new ArraySchema().items(new Schema<>().type("string").pattern("^[a-z]$").minLength(0).maxLength(36)); + String defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Pattern(regexp = \"^[a-z]$\")@Size(min = 0, max = 36)String>"); + + schema = new ArraySchema().items(new Schema<>().type("string").pattern("^[a-z]$").minLength(0)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Pattern(regexp = \"^[a-z]$\")@Size(min = 0)String>"); + + schema = new ArraySchema().items(new Schema<>().type("string").pattern("^[a-z]$").maxLength(36)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Pattern(regexp = \"^[a-z]$\")@Size(max = 36)String>"); + + schema = new ArraySchema().items(new Schema<>().type("string").format("email")); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Email String>"); + + // 2. string type with number format + schema = new ArraySchema().items(new Schema<>().type("string").format("number").minimum(BigDecimal.ZERO).maximum(BigDecimal.TEN).exclusiveMinimum(Boolean.TRUE).exclusiveMaximum(Boolean.TRUE)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMin(value = \"0\", inclusive = false) @DecimalMax(value = \"10\", inclusive = false)BigDecimal>"); + + schema = new ArraySchema().items(new Schema<>().type("string").format("number").minimum(BigDecimal.ZERO).exclusiveMinimum(Boolean.TRUE)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMin( value = \"0\", inclusive = false)BigDecimal>"); + + schema = new ArraySchema().items(new Schema<>().type("string").format("number").maximum(BigDecimal.TEN).exclusiveMaximum(Boolean.TRUE)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMax( value = \"10\", inclusive = false)BigDecimal>"); + + // 3. number type + schema = new ArraySchema().items(new Schema<>().type("number").minimum(BigDecimal.ZERO).maximum(BigDecimal.TEN).exclusiveMinimum(Boolean.TRUE).exclusiveMaximum(Boolean.TRUE)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMin(value = \"0\", inclusive = false) @DecimalMax(value = \"10\", inclusive = false)BigDecimal>"); + + schema = new ArraySchema().items(new Schema<>().type("number").minimum(BigDecimal.ZERO).exclusiveMinimum(Boolean.TRUE)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMin( value = \"0\", inclusive = false)BigDecimal>"); + + schema = new ArraySchema().items(new Schema<>().type("number").maximum(BigDecimal.TEN).exclusiveMaximum(Boolean.TRUE)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMax( value = \"10\", inclusive = false)BigDecimal>"); + + schema = new ArraySchema().items(new Schema<>().type("number").minimum(BigDecimal.ZERO).maximum(BigDecimal.TEN)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMin(value = \"0\", inclusive = true) @DecimalMax(value = \"10\", inclusive = true)BigDecimal>"); + + schema = new ArraySchema().items(new Schema<>().type("number").minimum(BigDecimal.ZERO)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMin( value = \"0\", inclusive = true)BigDecimal>"); + + schema = new ArraySchema().items(new Schema<>().type("number").maximum(BigDecimal.TEN)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@DecimalMax( value = \"10\", inclusive = true)BigDecimal>"); + + // 4. integer type with int64 format + schema = new ArraySchema().items(new Schema<>().type("integer").format("int64").minimum(BigDecimal.ZERO).maximum(BigDecimal.TEN)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Min(0L) @Max(10L)Long>"); + + schema = new ArraySchema().items(new Schema<>().type("integer").format("int64").minimum(BigDecimal.ZERO)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Min(0L)Long>"); + + schema = new ArraySchema().items(new Schema<>().type("integer").format("int64").maximum(BigDecimal.TEN)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Max(10L)Long>"); + + // 5. integer type + schema = new ArraySchema().items(new Schema<>().type("integer").minimum(BigDecimal.ZERO).maximum(BigDecimal.TEN)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Min(0) @Max(10)Integer>"); + + schema = new ArraySchema().items(new Schema<>().type("integer").minimum(BigDecimal.ZERO)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Min(0)Integer>"); + + schema = new ArraySchema().items(new Schema<>().type("integer").maximum(BigDecimal.TEN)); + defaultValue = codegen.getTypeDeclaration(schema); + Assert.assertEquals(defaultValue, "List<@Max(10)Integer>"); + } + private static Schema createObjectSchemaWithMinItems() { return new ObjectSchema() .addProperties("id", new IntegerSchema().format("int32")) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index e3d026d447a7..cd0bc10c8f16 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -59,6 +59,7 @@ import java.util.Locale; import java.util.Map; import java.util.Optional; +import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; import java.util.regex.Matcher; @@ -68,16 +69,7 @@ import junit.framework.AssertionFailedError; import lombok.SneakyThrows; -import org.openapitools.codegen.ClientOptInput; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.CodegenParameter; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.CodegenResponse; -import org.openapitools.codegen.CodegenSecurity; -import org.openapitools.codegen.DefaultGenerator; -import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.*; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.languages.AbstractJavaCodegen; @@ -2362,6 +2354,16 @@ private static Map generateFromContract( final String pathToSpecification, final String library, final Map properties + ) { + return generateFromContract(pathToSpecification, library, properties, configurator -> {}); + } + + @SneakyThrows + private static Map generateFromContract( + final String pathToSpecification, + final String library, + final Map properties, + final Consumer consumer ) { final File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); @@ -2372,7 +2374,7 @@ private static Map generateFromContract( .setAdditionalProperties(properties) .setInputSpec(pathToSpecification) .setOutputDir(output.getAbsolutePath()); - + consumer.accept(configurator); final ClientOptInput clientOptInput = configurator.toClientOptInput(); final DefaultGenerator generator = new DefaultGenerator(); return generator.opts(clientOptInput).generate().stream() @@ -3015,7 +3017,7 @@ public void testAllOfWithSinglePrimitiveTypeRef() throws IOException { } @Test - public void testOpenAPIGeneratorIgnoreListOption() throws IOException { + public void testOpenapiGeneratorIgnoreListOption() throws IOException { File output = Files.createTempDirectory("openapi_generator_ignore_list_test_folder").toFile().getCanonicalFile(); output.deleteOnExit(); final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allof_primitive.yaml"); @@ -3146,4 +3148,65 @@ public void testQueryParamsExploded_whenQueryParamIsNull() throws IOException { Path petApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/DepartmentApi.java"); TestUtils.assertFileContains(petApi, "if (filter != null) {"); } + + @Test + public void generateAllArgsConstructor() { + Map files = generateFromContract("src/test/resources/3_0/java/all_args_constructor.yaml", JavaClientCodegen.RESTTEMPLATE, + Map.of(AbstractJavaCodegen.GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, Boolean.TRUE), + codegenConfigurator -> codegenConfigurator.addOpenapiNormalizer("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", "false")); + JavaFileAssert.assertThat(files.get("Pet.java")) + .fileContains("protected String name", "protected String type") + .assertConstructor("String") + .hasParameter("type").toConstructor() + .toFileAssert() + .assertConstructor("LocalDate", "String", "String") + .hasParameter("dateOfBirth").toConstructor() + .hasParameter("name").toConstructor() + .hasParameter("type").toConstructor(); + JavaFileAssert.assertThat(files.get("Cat.java")) + .assertConstructor("Integer", "String", "LocalDate", "String", "String"); + + // test readonly constructor + JavaFileAssert.assertThat(files.get("Page.java")) + .assertConstructor("Integer") + .toFileAssert() + .fileContains("Constructor with only readonly parameters and all parameters"); + + JavaFileAssert.assertThat(files.get("PageOfPets.java")) + .assertConstructor("Integer") + .hasParameter("count").toConstructor() + .toFileAssert() + .assertConstructor("Integer", "List") + .hasParameter("count").toConstructor() + .hasParameter("_list").toConstructor(); + } + + @Test + public void generateAllArgsConstructor_REFACTOR_ALLOF_WITH_PROPERTIES_ONLY() { + // try the generation with some additional OpenAPINormalizers + + Map files = generateFromContract("src/test/resources/3_0/java/all_args_constructor.yaml", JavaClientCodegen.RESTTEMPLATE, + Map.of(AbstractJavaCodegen.GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, Boolean.TRUE), + codegenConfigurator -> codegenConfigurator.addOpenapiNormalizer("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", "true")); + JavaFileAssert.assertThat(files.get("Pet.java")) + .fileContains("protected String name", "protected String type") + .assertConstructor("String") + .hasParameter("type").toConstructor() + .toFileAssert() + .assertConstructor("LocalDate", "String", "String") + .hasParameter("dateOfBirth").toConstructor() + .hasParameter("name").toConstructor() + .hasParameter("type").toConstructor(); + + JavaFileAssert.assertThat(files.get("PageOfPets.java")) + .assertConstructor("Integer", "List") + .hasParameter("count").toConstructor() + .hasParameter("_list").toConstructor() + .toFileAssert() + .assertConstructor("Integer") + .hasParameter("count").toConstructor(); + + JavaFileAssert.assertThat(files.get("Cat.java")) + .assertConstructor("Integer", "String", "LocalDate", "String", "String"); + } } 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 d2249db3983c..e07bedb1a06d 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 @@ -21,6 +21,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.openapitools.codegen.TestUtils.assertFileContains; import static org.openapitools.codegen.TestUtils.assertFileNotContains; +import static org.openapitools.codegen.languages.AbstractJavaCodegen.GENERATE_CONSTRUCTOR_WITH_ALL_ARGS; import static org.openapitools.codegen.languages.SpringCodegen.ASYNC; import static org.openapitools.codegen.languages.SpringCodegen.DELEGATE_PATTERN; import static org.openapitools.codegen.languages.SpringCodegen.DocumentationProvider; @@ -57,18 +58,10 @@ import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Collectors; + import org.apache.commons.lang3.StringUtils; import org.assertj.core.api.MapAssert; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.ClientOptInput; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.CodegenParameter; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.DefaultGenerator; -import org.openapitools.codegen.SupportingFile; -import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.*; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.java.assertions.JavaFileAssert; @@ -2753,7 +2746,8 @@ public void shouldUseTheSameTagNameForTheInterfaceAndTheMethod_issue11570() thro @Test public void shouldGenerateConstructorWithOnlyRequiredParameters() throws IOException { - final Map output = generateFromContract("src/test/resources/3_0/spring/issue_9789.yml", SPRING_BOOT); + final Map output = generateFromContract("src/test/resources/3_0/spring/issue_9789.yml", SPRING_BOOT, + Map.of(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, "false")); JavaFileAssert.assertThat(output.get("ObjectWithNoRequiredParameter.java")).assertNoConstructor("String"); @@ -2773,30 +2767,41 @@ public void shouldGenerateConstructorWithOnlyRequiredParameters() throws IOExcep private Map generateFromContract(String url, String library) throws IOException { return generateFromContract(url, library, new HashMap<>()); } + private Map generateFromContract(String url, String library, Map additionalProperties) throws IOException { + return generateFromContract(url, library, additionalProperties, codegen -> {}); + } + + /** + * Generate the contract with additional configuration. + * + * use CodegenConfigurator instead of CodegenConfig for easier configuration like in JavaClientCodeGenTest + */ + private Map generateFromContract(String url, String library, Map additionalProperties, + Consumer consumer) throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); - OpenAPI openAPI = new OpenAPIParser() - .readLocation(url, null, new ParseOptions()).getOpenAPI(); - - SpringCodegen codegen = new SpringCodegen(); + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("spring") + .setAdditionalProperties(additionalProperties) + .setValidateSpec(false) + .setInputSpec(url) + .setOutputDir(output.getAbsolutePath()); if (null != library) { - codegen.setLibrary(library); + configurator.setLibrary(library); } - codegen.setOutputDir(output.getAbsolutePath()); - codegen.additionalProperties().putAll(additionalProperties); - - ClientOptInput input = new ClientOptInput() - .openAPI(openAPI) - .config(codegen); + consumer.accept(configurator); + ClientOptInput input = configurator.toClientOptInput(); DefaultGenerator generator = new DefaultGenerator(); return generator.opts(input).generate().stream() .collect(Collectors.toMap(File::getName, Function.identity())); } + @Test public void testMappingSubtypesIssue13150() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); @@ -4518,6 +4523,35 @@ public void givenMultipartForm_whenGenerateBlockedServer_thenParameterAreCreated "@Valid @RequestParam(value = \"additionalMetadata\", required = false) String additionalMetadata"); } + @Test + public void testAllArgsConstructor_16797() throws IOException { + final Map output = generateFromContract("src/test/resources/3_0/spring/issue_16797.yaml", SPRING_BOOT, + Map.of(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, Boolean.TRUE), + codegen -> codegen.addOpenapiNormalizer("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", "false")); + JavaFileAssert.assertThat(output.get("Object4.java")) + .assertConstructor("String", "Type1", "String", "String", "Boolean") + .hasParameter("responseType").toConstructor() + .hasParameter("requestId").toConstructor() + .hasParameter("success").toConstructor() + .hasParameter("pageInfo") + ; + + } + + @Test + public void testAllArgsConstructor_16797_REFACTOR_ALLOF_WITH_PROPERTIES_ONLY() throws IOException { + final Map output = generateFromContract("src/test/resources/3_0/spring/issue_16797.yaml", SPRING_BOOT, + Map.of(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, Boolean.TRUE), + codegen -> codegen.addOpenapiNormalizer("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", "true")); + JavaFileAssert.assertThat(output.get("Object4.java")) + .assertConstructor("String", "Type1", "String", "String", "Boolean") + .hasParameter("responseType").toConstructor() + .hasParameter("requestId").toConstructor() + .hasParameter("success").toConstructor() + .hasParameter("pageInfo") + ; + } + @Test public void testMultiInheritanceParentRequiredParams_issue16797() throws IOException { final Map output = generateFromContract("src/test/resources/3_0/spring/issue_16797.yaml", SPRING_BOOT); @@ -4548,6 +4582,65 @@ public void testMultiInheritanceParentRequiredParams_issue15796() throws IOExcep ; } + @Test + public void testAllArgsConstructor_defaultOrder_15796() throws IOException { + final Map output = generateFromContract("src/test/resources/3_0/spring/issue_15796.yaml", SPRING_BOOT, + Map.of(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, Boolean.TRUE), + config -> config.addOpenapiNormalizer("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", " true")); + // constructors should as this + //public Poodle(String race, String type) { + // super(race, type); + //} + // and + //public Poodle(String hairType, Integer tails, String race, String name, String type) { + // super(tails, race, name, type); + // this.hairType = hairType; + //} + JavaFileAssert.assertThat(output.get("Poodle.java")) + .assertConstructor("String", "String") + .hasParameter("type").toConstructor() + .hasParameter("race").toConstructor() + .toFileAssert() + .assertConstructor("String", "Integer", "String", "String", "String") + .hasParameter("tails").toConstructor() + .hasParameter("race").toConstructor() + .hasParameter("name").toConstructor() + .hasParameter("type").toConstructor() + .hasParameter("hairType").toConstructor() + ; + } + + @Test + public void generateAllArgsConstructor() throws IOException { + Map files = generateFromContract("src/test/resources/3_0/java/all_args_constructor.yaml", null, + Map.of(AbstractJavaCodegen.GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, Boolean.TRUE), + codegenConfig -> codegenConfig.addOpenapiNormalizer("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", " true")); + JavaFileAssert.assertThat(files.get("Pet.java")) + .assertConstructor("String") + .hasParameter("type").toConstructor() + .toFileAssert() + .assertConstructor("LocalDate", "String", "String") + .hasParameter("dateOfBirth").toConstructor() + .hasParameter("name").toConstructor() + .hasParameter("type").toConstructor(); + JavaFileAssert.assertThat(files.get("Cat.java")) + .assertConstructor("Integer", "String", "LocalDate", "String", "String"); + + // test required constructor + JavaFileAssert.assertThat(files.get("Page.java")) + .assertConstructor("Integer") + .toFileAssert() + .fileContains("Constructor with only required parameters and all parameters"); + + JavaFileAssert.assertThat(files.get("PageOfPets.java")) + .assertConstructor("Integer", "List") + .hasParameter("count").toConstructor() + .hasParameter("_list").toConstructor() + .toFileAssert() + .assertConstructor("Integer") + .hasParameter("count").toConstructor(); + } + @Test public void testLombokAnnotations() throws IOException { final Map additionalProperties = new HashMap<>(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java index 76bd51b43a5f..d99c2fa678c6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java @@ -384,5 +384,11 @@ public void test31Schemas() { Assert.assertFalse(anyof2.getAnyOf().isEmpty()); Assert.assertTrue(ModelUtils.hasAnyOf(anyof2)); Assert.assertTrue(ModelUtils.isAnyOf(anyof2)); + + Schema objectSchema = ModelUtils.getSchema(openAPI, "ObjectSchema"); + Assert.assertTrue(ModelUtils.isMapSchema(objectSchema)); + + Schema complexComposedSchema = ModelUtils.getSchema(openAPI, "ComplexComposedSchema"); + Assert.assertTrue(ModelUtils.isComplexComposedSchema(complexComposedSchema)); } } diff --git a/modules/openapi-generator/src/test/resources/3_0/go/allof_multiple_ref_and_discriminator.yaml b/modules/openapi-generator/src/test/resources/3_0/go/allof_multiple_ref_and_discriminator.yaml new file mode 100644 index 000000000000..f32b662de1e5 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/go/allof_multiple_ref_and_discriminator.yaml @@ -0,0 +1,54 @@ +openapi: 3.0.0 +info: + title: Test + version: 1.0.0 +paths: {} +components: + schemas: + FinalItem: + type: object + allOf: + - $ref: '#/components/schemas/BaseItem' + - $ref: '#/components/schemas/AdditionalData' + BaseItem: + type: object + properties: + title: + type: string + type: + type: string + enum: + - FINAL + example: FINAL + discriminator: + propertyName: type + mapping: + FINAL: '#/components/schemas/FinalItem' + required: + - title + - type + AdditionalData: + type: object + properties: + prop1: + type: string + quantity: + type: integer + format: int32 + example: 1 + minimum: 1 + unitPrice: + type: number + format: double + example: 9.99 + minimum: 0.0 + totalPrice: + type: number + format: double + example: 9.99 + minimum: 0.0 + required: + - prop1 + - quantity + - unitPrice + - totalPrice \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/java/all_args_constructor.yaml b/modules/openapi-generator/src/test/resources/3_0/java/all_args_constructor.yaml new file mode 100644 index 000000000000..7e3f31a371a2 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/java/all_args_constructor.yaml @@ -0,0 +1,125 @@ +openapi: 3.0.0 +info: + title: My service + description: My service + version: 1.0.0 +servers: + - url: 'https://localhost' +paths: + /generator/test: + post: + summary: Get test generator models + responses: + 200: + description: returns Page of Pets + content: + application/json: + schema: + $ref: '#/components/schemas/PageOfPets' +components: + schemas: + Page: + properties: + count: +# test readonly and required + type: integer + readOnly: true + required: + - count + # test composition + PageOfPets: + allOf: + - $ref: '#/components/schemas/Page' + - type: object + properties: + list: + type: array + items: + $ref: '#/components/schemas/Pet' +# test inheritance + Pet: + type: object + required: + - type + properties: + dateOfBirth: + type: string + format: date + name: + type: string + type: + type: string + readOnly: true + discriminator: + propertyName: type + mapping: + CAT: '#/components/schemas/Cat' + DOG: '#/components/schemas/Dog' + Cat: + type: object + allOf: + - $ref: '#/components/schemas/Pet' + required: + - race + properties: + paws: + type: integer + race: + type: string + discriminator: + propertyName: race + mapping: + PERSIAN: '#/components/schemas/Persian' + MAINE_COON: '#/components/schemas/MaineCoon' + Dog: + type: object + allOf: + - $ref: '#/components/schemas/Pet' + required: + - race + properties: + tails: + type: integer + race: + type: string + discriminator: + propertyName: race + mapping: + POODLE: '#/components/schemas/Poodle' + LABRADOR: '#/components/schemas/Labrador' + Poodle: + type: object + allOf: + - $ref: '#/components/schemas/Dog' + properties: + hairType: + type: string + required: + - race + Labrador: + type: object + allOf: + - $ref: '#/components/schemas/Dog' + properties: + hairColor: + type: string + required: + - race + Persian: + type: object + allOf: + - $ref: '#/components/schemas/Cat' + properties: + hairType: + type: string + required: + - race + MaineCoon: + type: object + allOf: + - $ref: '#/components/schemas/Cat' + properties: + hairColor: + type: string + required: + - race diff --git a/modules/openapi-generator/src/test/resources/3_0/postman-collection/SampleProject.yaml b/modules/openapi-generator/src/test/resources/3_0/postman-collection/SampleProject.yaml index 8cc84a0ce4c9..4a93535032af 100644 --- a/modules/openapi-generator/src/test/resources/3_0/postman-collection/SampleProject.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/postman-collection/SampleProject.yaml @@ -194,6 +194,7 @@ paths: Update Email: value: email: rebecca@gmail.com + verified: true Update Last Name & Date of Birth: value: lastName: Baker diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml index 2fc18c1d6447..0d98d5759736 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml @@ -894,6 +894,13 @@ paths: '*/*': schema: $ref: '#/components/schemas/OuterObjectWithEnumProperty' + parameters: + - in: query + name: param + schema: + type: array + items: + $ref: '#/components/schemas/OuterEnumInteger' requestBody: required: true content: diff --git a/modules/openapi-generator/src/test/resources/3_0/simplifyOneOfAnyOf_test.yaml b/modules/openapi-generator/src/test/resources/3_0/simplifyOneOfAnyOf_test.yaml index 6487740be512..8f829a884d14 100644 --- a/modules/openapi-generator/src/test/resources/3_0/simplifyOneOfAnyOf_test.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/simplifyOneOfAnyOf_test.yaml @@ -40,6 +40,11 @@ components: - type: 'null' - type: null - $ref: null + OneOfTest2: + description: to test oneOf + oneOf: + - type: string + - type: 'null' OneOfNullableTest: description: to test oneOf nullable oneOf: diff --git a/modules/openapi-generator/src/test/resources/3_1/schema.yaml b/modules/openapi-generator/src/test/resources/3_1/schema.yaml index b2eb2aa8d1ca..1c3137ecf11e 100644 --- a/modules/openapi-generator/src/test/resources/3_1/schema.yaml +++ b/modules/openapi-generator/src/test/resources/3_1/schema.yaml @@ -64,4 +64,19 @@ components: oneof1: oneOf: - type: string - - type: integer \ No newline at end of file + - type: integer + ObjectSchema: + type: object + additionalProperties: false + properties: + name: + type: string + address: + type: string + ComplexComposedSchema: + oneOf: + - type: string + - type: integer + anyOf: + - type: string + - type: number \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_1/simplifyOneOfAnyOf_test.yaml b/modules/openapi-generator/src/test/resources/3_1/simplifyOneOfAnyOf_test.yaml new file mode 100644 index 000000000000..a3463b4b12c8 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_1/simplifyOneOfAnyOf_test.yaml @@ -0,0 +1,114 @@ +openapi: 3.1.0 +info: + version: 1.0.0 + title: Example + license: + name: MIT +servers: + - url: http://api.example.xyz/v1 +paths: + /person/display/{personId}: + get: + parameters: + - name: personId + in: path + required: true + description: The id of the person to retrieve + schema: + type: string + operationId: list + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/AnyOfTest" +components: + schemas: + AnyOfTest: + description: to test anyOf + anyOf: + - type: string + - type: 'null' + - type: null + - $ref: null + OneOfTest: + description: to test oneOf + oneOf: + - type: integer + - type: 'null' + - type: null + - $ref: null + OneOfTest2: + description: to test oneOf + oneOf: + - type: string + - type: 'null' + OneOfNullableTest: + description: to test oneOf nullable + oneOf: + - type: integer + - type: string + - $ref: null + SingleAnyOfTest: + description: to test anyOf (enum string only) + anyOf: + - type: string + enum: + - A + - B + Parent: + type: object + properties: + number: + anyOf: + - $ref: '#/components/schemas/Number' + ParentWithOneOfProperty: + type: object + properties: + number: + oneOf: + - $ref: '#/components/schemas/Number' + ParentWithPluralOneOfProperty: + type: object + properties: + number: + oneOf: + - $ref: '#/components/schemas/Number' + - $ref: '#/components/schemas/Number2' + Number: + enum: + - one + - two + - three + type: string + Number2: + enum: + - one + - two + type: string + AnyOfStringArrayOfString: + anyOf: + - type: string + - type: array + items: + type: string + AnyOfAnyType: + anyOf: + - type: boolean + - type: array + items: {} + - type: object + - type: string + - type: number + - type: integer + OneOfAnyType: + oneOf: + - type: object + - type: boolean + - type: number + - type: string + - type: integer + - type: array + items: {} diff --git a/modules/openapi-generator/src/test/resources/sampleConfig.json b/modules/openapi-generator/src/test/resources/sampleConfig.json index d88bd26dd822..92defc9ff976 100644 --- a/modules/openapi-generator/src/test/resources/sampleConfig.json +++ b/modules/openapi-generator/src/test/resources/sampleConfig.json @@ -1,7 +1,7 @@ { - "lang" : "java", - "inputSpec" : "swagger.yaml", - "outputDir" : "src/gen/java", + "generatorName" : "java", + "inputSpec" : "module/openapi-generator/src/test/resources/3_0/petstore.yaml", + "outputDir" : "output/src/gen/java", "verbose" : true, "skipOverwrite" : true, "templateDir" : "src/main/resources", @@ -17,6 +17,12 @@ "globalProperties" : { "systemProp1" : "value1" }, + "modelNameMappings" : { + "Tag": "Label" + }, + "openapiNormalizer" : { + "REFACTOR_ALLOF_WITH_PROPERTIES_ONLY": true + }, "instantiationTypes" : { "hello" : "world" }, @@ -30,4 +36,4 @@ "type1" : "import1" }, "languageSpecificPrimitives" : [ "rolex" ] -} \ No newline at end of file +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Bird.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Bird.java index 47f65c82feb1..e33947e522db 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Bird.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Bird.java @@ -69,7 +69,6 @@ public void setSize(String size) { this.size = size; } - public Bird color(String color) { this.color = color; diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java index 475d09bfd9b4..7cbe7c3b19f7 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java @@ -69,7 +69,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQuery.java index 39f533887d09..2f88f2f146f0 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQuery.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQuery.java @@ -79,7 +79,6 @@ public void setSuffix(String suffix) { this.suffix = suffix; } - public DataQuery text(String text) { this.text = text; @@ -105,7 +104,6 @@ public void setText(String text) { this.text = text; } - public DataQuery date(OffsetDateTime date) { this.date = date; diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DefaultValue.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DefaultValue.java index d487a67a8210..dddd3d2ebd54 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DefaultValue.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DefaultValue.java @@ -146,7 +146,6 @@ public void setArrayStringEnumRefDefault(List arrayStringEnumRefD this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; } - public DefaultValue arrayStringEnumDefault(List arrayStringEnumDefault) { this.arrayStringEnumDefault = arrayStringEnumDefault; @@ -180,7 +179,6 @@ public void setArrayStringEnumDefault(List arrayStri this.arrayStringEnumDefault = arrayStringEnumDefault; } - public DefaultValue arrayStringDefault(List arrayStringDefault) { this.arrayStringDefault = arrayStringDefault; @@ -214,7 +212,6 @@ public void setArrayStringDefault(List arrayStringDefault) { this.arrayStringDefault = arrayStringDefault; } - public DefaultValue arrayIntegerDefault(List arrayIntegerDefault) { this.arrayIntegerDefault = arrayIntegerDefault; @@ -248,7 +245,6 @@ public void setArrayIntegerDefault(List arrayIntegerDefault) { this.arrayIntegerDefault = arrayIntegerDefault; } - public DefaultValue arrayString(List arrayString) { this.arrayString = arrayString; @@ -282,7 +278,6 @@ public void setArrayString(List arrayString) { this.arrayString = arrayString; } - public DefaultValue arrayStringNullable(List arrayStringNullable) { this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); @@ -328,7 +323,6 @@ public void setArrayStringNullable(List arrayStringNullable) { this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); } - public DefaultValue arrayStringExtensionNullable(List arrayStringExtensionNullable) { this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); @@ -374,7 +368,6 @@ public void setArrayStringExtensionNullable(List arrayStringExtensionNul this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); } - public DefaultValue stringNullable(String stringNullable) { this.stringNullable = JsonNullable.of(stringNullable); diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java index 7d97d0fe960a..3b4c43c5d364 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java @@ -74,7 +74,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public NumberPropertiesOnly _float(Float _float) { this._float = _float; @@ -100,7 +99,6 @@ public void setFloat(Float _float) { this._float = _float; } - public NumberPropertiesOnly _double(Double _double) { this._double = _double; diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java index 1b71752b0641..ecdf88998091 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java @@ -127,7 +127,6 @@ public void setId(Long id) { this.id = id; } - public Pet name(String name) { this.name = name; @@ -153,7 +152,6 @@ public void setName(String name) { this.name = name; } - public Pet category(Category category) { this.category = category; @@ -179,7 +177,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; @@ -213,7 +210,6 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -247,7 +243,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Query.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Query.java index 21c8369f046e..bcd52beab406 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Query.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Query.java @@ -39,7 +39,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0-SNAPSHOT") public class Query { public static final String JSON_PROPERTY_ID = "id"; - private Long id; + protected Long id; /** * Gets or Sets outcomes @@ -79,7 +79,7 @@ public static OutcomesEnum fromValue(String value) { } public static final String JSON_PROPERTY_OUTCOMES = "outcomes"; - private List outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); + protected List outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); public Query() { } @@ -109,7 +109,6 @@ public void setId(Long id) { this.id = id; } - public Query outcomes(List outcomes) { this.outcomes = outcomes; diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java index d7e32bb9390f..545619fcec5e 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java @@ -69,7 +69,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java index 8b856a0edb3e..8fbbc49b4372 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java @@ -78,7 +78,6 @@ public void setSize(String size) { this.size = size; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) { this.color = color; @@ -104,7 +103,6 @@ public void setColor(String color) { this.color = color; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) { this.id = id; @@ -130,7 +128,6 @@ public void setId(Long id) { this.id = id; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) { this.name = name; diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java index 3fbcb3309509..f409f546590c 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java @@ -153,6 +153,7 @@ private HttpRequest.Builder testAuthHttpBasicRequestBuilder() throws ApiExceptio } return localVarRequestBuilder; } + /** * To test HTTP bearer authentication * To test HTTP bearer authentication @@ -226,4 +227,5 @@ private HttpRequest.Builder testAuthHttpBearerRequestBuilder() throws ApiExcepti } return localVarRequestBuilder; } + } diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java index 0b868dc5000d..47ce48b0e463 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java @@ -123,7 +123,7 @@ public ApiResponse testBinaryGifWithHttpInfo() throws ApiException { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -155,6 +155,7 @@ private HttpRequest.Builder testBinaryGifRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * Test body parameter(s) * Test body parameter(s) @@ -236,6 +237,7 @@ private HttpRequest.Builder testBodyApplicationOctetstreamBinaryRequestBuilder(F } return localVarRequestBuilder; } + /** * Test array of binary in multipart mime * Test array of binary in multipart mime @@ -350,6 +352,7 @@ private HttpRequest.Builder testBodyMultipartFormdataArrayOfBinaryRequestBuilder } return localVarRequestBuilder; } + /** * Test single binary in multipart mime * Test single binary in multipart mime @@ -458,6 +461,7 @@ private HttpRequest.Builder testBodyMultipartFormdataSingleBinaryRequestBuilder( } return localVarRequestBuilder; } + /** * Test body parameter(s) * Test body parameter(s) @@ -493,7 +497,7 @@ public ApiResponse testEchoBodyAllOfPetWithHttpInfo(Pet pet) throws ApiExce return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -531,6 +535,7 @@ private HttpRequest.Builder testEchoBodyAllOfPetRequestBuilder(Pet pet) throws A } return localVarRequestBuilder; } + /** * Test free form object * Test free form object @@ -612,6 +617,7 @@ private HttpRequest.Builder testEchoBodyFreeFormObjectResponseStringRequestBuild } return localVarRequestBuilder; } + /** * Test body parameter(s) * Test body parameter(s) @@ -647,7 +653,7 @@ public ApiResponse testEchoBodyPetWithHttpInfo(Pet pet) throws ApiException return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -685,6 +691,7 @@ private HttpRequest.Builder testEchoBodyPetRequestBuilder(Pet pet) throws ApiExc } return localVarRequestBuilder; } + /** * Test empty response body * Test empty response body @@ -766,6 +773,7 @@ private HttpRequest.Builder testEchoBodyPetResponseStringRequestBuilder(Pet pet) } return localVarRequestBuilder; } + /** * Test string enum response body * Test string enum response body @@ -801,7 +809,7 @@ public ApiResponse testEchoBodyStringEnumWithHttpInfo(String body return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -839,6 +847,7 @@ private HttpRequest.Builder testEchoBodyStringEnumRequestBuilder(String body) th } return localVarRequestBuilder; } + /** * Test empty json (request body) * Test empty json (request body) @@ -920,4 +929,5 @@ private HttpRequest.Builder testEchoBodyTagResponseStringRequestBuilder(Tag tag) } return localVarRequestBuilder; } + } diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/FormApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/FormApi.java index ecb6239d617f..6ccb4b0138b1 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/FormApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/FormApi.java @@ -186,6 +186,7 @@ private HttpRequest.Builder testFormIntegerBooleanStringRequestBuilder(Integer i } return localVarRequestBuilder; } + /** * Test form parameter(s) for multipart schema * Test form parameter(s) for multipart schema @@ -297,6 +298,7 @@ private HttpRequest.Builder testFormObjectMultipartRequestBuilder(TestFormObject } return localVarRequestBuilder; } + /** * Test form parameter(s) for oneOf schema * Test form parameter(s) for oneOf schema @@ -411,4 +413,5 @@ private HttpRequest.Builder testFormOneofRequestBuilder(String form1, Integer fo } return localVarRequestBuilder; } + } diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/HeaderApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/HeaderApi.java index c15b94f7b75b..e0acce061a60 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/HeaderApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/HeaderApi.java @@ -185,4 +185,5 @@ private HttpRequest.Builder testHeaderIntegerBooleanStringEnumsRequestBuilder(In } return localVarRequestBuilder; } + } diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java index f7050909e69b..668040b87927 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java @@ -188,4 +188,5 @@ private HttpRequest.Builder testsPathStringPathStringIntegerPathIntegerEnumNonre } return localVarRequestBuilder; } + } diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java index 114c7d76bd46..3bbd7dda89c7 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java @@ -187,6 +187,7 @@ private HttpRequest.Builder testEnumRefStringRequestBuilder(String enumNonrefStr } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -285,6 +286,7 @@ private HttpRequest.Builder testQueryDatetimeDateStringRequestBuilder(Instant da } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -383,6 +385,7 @@ private HttpRequest.Builder testQueryIntegerBooleanStringRequestBuilder(Integer } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -475,6 +478,7 @@ private HttpRequest.Builder testQueryStyleDeepObjectExplodeTrueObjectRequestBuil } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -567,6 +571,7 @@ private HttpRequest.Builder testQueryStyleDeepObjectExplodeTrueObjectAllOfReques } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -657,6 +662,7 @@ private HttpRequest.Builder testQueryStyleFormExplodeFalseArrayIntegerRequestBui } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -747,6 +753,7 @@ private HttpRequest.Builder testQueryStyleFormExplodeFalseArrayStringRequestBuil } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -837,6 +844,7 @@ private HttpRequest.Builder testQueryStyleFormExplodeTrueArrayStringRequestBuild } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -932,6 +940,7 @@ private HttpRequest.Builder testQueryStyleFormExplodeTrueObjectRequestBuilder(Pe } return localVarRequestBuilder; } + /** * Test query parameter(s) * Test query parameter(s) @@ -1022,4 +1031,5 @@ private HttpRequest.Builder testQueryStyleFormExplodeTrueObjectAllOfRequestBuild } return localVarRequestBuilder; } + } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java index faac0e455a78..4df37d3b3d50 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -491,6 +491,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Bird.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Bird.java index d6b47a512ae8..7724a0f1080e 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Bird.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Bird.java @@ -66,7 +66,6 @@ public void setSize(String size) { this.size = size; } - public Bird color(String color) { this.color = color; diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Category.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Category.java index 2e122682cd05..55d3b89d7fea 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/DataQuery.java index 7acf3b13d742..d0e6a19d3ff8 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/DataQuery.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/DataQuery.java @@ -76,7 +76,6 @@ public void setSuffix(String suffix) { this.suffix = suffix; } - public DataQuery text(String text) { this.text = text; @@ -102,7 +101,6 @@ public void setText(String text) { this.text = text; } - public DataQuery date(OffsetDateTime date) { this.date = date; diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/DefaultValue.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/DefaultValue.java index 526dc2dabdd1..8b37650837f5 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/DefaultValue.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/DefaultValue.java @@ -143,7 +143,6 @@ public void setArrayStringEnumRefDefault(List arrayStringEnumRefD this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; } - public DefaultValue arrayStringEnumDefault(List arrayStringEnumDefault) { this.arrayStringEnumDefault = arrayStringEnumDefault; @@ -177,7 +176,6 @@ public void setArrayStringEnumDefault(List arrayStri this.arrayStringEnumDefault = arrayStringEnumDefault; } - public DefaultValue arrayStringDefault(List arrayStringDefault) { this.arrayStringDefault = arrayStringDefault; @@ -211,7 +209,6 @@ public void setArrayStringDefault(List arrayStringDefault) { this.arrayStringDefault = arrayStringDefault; } - public DefaultValue arrayIntegerDefault(List arrayIntegerDefault) { this.arrayIntegerDefault = arrayIntegerDefault; @@ -245,7 +242,6 @@ public void setArrayIntegerDefault(List arrayIntegerDefault) { this.arrayIntegerDefault = arrayIntegerDefault; } - public DefaultValue arrayString(List arrayString) { this.arrayString = arrayString; @@ -279,7 +275,6 @@ public void setArrayString(List arrayString) { this.arrayString = arrayString; } - public DefaultValue arrayStringNullable(List arrayStringNullable) { this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); @@ -325,7 +320,6 @@ public void setArrayStringNullable(List arrayStringNullable) { this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); } - public DefaultValue arrayStringExtensionNullable(List arrayStringExtensionNullable) { this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); @@ -371,7 +365,6 @@ public void setArrayStringExtensionNullable(List arrayStringExtensionNul this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); } - public DefaultValue stringNullable(String stringNullable) { this.stringNullable = JsonNullable.of(stringNullable); diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java index 2a2a1ffaafb6..02f9fc7e9191 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java @@ -71,7 +71,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public NumberPropertiesOnly _float(Float _float) { this._float = _float; @@ -97,7 +96,6 @@ public void setFloat(Float _float) { this._float = _float; } - public NumberPropertiesOnly _double(Double _double) { this._double = _double; diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java index 2aa25f45437c..ebe75a234c23 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java @@ -124,7 +124,6 @@ public void setId(Long id) { this.id = id; } - public Pet name(String name) { this.name = name; @@ -150,7 +149,6 @@ public void setName(String name) { this.name = name; } - public Pet category(Category category) { this.category = category; @@ -176,7 +174,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; @@ -210,7 +207,6 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -244,7 +240,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Query.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Query.java index d8f94afaa1b6..f049478048a8 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Query.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Query.java @@ -36,7 +36,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0-SNAPSHOT") public class Query { public static final String JSON_PROPERTY_ID = "id"; - private Long id; + protected Long id; /** * Gets or Sets outcomes @@ -76,7 +76,7 @@ public static OutcomesEnum fromValue(String value) { } public static final String JSON_PROPERTY_OUTCOMES = "outcomes"; - private List outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); + protected List outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); public Query() { } @@ -106,7 +106,6 @@ public void setId(Long id) { this.id = id; } - public Query outcomes(List outcomes) { this.outcomes = outcomes; diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java index 9c9e7f3a095a..8fe3d5c6f701 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java index 68ff76033f62..07862ef33e2c 100644 --- a/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java +++ b/samples/client/echo_api/java/resteasy/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java @@ -75,7 +75,6 @@ public void setSize(String size) { this.size = size; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) { this.color = color; @@ -101,7 +100,6 @@ public void setColor(String color) { this.color = color; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) { this.id = id; @@ -127,7 +125,6 @@ public void setId(Long id) { this.id = id; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) { this.name = name; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Bird.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Bird.java index d6b47a512ae8..7724a0f1080e 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Bird.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Bird.java @@ -66,7 +66,6 @@ public void setSize(String size) { this.size = size; } - public Bird color(String color) { this.color = color; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java index 2e122682cd05..55d3b89d7fea 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DataQuery.java index 7acf3b13d742..d0e6a19d3ff8 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DataQuery.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DataQuery.java @@ -76,7 +76,6 @@ public void setSuffix(String suffix) { this.suffix = suffix; } - public DataQuery text(String text) { this.text = text; @@ -102,7 +101,6 @@ public void setText(String text) { this.text = text; } - public DataQuery date(OffsetDateTime date) { this.date = date; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DefaultValue.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DefaultValue.java index 4f499f71796b..e17198aea641 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DefaultValue.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DefaultValue.java @@ -143,7 +143,6 @@ public void setArrayStringEnumRefDefault(List arrayStringEnumRefD this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; } - public DefaultValue arrayStringEnumDefault(List arrayStringEnumDefault) { this.arrayStringEnumDefault = arrayStringEnumDefault; @@ -177,7 +176,6 @@ public void setArrayStringEnumDefault(List arrayStri this.arrayStringEnumDefault = arrayStringEnumDefault; } - public DefaultValue arrayStringDefault(List arrayStringDefault) { this.arrayStringDefault = arrayStringDefault; @@ -211,7 +209,6 @@ public void setArrayStringDefault(List arrayStringDefault) { this.arrayStringDefault = arrayStringDefault; } - public DefaultValue arrayIntegerDefault(List arrayIntegerDefault) { this.arrayIntegerDefault = arrayIntegerDefault; @@ -245,7 +242,6 @@ public void setArrayIntegerDefault(List arrayIntegerDefault) { this.arrayIntegerDefault = arrayIntegerDefault; } - public DefaultValue arrayString(List arrayString) { this.arrayString = arrayString; @@ -279,7 +275,6 @@ public void setArrayString(List arrayString) { this.arrayString = arrayString; } - public DefaultValue arrayStringNullable(List arrayStringNullable) { this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); @@ -325,7 +320,6 @@ public void setArrayStringNullable(List arrayStringNullable) { this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); } - public DefaultValue arrayStringExtensionNullable(List arrayStringExtensionNullable) { this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); @@ -371,7 +365,6 @@ public void setArrayStringExtensionNullable(List arrayStringExtensionNul this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); } - public DefaultValue stringNullable(String stringNullable) { this.stringNullable = JsonNullable.of(stringNullable); diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java index 2a2a1ffaafb6..02f9fc7e9191 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java @@ -71,7 +71,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public NumberPropertiesOnly _float(Float _float) { this._float = _float; @@ -97,7 +96,6 @@ public void setFloat(Float _float) { this._float = _float; } - public NumberPropertiesOnly _double(Double _double) { this._double = _double; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java index a3320b9a16dc..d7e6557bd8e1 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java @@ -124,7 +124,6 @@ public void setId(Long id) { this.id = id; } - public Pet name(String name) { this.name = name; @@ -150,7 +149,6 @@ public void setName(String name) { this.name = name; } - public Pet category(Category category) { this.category = category; @@ -176,7 +174,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; @@ -210,7 +207,6 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -244,7 +240,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Query.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Query.java index d8f94afaa1b6..f049478048a8 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Query.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Query.java @@ -36,7 +36,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0-SNAPSHOT") public class Query { public static final String JSON_PROPERTY_ID = "id"; - private Long id; + protected Long id; /** * Gets or Sets outcomes @@ -76,7 +76,7 @@ public static OutcomesEnum fromValue(String value) { } public static final String JSON_PROPERTY_OUTCOMES = "outcomes"; - private List outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); + protected List outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); public Query() { } @@ -106,7 +106,6 @@ public void setId(Long id) { this.id = id; } - public Query outcomes(List outcomes) { this.outcomes = outcomes; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java index 9c9e7f3a095a..8fe3d5c6f701 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java index 68ff76033f62..07862ef33e2c 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java @@ -75,7 +75,6 @@ public void setSize(String size) { this.size = size; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) { this.color = color; @@ -101,7 +100,6 @@ public void setColor(String color) { this.color = color; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) { this.id = id; @@ -127,7 +125,6 @@ public void setId(Long id) { this.id = id; } - public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) { this.name = name; diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES index c51141c743e7..53ad43f78dc2 100644 --- a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES @@ -24,13 +24,13 @@ docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md git_push.sh phpunit.xml.dist +src/ApiException.php src/Api/AuthApi.php src/Api/BodyApi.php src/Api/FormApi.php src/Api/HeaderApi.php src/Api/PathApi.php src/Api/QueryApi.php -src/ApiException.php src/Configuration.php src/HeaderSelector.php src/Model/Bird.php diff --git a/samples/client/echo_api/php-nextgen/phpunit.xml.dist b/samples/client/echo_api/php-nextgen/phpunit.xml.dist index 1135449a8d9b..cba878f52707 100644 --- a/samples/client/echo_api/php-nextgen/phpunit.xml.dist +++ b/samples/client/echo_api/php-nextgen/phpunit.xml.dist @@ -2,8 +2,8 @@ - ./src/Api - ./src/Model + ./src\/Api + ./src\/Model diff --git a/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php b/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php index 1f9c52c426c7..f161a39ea263 100644 --- a/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php +++ b/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php @@ -387,7 +387,6 @@ public static function serializeCollection(array $collection, string $style, boo * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[]|null $httpHeaders HTTP headers - * @param string|null $discriminator discriminator if polymorphism is used * * @return mixed a single or an array of $class instances */ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Bird.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Bird.md index 84abb75d24a0..e61d8458c978 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Bird.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Bird.md @@ -23,7 +23,7 @@ print(Bird.to_json()) # convert the object into a dict bird_dict = bird_instance.to_dict() # create an instance of Bird from a dict -bird_form_dict = bird.from_dict(bird_dict) +bird_from_dict = Bird.from_dict(bird_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Category.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Category.md index 73b70c88dc56..9a807466f62a 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Category.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Category.md @@ -23,7 +23,7 @@ print(Category.to_json()) # convert the object into a dict category_dict = category_instance.to_dict() # create an instance of Category from a dict -category_form_dict = category.from_dict(category_dict) +category_from_dict = Category.from_dict(category_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DataQuery.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DataQuery.md index 89fcc0409e56..7ea37bfd23e1 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DataQuery.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DataQuery.md @@ -24,7 +24,7 @@ print(DataQuery.to_json()) # convert the object into a dict data_query_dict = data_query_instance.to_dict() # create an instance of DataQuery from a dict -data_query_form_dict = data_query.from_dict(data_query_dict) +data_query_from_dict = DataQuery.from_dict(data_query_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DefaultValue.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DefaultValue.md index 818d4ffc745f..7c1668c0d6c6 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DefaultValue.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DefaultValue.md @@ -30,7 +30,7 @@ print(DefaultValue.to_json()) # convert the object into a dict default_value_dict = default_value_instance.to_dict() # create an instance of DefaultValue from a dict -default_value_form_dict = default_value.from_dict(default_value_dict) +default_value_from_dict = DefaultValue.from_dict(default_value_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/NumberPropertiesOnly.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/NumberPropertiesOnly.md index 43ed07a191cc..1f9cb5a1f634 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/NumberPropertiesOnly.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/NumberPropertiesOnly.md @@ -24,7 +24,7 @@ print(NumberPropertiesOnly.to_json()) # convert the object into a dict number_properties_only_dict = number_properties_only_instance.to_dict() # create an instance of NumberPropertiesOnly from a dict -number_properties_only_form_dict = number_properties_only.from_dict(number_properties_only_dict) +number_properties_only_from_dict = NumberPropertiesOnly.from_dict(number_properties_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Pet.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Pet.md index be953cc4b966..99b4bf3ab010 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Pet.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Pet.md @@ -27,7 +27,7 @@ print(Pet.to_json()) # convert the object into a dict pet_dict = pet_instance.to_dict() # create an instance of Pet from a dict -pet_form_dict = pet.from_dict(pet_dict) +pet_from_dict = Pet.from_dict(pet_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Query.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Query.md index 85298b7c39aa..d39693eb5b93 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Query.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Query.md @@ -23,7 +23,7 @@ print(Query.to_json()) # convert the object into a dict query_dict = query_instance.to_dict() # create an instance of Query from a dict -query_form_dict = query.from_dict(query_dict) +query_from_dict = Query.from_dict(query_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Tag.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Tag.md index 4026198dc91f..21314992cf43 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Tag.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Tag.md @@ -23,7 +23,7 @@ print(Tag.to_json()) # convert the object into a dict tag_dict = tag_instance.to_dict() # create an instance of Tag from a dict -tag_form_dict = tag.from_dict(tag_dict) +tag_from_dict = Tag.from_dict(tag_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestFormObjectMultipartRequestMarker.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestFormObjectMultipartRequestMarker.md index 254c3b6a045a..bf4046eb4648 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestFormObjectMultipartRequestMarker.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestFormObjectMultipartRequestMarker.md @@ -22,7 +22,7 @@ print(TestFormObjectMultipartRequestMarker.to_json()) # convert the object into a dict test_form_object_multipart_request_marker_dict = test_form_object_multipart_request_marker_instance.to_dict() # create an instance of TestFormObjectMultipartRequestMarker from a dict -test_form_object_multipart_request_marker_form_dict = test_form_object_multipart_request_marker.from_dict(test_form_object_multipart_request_marker_dict) +test_form_object_multipart_request_marker_from_dict = TestFormObjectMultipartRequestMarker.from_dict(test_form_object_multipart_request_marker_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md index 0814a8129e6c..96c36ca12e0f 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md @@ -25,7 +25,7 @@ print(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.to_json # convert the object into a dict test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict = test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance.to_dict() # create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter from a dict -test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_form_dict = test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.from_dict(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict) +test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_from_dict = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.from_dict(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md index e80d8cfbe1b5..846a0941a09c 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -22,7 +22,7 @@ print(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.to_json()) # convert the object into a dict test_query_style_form_explode_true_array_string_query_object_parameter_dict = test_query_style_form_explode_true_array_string_query_object_parameter_instance.to_dict() # create an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter from a dict -test_query_style_form_explode_true_array_string_query_object_parameter_form_dict = test_query_style_form_explode_true_array_string_query_object_parameter.from_dict(test_query_style_form_explode_true_array_string_query_object_parameter_dict) +test_query_style_form_explode_true_array_string_query_object_parameter_from_dict = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.from_dict(test_query_style_form_explode_true_array_string_query_object_parameter_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py index b03fdf002669..5e39f780d88a 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py @@ -351,6 +351,8 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value elif isinstance(obj, SecretStr): return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): diff --git a/samples/client/echo_api/python-pydantic-v1/docs/Bird.md b/samples/client/echo_api/python-pydantic-v1/docs/Bird.md index f1ad71c2150f..ae753e9c6714 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/Bird.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/Bird.md @@ -22,7 +22,7 @@ print Bird.to_json() # convert the object into a dict bird_dict = bird_instance.to_dict() # create an instance of Bird from a dict -bird_form_dict = bird.from_dict(bird_dict) +bird_from_dict = Bird.from_dict(bird_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/Category.md b/samples/client/echo_api/python-pydantic-v1/docs/Category.md index bf23e3b044dd..860b6b6bcb14 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/Category.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/Category.md @@ -22,7 +22,7 @@ print Category.to_json() # convert the object into a dict category_dict = category_instance.to_dict() # create an instance of Category from a dict -category_form_dict = category.from_dict(category_dict) +category_from_dict = Category.from_dict(category_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/DataQuery.md b/samples/client/echo_api/python-pydantic-v1/docs/DataQuery.md index bac43a6cc706..58c08242aa08 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/DataQuery.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/DataQuery.md @@ -23,7 +23,7 @@ print DataQuery.to_json() # convert the object into a dict data_query_dict = data_query_instance.to_dict() # create an instance of DataQuery from a dict -data_query_form_dict = data_query.from_dict(data_query_dict) +data_query_from_dict = DataQuery.from_dict(data_query_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/DefaultValue.md b/samples/client/echo_api/python-pydantic-v1/docs/DefaultValue.md index fcdbebf0e0ad..b2a8cdfd6216 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/DefaultValue.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/DefaultValue.md @@ -29,7 +29,7 @@ print DefaultValue.to_json() # convert the object into a dict default_value_dict = default_value_instance.to_dict() # create an instance of DefaultValue from a dict -default_value_form_dict = default_value.from_dict(default_value_dict) +default_value_from_dict = DefaultValue.from_dict(default_value_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/NumberPropertiesOnly.md b/samples/client/echo_api/python-pydantic-v1/docs/NumberPropertiesOnly.md index e35fad694e77..202d7f717356 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/NumberPropertiesOnly.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/NumberPropertiesOnly.md @@ -23,7 +23,7 @@ print NumberPropertiesOnly.to_json() # convert the object into a dict number_properties_only_dict = number_properties_only_instance.to_dict() # create an instance of NumberPropertiesOnly from a dict -number_properties_only_form_dict = number_properties_only.from_dict(number_properties_only_dict) +number_properties_only_from_dict = NumberPropertiesOnly.from_dict(number_properties_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/Pet.md b/samples/client/echo_api/python-pydantic-v1/docs/Pet.md index bd578ba9a501..82135416b79d 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/Pet.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/Pet.md @@ -26,7 +26,7 @@ print Pet.to_json() # convert the object into a dict pet_dict = pet_instance.to_dict() # create an instance of Pet from a dict -pet_form_dict = pet.from_dict(pet_dict) +pet_from_dict = Pet.from_dict(pet_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/Query.md b/samples/client/echo_api/python-pydantic-v1/docs/Query.md index 8a3462120895..ff05faf95865 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/Query.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/Query.md @@ -22,7 +22,7 @@ print Query.to_json() # convert the object into a dict query_dict = query_instance.to_dict() # create an instance of Query from a dict -query_form_dict = query.from_dict(query_dict) +query_from_dict = Query.from_dict(query_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/Tag.md b/samples/client/echo_api/python-pydantic-v1/docs/Tag.md index febb268b1443..6789bb7aa1d4 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/Tag.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/Tag.md @@ -22,7 +22,7 @@ print Tag.to_json() # convert the object into a dict tag_dict = tag_instance.to_dict() # create an instance of Tag from a dict -tag_form_dict = tag.from_dict(tag_dict) +tag_from_dict = Tag.from_dict(tag_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/TestFormObjectMultipartRequestMarker.md b/samples/client/echo_api/python-pydantic-v1/docs/TestFormObjectMultipartRequestMarker.md index bccc9a9405f7..b436e8945baf 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/TestFormObjectMultipartRequestMarker.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/TestFormObjectMultipartRequestMarker.md @@ -21,7 +21,7 @@ print TestFormObjectMultipartRequestMarker.to_json() # convert the object into a dict test_form_object_multipart_request_marker_dict = test_form_object_multipart_request_marker_instance.to_dict() # create an instance of TestFormObjectMultipartRequestMarker from a dict -test_form_object_multipart_request_marker_form_dict = test_form_object_multipart_request_marker.from_dict(test_form_object_multipart_request_marker_dict) +test_form_object_multipart_request_marker_from_dict = TestFormObjectMultipartRequestMarker.from_dict(test_form_object_multipart_request_marker_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md b/samples/client/echo_api/python-pydantic-v1/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md index 3b0a87b71c53..3ed6e704f6f1 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md @@ -24,7 +24,7 @@ print TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.to_json # convert the object into a dict test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict = test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance.to_dict() # create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter from a dict -test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_form_dict = test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.from_dict(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict) +test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_from_dict = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.from_dict(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/python-pydantic-v1/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md index c741b723f003..b087d3a3774f 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -21,7 +21,7 @@ print TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.to_json() # convert the object into a dict test_query_style_form_explode_true_array_string_query_object_parameter_dict = test_query_style_form_explode_true_array_string_query_object_parameter_instance.to_dict() # create an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter from a dict -test_query_style_form_explode_true_array_string_query_object_parameter_form_dict = test_query_style_form_explode_true_array_string_query_object_parameter.from_dict(test_query_style_form_explode_true_array_string_query_object_parameter_dict) +test_query_style_form_explode_true_array_string_query_object_parameter_from_dict = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.from_dict(test_query_style_form_explode_true_array_string_query_object_parameter_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/Bird.md b/samples/client/echo_api/python/docs/Bird.md index 84abb75d24a0..e61d8458c978 100644 --- a/samples/client/echo_api/python/docs/Bird.md +++ b/samples/client/echo_api/python/docs/Bird.md @@ -23,7 +23,7 @@ print(Bird.to_json()) # convert the object into a dict bird_dict = bird_instance.to_dict() # create an instance of Bird from a dict -bird_form_dict = bird.from_dict(bird_dict) +bird_from_dict = Bird.from_dict(bird_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/Category.md b/samples/client/echo_api/python/docs/Category.md index 73b70c88dc56..9a807466f62a 100644 --- a/samples/client/echo_api/python/docs/Category.md +++ b/samples/client/echo_api/python/docs/Category.md @@ -23,7 +23,7 @@ print(Category.to_json()) # convert the object into a dict category_dict = category_instance.to_dict() # create an instance of Category from a dict -category_form_dict = category.from_dict(category_dict) +category_from_dict = Category.from_dict(category_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/DataQuery.md b/samples/client/echo_api/python/docs/DataQuery.md index 89fcc0409e56..7ea37bfd23e1 100644 --- a/samples/client/echo_api/python/docs/DataQuery.md +++ b/samples/client/echo_api/python/docs/DataQuery.md @@ -24,7 +24,7 @@ print(DataQuery.to_json()) # convert the object into a dict data_query_dict = data_query_instance.to_dict() # create an instance of DataQuery from a dict -data_query_form_dict = data_query.from_dict(data_query_dict) +data_query_from_dict = DataQuery.from_dict(data_query_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/DefaultValue.md b/samples/client/echo_api/python/docs/DefaultValue.md index 818d4ffc745f..7c1668c0d6c6 100644 --- a/samples/client/echo_api/python/docs/DefaultValue.md +++ b/samples/client/echo_api/python/docs/DefaultValue.md @@ -30,7 +30,7 @@ print(DefaultValue.to_json()) # convert the object into a dict default_value_dict = default_value_instance.to_dict() # create an instance of DefaultValue from a dict -default_value_form_dict = default_value.from_dict(default_value_dict) +default_value_from_dict = DefaultValue.from_dict(default_value_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/NumberPropertiesOnly.md b/samples/client/echo_api/python/docs/NumberPropertiesOnly.md index 43ed07a191cc..1f9cb5a1f634 100644 --- a/samples/client/echo_api/python/docs/NumberPropertiesOnly.md +++ b/samples/client/echo_api/python/docs/NumberPropertiesOnly.md @@ -24,7 +24,7 @@ print(NumberPropertiesOnly.to_json()) # convert the object into a dict number_properties_only_dict = number_properties_only_instance.to_dict() # create an instance of NumberPropertiesOnly from a dict -number_properties_only_form_dict = number_properties_only.from_dict(number_properties_only_dict) +number_properties_only_from_dict = NumberPropertiesOnly.from_dict(number_properties_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/Pet.md b/samples/client/echo_api/python/docs/Pet.md index be953cc4b966..99b4bf3ab010 100644 --- a/samples/client/echo_api/python/docs/Pet.md +++ b/samples/client/echo_api/python/docs/Pet.md @@ -27,7 +27,7 @@ print(Pet.to_json()) # convert the object into a dict pet_dict = pet_instance.to_dict() # create an instance of Pet from a dict -pet_form_dict = pet.from_dict(pet_dict) +pet_from_dict = Pet.from_dict(pet_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/Query.md b/samples/client/echo_api/python/docs/Query.md index 85298b7c39aa..d39693eb5b93 100644 --- a/samples/client/echo_api/python/docs/Query.md +++ b/samples/client/echo_api/python/docs/Query.md @@ -23,7 +23,7 @@ print(Query.to_json()) # convert the object into a dict query_dict = query_instance.to_dict() # create an instance of Query from a dict -query_form_dict = query.from_dict(query_dict) +query_from_dict = Query.from_dict(query_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/Tag.md b/samples/client/echo_api/python/docs/Tag.md index 4026198dc91f..21314992cf43 100644 --- a/samples/client/echo_api/python/docs/Tag.md +++ b/samples/client/echo_api/python/docs/Tag.md @@ -23,7 +23,7 @@ print(Tag.to_json()) # convert the object into a dict tag_dict = tag_instance.to_dict() # create an instance of Tag from a dict -tag_form_dict = tag.from_dict(tag_dict) +tag_from_dict = Tag.from_dict(tag_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/TestFormObjectMultipartRequestMarker.md b/samples/client/echo_api/python/docs/TestFormObjectMultipartRequestMarker.md index 254c3b6a045a..bf4046eb4648 100644 --- a/samples/client/echo_api/python/docs/TestFormObjectMultipartRequestMarker.md +++ b/samples/client/echo_api/python/docs/TestFormObjectMultipartRequestMarker.md @@ -22,7 +22,7 @@ print(TestFormObjectMultipartRequestMarker.to_json()) # convert the object into a dict test_form_object_multipart_request_marker_dict = test_form_object_multipart_request_marker_instance.to_dict() # create an instance of TestFormObjectMultipartRequestMarker from a dict -test_form_object_multipart_request_marker_form_dict = test_form_object_multipart_request_marker.from_dict(test_form_object_multipart_request_marker_dict) +test_form_object_multipart_request_marker_from_dict = TestFormObjectMultipartRequestMarker.from_dict(test_form_object_multipart_request_marker_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md b/samples/client/echo_api/python/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md index 0814a8129e6c..96c36ca12e0f 100644 --- a/samples/client/echo_api/python/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md +++ b/samples/client/echo_api/python/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md @@ -25,7 +25,7 @@ print(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.to_json # convert the object into a dict test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict = test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance.to_dict() # create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter from a dict -test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_form_dict = test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.from_dict(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict) +test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_from_dict = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.from_dict(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/python/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md index e80d8cfbe1b5..846a0941a09c 100644 --- a/samples/client/echo_api/python/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md +++ b/samples/client/echo_api/python/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -22,7 +22,7 @@ print(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.to_json()) # convert the object into a dict test_query_style_form_explode_true_array_string_query_object_parameter_dict = test_query_style_form_explode_true_array_string_query_object_parameter_instance.to_dict() # create an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter from a dict -test_query_style_form_explode_true_array_string_query_object_parameter_form_dict = test_query_style_form_explode_true_array_string_query_object_parameter.from_dict(test_query_style_form_explode_true_array_string_query_object_parameter_dict) +test_query_style_form_explode_true_array_string_query_object_parameter_from_dict = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.from_dict(test_query_style_form_explode_true_array_string_query_object_parameter_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/echo_api/python/openapi_client/api_client.py b/samples/client/echo_api/python/openapi_client/api_client.py index b03fdf002669..5e39f780d88a 100644 --- a/samples/client/echo_api/python/openapi_client/api_client.py +++ b/samples/client/echo_api/python/openapi_client/api_client.py @@ -351,6 +351,8 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value elif isinstance(obj, SecretStr): return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): diff --git a/samples/client/echo_api/r/.openapi-generator/FILES b/samples/client/echo_api/r/.openapi-generator/FILES index cf3034e39d0c..79f7452245e1 100644 --- a/samples/client/echo_api/r/.openapi-generator/FILES +++ b/samples/client/echo_api/r/.openapi-generator/FILES @@ -5,6 +5,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/api_client.R R/api_response.R R/auth_api.R @@ -25,7 +26,6 @@ R/tag.R R/test_form_object_multipart_request_marker.R R/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.R R/test_query_style_form_explode_true_array_string_query_object_parameter.R -README.md docs/AuthApi.md docs/Bird.md docs/BodyApi.md diff --git a/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/ApiClient.java index ccbf706598db..6dc504682e48 100644 --- a/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/ApiClient.java @@ -465,6 +465,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiClient.java index f61594f02b96..8382b35e5de4 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiClient.java @@ -465,6 +465,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES index 379998b2a2b8..03da4aaacabb 100644 --- a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES @@ -5,6 +5,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -39,7 +40,6 @@ R/user.R R/user_api.R R/whale.R R/zebra.R -README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/R-httr2/.openapi-generator/FILES b/samples/client/petstore/R-httr2/.openapi-generator/FILES index 07243c898d78..af8bc6f011d8 100644 --- a/samples/client/petstore/R-httr2/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2/.openapi-generator/FILES @@ -5,6 +5,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -38,7 +39,6 @@ R/user.R R/user_api.R R/whale.R R/zebra.R -README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/R/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index 43681d7ddb2c..d5c00e7a92f3 100644 --- a/samples/client/petstore/R/.openapi-generator/FILES +++ b/samples/client/petstore/R/.openapi-generator/FILES @@ -5,6 +5,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -38,7 +39,6 @@ R/user.R R/user_api.R R/whale.R R/zebra.R -README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/OneOfString.cs index 6e94b861b234..258453564b0b 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/OneOfString.cs @@ -32,19 +32,19 @@ public partial class OneOfString : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal OneOfString(string varString) + /// + internal OneOfString(string @string) { - VarString = varString; + String = @string; OnCreated(); } partial void OnCreated(); /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string VarString { get; set; } + public string String { get; set; } /// /// Gets or Sets additional properties diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 85e19cd25d2d..ef0c2937c6ce 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -32,20 +32,20 @@ public partial class PolymorphicProperty : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(bool varBool) + /// + internal PolymorphicProperty(bool @bool) { - VarBool = varBool; + Bool = @bool; OnCreated(); } /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(string varString) + /// + internal PolymorphicProperty(string @string) { - VarString = varString; + String = @string; OnCreated(); } @@ -72,14 +72,14 @@ internal PolymorphicProperty(List list) partial void OnCreated(); /// - /// Gets or Sets VarBool + /// Gets or Sets Bool /// - public bool? VarBool { get; set; } + public bool? Bool { get; set; } /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string VarString { get; set; } + public string String { get; set; } /// /// Gets or Sets Object @@ -159,11 +159,11 @@ public override PolymorphicProperty Read(ref Utf8JsonReader utf8JsonReader, Type if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) { - Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool); + Utf8JsonReader utf8JsonReaderBool = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool); - Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString); + Utf8JsonReader utf8JsonReaderString = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderString, jsonSerializerOptions, out varString); Utf8JsonReader utf8JsonReaderObject = utf8JsonReader; ClientUtils.TryDeserialize(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index 19d536890f17..fe8397be218c 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -121,6 +121,16 @@ public async Task GetArrayOfEnumsAsyncTest() Assert.IsType>(model); } + /// + /// Test TestAdditionalPropertiesReference + /// + [Fact (Skip = "not implemented")] + public async Task TestAdditionalPropertiesReferenceAsyncTest() + { + Dictionary requestBody = default!; + await _instance.TestAdditionalPropertiesReferenceAsync(requestBody); + } + /// /// Test TestBodyWithFileSchema /// @@ -257,5 +267,15 @@ public async Task TestQueryParameterCollectionFormatAsyncTest() Client.Option notRequiredNullable = default!; await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } + + /// + /// Test TestStringMapReference + /// + [Fact (Skip = "not implemented")] + public async Task TestStringMapReferenceAsyncTest() + { + Dictionary requestBody = default!; + await _instance.TestStringMapReferenceAsync(requestBody); + } } } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs index d29d1dfd8460..a866bfbe242d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -54,12 +54,12 @@ public void ClassModelInstanceTest() } /// - /// Test the property 'VarClass' + /// Test the property 'Class' /// [Fact] - public void VarClassTest() + public void ClassTest() { - // TODO unit test for the property 'VarClass' + // TODO unit test for the property 'Class' } } } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs index 210069f6ad35..55086a7cf24b 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs @@ -54,12 +54,12 @@ public void FooGetDefaultResponseInstanceTest() } /// - /// Test the property 'VarString' + /// Test the property 'String' /// [Fact] - public void VarStringTest() + public void StringTest() { - // TODO unit test for the property 'VarString' + // TODO unit test for the property 'String' } } } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 164baa8862be..b658f317f1ce 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -54,12 +54,12 @@ public void FormatTestInstanceTest() } /// - /// Test the property 'VarByte' + /// Test the property 'Byte' /// [Fact] - public void VarByteTest() + public void ByteTest() { - // TODO unit test for the property 'VarByte' + // TODO unit test for the property 'Byte' } /// @@ -108,30 +108,30 @@ public void DateTimeTest() } /// - /// Test the property 'VarDecimal' + /// Test the property 'Decimal' /// [Fact] - public void VarDecimalTest() + public void DecimalTest() { - // TODO unit test for the property 'VarDecimal' + // TODO unit test for the property 'Decimal' } /// - /// Test the property 'VarDouble' + /// Test the property 'Double' /// [Fact] - public void VarDoubleTest() + public void DoubleTest() { - // TODO unit test for the property 'VarDouble' + // TODO unit test for the property 'Double' } /// - /// Test the property 'VarFloat' + /// Test the property 'Float' /// [Fact] - public void VarFloatTest() + public void FloatTest() { - // TODO unit test for the property 'VarFloat' + // TODO unit test for the property 'Float' } /// @@ -189,12 +189,12 @@ public void PatternWithDigitsAndDelimiterTest() } /// - /// Test the property 'VarString' + /// Test the property 'String' /// [Fact] - public void VarStringTest() + public void StringTest() { - // TODO unit test for the property 'VarString' + // TODO unit test for the property 'String' } /// diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs deleted file mode 100644 index e27750c9c1fe..000000000000 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedEnumType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedEnumTypeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedEnumType - //private MixedEnumType instance; - - public MixedEnumTypeTests() - { - // TODO uncomment below to create an instance of MixedEnumType - //instance = new MixedEnumType(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedEnumType - /// - [Fact] - public void MixedEnumTypeInstanceTest() - { - // TODO uncomment below to test "IsType" MixedEnumType - //Assert.IsType(instance); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs deleted file mode 100644 index 1513de7a320c..000000000000 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedNullableEnumType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedNullableEnumTypeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedNullableEnumType - //private MixedNullableEnumType instance; - - public MixedNullableEnumTypeTests() - { - // TODO uncomment below to create an instance of MixedNullableEnumType - //instance = new MixedNullableEnumType(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedNullableEnumType - /// - [Fact] - public void MixedNullableEnumTypeInstanceTest() - { - // TODO uncomment below to test "IsType" MixedNullableEnumType - //Assert.IsType(instance); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs deleted file mode 100644 index 2ed728a41b84..000000000000 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedSubId - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedSubIdTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedSubId - //private MixedSubId instance; - - public MixedSubIdTests() - { - // TODO uncomment below to create an instance of MixedSubId - //instance = new MixedSubId(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedSubId - /// - [Fact] - public void MixedSubIdInstanceTest() - { - // TODO uncomment below to test "IsType" MixedSubId - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs index fda0e5b588c8..3b5e94c5f8f3 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -54,12 +54,12 @@ public void Model200ResponseInstanceTest() } /// - /// Test the property 'VarClass' + /// Test the property 'Class' /// [Fact] - public void VarClassTest() + public void ClassTest() { - // TODO unit test for the property 'VarClass' + // TODO unit test for the property 'Class' } /// diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index 18474c10e199..bbea79ed9511 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -53,6 +53,24 @@ public void ReturnInstanceTest() //Assert.IsType(instance); } + /// + /// Test the property 'Lock' + /// + [Fact] + public void LockTest() + { + // TODO unit test for the property 'Lock' + } + + /// + /// Test the property 'Abstract' + /// + [Fact] + public void AbstractTest() + { + // TODO unit test for the property 'Abstract' + } + /// /// Test the property 'VarReturn' /// @@ -61,5 +79,14 @@ public void VarReturnTest() { // TODO unit test for the property 'VarReturn' } + + /// + /// Test the property 'Unsafe' + /// + [Fact] + public void UnsafeTest() + { + // TODO unit test for the property 'Unsafe' + } } } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/OneOfString.cs index abab41e9e99e..92cc112087e3 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/OneOfString.cs @@ -34,19 +34,19 @@ public partial class OneOfString : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal OneOfString(string varString) + /// + internal OneOfString(string @string) { - VarString = varString; + String = @string; OnCreated(); } partial void OnCreated(); /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string? VarString { get; set; } + public string? String { get; set; } /// /// Gets or Sets additional properties diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index dceaef0f4f7c..b611a3120a22 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -34,20 +34,20 @@ public partial class PolymorphicProperty : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(bool varBool) + /// + internal PolymorphicProperty(bool @bool) { - VarBool = varBool; + Bool = @bool; OnCreated(); } /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(string varString) + /// + internal PolymorphicProperty(string @string) { - VarString = varString; + String = @string; OnCreated(); } @@ -74,14 +74,14 @@ internal PolymorphicProperty(List list) partial void OnCreated(); /// - /// Gets or Sets VarBool + /// Gets or Sets Bool /// - public bool? VarBool { get; set; } + public bool? Bool { get; set; } /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string? VarString { get; set; } + public string? String { get; set; } /// /// Gets or Sets Object @@ -161,11 +161,11 @@ public override PolymorphicProperty Read(ref Utf8JsonReader utf8JsonReader, Type if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) { - Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool); + Utf8JsonReader utf8JsonReaderBool = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool); - Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString); + Utf8JsonReader utf8JsonReaderString = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderString, jsonSerializerOptions, out varString); Utf8JsonReader utf8JsonReaderObject = utf8JsonReader; ClientUtils.TryDeserialize(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index f5c8415481d2..e982dbf36e34 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -121,6 +121,16 @@ public async Task GetArrayOfEnumsAsyncTest() Assert.IsType>(model); } + /// + /// Test TestAdditionalPropertiesReference + /// + [Fact (Skip = "not implemented")] + public async Task TestAdditionalPropertiesReferenceAsyncTest() + { + Dictionary requestBody = default; + await _instance.TestAdditionalPropertiesReferenceAsync(requestBody); + } + /// /// Test TestBodyWithFileSchema /// @@ -257,5 +267,15 @@ public async Task TestQueryParameterCollectionFormatAsyncTest() Client.Option notRequiredNullable = default; await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } + + /// + /// Test TestStringMapReference + /// + [Fact (Skip = "not implemented")] + public async Task TestStringMapReferenceAsyncTest() + { + Dictionary requestBody = default; + await _instance.TestStringMapReferenceAsync(requestBody); + } } } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs index d29d1dfd8460..a866bfbe242d 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -54,12 +54,12 @@ public void ClassModelInstanceTest() } /// - /// Test the property 'VarClass' + /// Test the property 'Class' /// [Fact] - public void VarClassTest() + public void ClassTest() { - // TODO unit test for the property 'VarClass' + // TODO unit test for the property 'Class' } } } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs index 210069f6ad35..55086a7cf24b 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs @@ -54,12 +54,12 @@ public void FooGetDefaultResponseInstanceTest() } /// - /// Test the property 'VarString' + /// Test the property 'String' /// [Fact] - public void VarStringTest() + public void StringTest() { - // TODO unit test for the property 'VarString' + // TODO unit test for the property 'String' } } } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 164baa8862be..b658f317f1ce 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -54,12 +54,12 @@ public void FormatTestInstanceTest() } /// - /// Test the property 'VarByte' + /// Test the property 'Byte' /// [Fact] - public void VarByteTest() + public void ByteTest() { - // TODO unit test for the property 'VarByte' + // TODO unit test for the property 'Byte' } /// @@ -108,30 +108,30 @@ public void DateTimeTest() } /// - /// Test the property 'VarDecimal' + /// Test the property 'Decimal' /// [Fact] - public void VarDecimalTest() + public void DecimalTest() { - // TODO unit test for the property 'VarDecimal' + // TODO unit test for the property 'Decimal' } /// - /// Test the property 'VarDouble' + /// Test the property 'Double' /// [Fact] - public void VarDoubleTest() + public void DoubleTest() { - // TODO unit test for the property 'VarDouble' + // TODO unit test for the property 'Double' } /// - /// Test the property 'VarFloat' + /// Test the property 'Float' /// [Fact] - public void VarFloatTest() + public void FloatTest() { - // TODO unit test for the property 'VarFloat' + // TODO unit test for the property 'Float' } /// @@ -189,12 +189,12 @@ public void PatternWithDigitsAndDelimiterTest() } /// - /// Test the property 'VarString' + /// Test the property 'String' /// [Fact] - public void VarStringTest() + public void StringTest() { - // TODO unit test for the property 'VarString' + // TODO unit test for the property 'String' } /// diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs deleted file mode 100644 index e27750c9c1fe..000000000000 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedEnumType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedEnumTypeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedEnumType - //private MixedEnumType instance; - - public MixedEnumTypeTests() - { - // TODO uncomment below to create an instance of MixedEnumType - //instance = new MixedEnumType(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedEnumType - /// - [Fact] - public void MixedEnumTypeInstanceTest() - { - // TODO uncomment below to test "IsType" MixedEnumType - //Assert.IsType(instance); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs deleted file mode 100644 index 1513de7a320c..000000000000 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedNullableEnumType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedNullableEnumTypeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedNullableEnumType - //private MixedNullableEnumType instance; - - public MixedNullableEnumTypeTests() - { - // TODO uncomment below to create an instance of MixedNullableEnumType - //instance = new MixedNullableEnumType(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedNullableEnumType - /// - [Fact] - public void MixedNullableEnumTypeInstanceTest() - { - // TODO uncomment below to test "IsType" MixedNullableEnumType - //Assert.IsType(instance); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs deleted file mode 100644 index 2ed728a41b84..000000000000 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedSubId - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedSubIdTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedSubId - //private MixedSubId instance; - - public MixedSubIdTests() - { - // TODO uncomment below to create an instance of MixedSubId - //instance = new MixedSubId(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedSubId - /// - [Fact] - public void MixedSubIdInstanceTest() - { - // TODO uncomment below to test "IsType" MixedSubId - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs index fda0e5b588c8..3b5e94c5f8f3 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -54,12 +54,12 @@ public void Model200ResponseInstanceTest() } /// - /// Test the property 'VarClass' + /// Test the property 'Class' /// [Fact] - public void VarClassTest() + public void ClassTest() { - // TODO unit test for the property 'VarClass' + // TODO unit test for the property 'Class' } /// diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index 18474c10e199..bbea79ed9511 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -53,6 +53,24 @@ public void ReturnInstanceTest() //Assert.IsType(instance); } + /// + /// Test the property 'Lock' + /// + [Fact] + public void LockTest() + { + // TODO unit test for the property 'Lock' + } + + /// + /// Test the property 'Abstract' + /// + [Fact] + public void AbstractTest() + { + // TODO unit test for the property 'Abstract' + } + /// /// Test the property 'VarReturn' /// @@ -61,5 +79,14 @@ public void VarReturnTest() { // TODO unit test for the property 'VarReturn' } + + /// + /// Test the property 'Unsafe' + /// + [Fact] + public void UnsafeTest() + { + // TODO unit test for the property 'Unsafe' + } } } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs index 6e94b861b234..258453564b0b 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs @@ -32,19 +32,19 @@ public partial class OneOfString : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal OneOfString(string varString) + /// + internal OneOfString(string @string) { - VarString = varString; + String = @string; OnCreated(); } partial void OnCreated(); /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string VarString { get; set; } + public string String { get; set; } /// /// Gets or Sets additional properties diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 85e19cd25d2d..ef0c2937c6ce 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -32,20 +32,20 @@ public partial class PolymorphicProperty : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(bool varBool) + /// + internal PolymorphicProperty(bool @bool) { - VarBool = varBool; + Bool = @bool; OnCreated(); } /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(string varString) + /// + internal PolymorphicProperty(string @string) { - VarString = varString; + String = @string; OnCreated(); } @@ -72,14 +72,14 @@ internal PolymorphicProperty(List list) partial void OnCreated(); /// - /// Gets or Sets VarBool + /// Gets or Sets Bool /// - public bool? VarBool { get; set; } + public bool? Bool { get; set; } /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string VarString { get; set; } + public string String { get; set; } /// /// Gets or Sets Object @@ -159,11 +159,11 @@ public override PolymorphicProperty Read(ref Utf8JsonReader utf8JsonReader, Type if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) { - Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool); + Utf8JsonReader utf8JsonReaderBool = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool); - Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString); + Utf8JsonReader utf8JsonReaderString = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderString, jsonSerializerOptions, out varString); Utf8JsonReader utf8JsonReaderObject = utf8JsonReader; ClientUtils.TryDeserialize(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/OneOfString.cs index b8e81d159ba5..a4772470b488 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/OneOfString.cs @@ -35,19 +35,19 @@ public partial class OneOfString : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal OneOfString(string varString) + /// + internal OneOfString(string @string) { - VarString = varString; + String = @string; OnCreated(); } partial void OnCreated(); /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string? VarString { get; set; } + public string? String { get; set; } /// /// Gets or Sets additional properties diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 16c6d68ac576..6a979e314ef0 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -35,20 +35,20 @@ public partial class PolymorphicProperty : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(bool varBool) + /// + internal PolymorphicProperty(bool @bool) { - VarBool = varBool; + Bool = @bool; OnCreated(); } /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(string varString) + /// + internal PolymorphicProperty(string @string) { - VarString = varString; + String = @string; OnCreated(); } @@ -75,14 +75,14 @@ internal PolymorphicProperty(List list) partial void OnCreated(); /// - /// Gets or Sets VarBool + /// Gets or Sets Bool /// - public bool? VarBool { get; set; } + public bool? Bool { get; set; } /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string? VarString { get; set; } + public string? String { get; set; } /// /// Gets or Sets Object @@ -162,11 +162,11 @@ public override PolymorphicProperty Read(ref Utf8JsonReader utf8JsonReader, Type if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) { - Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool); + Utf8JsonReader utf8JsonReaderBool = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool); - Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString); + Utf8JsonReader utf8JsonReaderString = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderString, jsonSerializerOptions, out varString); Utf8JsonReader utf8JsonReaderObject = utf8JsonReader; ClientUtils.TryDeserialize(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index 62a5cdba43b7..ee61aa929639 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -121,6 +121,16 @@ public async Task GetArrayOfEnumsAsyncTest() Assert.IsType>(model); } + /// + /// Test TestAdditionalPropertiesReference + /// + [Fact (Skip = "not implemented")] + public async Task TestAdditionalPropertiesReferenceAsyncTest() + { + Dictionary requestBody = default; + await _instance.TestAdditionalPropertiesReferenceAsync(requestBody); + } + /// /// Test TestBodyWithFileSchema /// @@ -257,5 +267,15 @@ public async Task TestQueryParameterCollectionFormatAsyncTest() Client.Option notRequiredNullable = default; await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); } + + /// + /// Test TestStringMapReference + /// + [Fact (Skip = "not implemented")] + public async Task TestStringMapReferenceAsyncTest() + { + Dictionary requestBody = default; + await _instance.TestStringMapReferenceAsync(requestBody); + } } } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs index d29d1dfd8460..a866bfbe242d 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -54,12 +54,12 @@ public void ClassModelInstanceTest() } /// - /// Test the property 'VarClass' + /// Test the property 'Class' /// [Fact] - public void VarClassTest() + public void ClassTest() { - // TODO unit test for the property 'VarClass' + // TODO unit test for the property 'Class' } } } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs index 210069f6ad35..55086a7cf24b 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs @@ -54,12 +54,12 @@ public void FooGetDefaultResponseInstanceTest() } /// - /// Test the property 'VarString' + /// Test the property 'String' /// [Fact] - public void VarStringTest() + public void StringTest() { - // TODO unit test for the property 'VarString' + // TODO unit test for the property 'String' } } } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 164baa8862be..b658f317f1ce 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -54,12 +54,12 @@ public void FormatTestInstanceTest() } /// - /// Test the property 'VarByte' + /// Test the property 'Byte' /// [Fact] - public void VarByteTest() + public void ByteTest() { - // TODO unit test for the property 'VarByte' + // TODO unit test for the property 'Byte' } /// @@ -108,30 +108,30 @@ public void DateTimeTest() } /// - /// Test the property 'VarDecimal' + /// Test the property 'Decimal' /// [Fact] - public void VarDecimalTest() + public void DecimalTest() { - // TODO unit test for the property 'VarDecimal' + // TODO unit test for the property 'Decimal' } /// - /// Test the property 'VarDouble' + /// Test the property 'Double' /// [Fact] - public void VarDoubleTest() + public void DoubleTest() { - // TODO unit test for the property 'VarDouble' + // TODO unit test for the property 'Double' } /// - /// Test the property 'VarFloat' + /// Test the property 'Float' /// [Fact] - public void VarFloatTest() + public void FloatTest() { - // TODO unit test for the property 'VarFloat' + // TODO unit test for the property 'Float' } /// @@ -189,12 +189,12 @@ public void PatternWithDigitsAndDelimiterTest() } /// - /// Test the property 'VarString' + /// Test the property 'String' /// [Fact] - public void VarStringTest() + public void StringTest() { - // TODO unit test for the property 'VarString' + // TODO unit test for the property 'String' } /// diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs deleted file mode 100644 index e27750c9c1fe..000000000000 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedEnumTypeTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedEnumType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedEnumTypeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedEnumType - //private MixedEnumType instance; - - public MixedEnumTypeTests() - { - // TODO uncomment below to create an instance of MixedEnumType - //instance = new MixedEnumType(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedEnumType - /// - [Fact] - public void MixedEnumTypeInstanceTest() - { - // TODO uncomment below to test "IsType" MixedEnumType - //Assert.IsType(instance); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs deleted file mode 100644 index 1513de7a320c..000000000000 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedNullableEnumTypeTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedNullableEnumType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedNullableEnumTypeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedNullableEnumType - //private MixedNullableEnumType instance; - - public MixedNullableEnumTypeTests() - { - // TODO uncomment below to create an instance of MixedNullableEnumType - //instance = new MixedNullableEnumType(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedNullableEnumType - /// - [Fact] - public void MixedNullableEnumTypeInstanceTest() - { - // TODO uncomment below to test "IsType" MixedNullableEnumType - //Assert.IsType(instance); - } - } -} diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs deleted file mode 100644 index 2ed728a41b84..000000000000 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/MixedSubIdTests.cs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; - -namespace Org.OpenAPITools.Test.Model -{ - /// - /// Class for testing MixedSubId - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedSubIdTests : IDisposable - { - // TODO uncomment below to declare an instance variable for MixedSubId - //private MixedSubId instance; - - public MixedSubIdTests() - { - // TODO uncomment below to create an instance of MixedSubId - //instance = new MixedSubId(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MixedSubId - /// - [Fact] - public void MixedSubIdInstanceTest() - { - // TODO uncomment below to test "IsType" MixedSubId - //Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - } -} diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs index fda0e5b588c8..3b5e94c5f8f3 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -54,12 +54,12 @@ public void Model200ResponseInstanceTest() } /// - /// Test the property 'VarClass' + /// Test the property 'Class' /// [Fact] - public void VarClassTest() + public void ClassTest() { - // TODO unit test for the property 'VarClass' + // TODO unit test for the property 'Class' } /// diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index 18474c10e199..bbea79ed9511 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -53,6 +53,24 @@ public void ReturnInstanceTest() //Assert.IsType(instance); } + /// + /// Test the property 'Lock' + /// + [Fact] + public void LockTest() + { + // TODO unit test for the property 'Lock' + } + + /// + /// Test the property 'Abstract' + /// + [Fact] + public void AbstractTest() + { + // TODO unit test for the property 'Abstract' + } + /// /// Test the property 'VarReturn' /// @@ -61,5 +79,14 @@ public void VarReturnTest() { // TODO unit test for the property 'VarReturn' } + + /// + /// Test the property 'Unsafe' + /// + [Fact] + public void UnsafeTest() + { + // TODO unit test for the property 'Unsafe' + } } } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs index 6e94b861b234..258453564b0b 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/OneOfString.cs @@ -32,19 +32,19 @@ public partial class OneOfString : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal OneOfString(string varString) + /// + internal OneOfString(string @string) { - VarString = varString; + String = @string; OnCreated(); } partial void OnCreated(); /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string VarString { get; set; } + public string String { get; set; } /// /// Gets or Sets additional properties diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 85e19cd25d2d..ef0c2937c6ce 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -32,20 +32,20 @@ public partial class PolymorphicProperty : IValidatableObject /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(bool varBool) + /// + internal PolymorphicProperty(bool @bool) { - VarBool = varBool; + Bool = @bool; OnCreated(); } /// /// Initializes a new instance of the class. /// - /// - internal PolymorphicProperty(string varString) + /// + internal PolymorphicProperty(string @string) { - VarString = varString; + String = @string; OnCreated(); } @@ -72,14 +72,14 @@ internal PolymorphicProperty(List list) partial void OnCreated(); /// - /// Gets or Sets VarBool + /// Gets or Sets Bool /// - public bool? VarBool { get; set; } + public bool? Bool { get; set; } /// - /// Gets or Sets VarString + /// Gets or Sets String /// - public string VarString { get; set; } + public string String { get; set; } /// /// Gets or Sets Object @@ -159,11 +159,11 @@ public override PolymorphicProperty Read(ref Utf8JsonReader utf8JsonReader, Type if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) { - Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool); + Utf8JsonReader utf8JsonReaderBool = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool); - Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader; - ClientUtils.TryDeserialize(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString); + Utf8JsonReader utf8JsonReaderString = utf8JsonReader; + ClientUtils.TryDeserialize(ref utf8JsonReaderString, jsonSerializerOptions, out varString); Utf8JsonReader utf8JsonReaderObject = utf8JsonReader; ClientUtils.TryDeserialize(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject); diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index d6a9c4dd37de..b04ef320464c 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -79,7 +79,6 @@ public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 955419d2a193..90a9e552447c 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -70,7 +70,6 @@ public void setUsername(String username) { this.username = username; } - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { this.singleRefType = singleRefType; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java index b2bbecd11656..ec921eea0278 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java @@ -52,7 +52,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -82,7 +82,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayTest.java index ebc3cdc18550..1497aca50f7d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -85,7 +85,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -119,7 +118,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Capitalization.java index b18f7c70a183..76d2863ff081 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Capitalization.java @@ -85,7 +85,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -111,7 +110,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -137,7 +135,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -163,7 +160,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -189,7 +185,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java index 4a9499800f21..6cb63ad13423 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java @@ -69,7 +69,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumArrays.java index 6bf7090b67eb..9546ea3c631e 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -142,7 +142,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java index fe453314ced5..6beb74803d24 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -246,7 +246,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -272,7 +271,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -298,7 +296,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -324,7 +321,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); @@ -358,7 +354,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; @@ -384,7 +379,6 @@ public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; @@ -410,7 +404,6 @@ public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue this.outerEnumDefaultValue = outerEnumDefaultValue; } - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 041a0b0c3cb6..4b566e070479 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -73,7 +73,6 @@ public void setSomeId(BigDecimal someId) { this.someId = someId; } - public FakeBigDecimalMap200Response someMap(Map someMap) { this.someMap = someMap; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 1ee4f1f9b336..67ba237906dd 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -73,7 +73,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java index 61c88b4d0b67..aa04f73b75e9 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -133,7 +133,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -161,7 +160,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -187,7 +185,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -215,7 +212,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -243,7 +239,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -271,7 +266,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest decimal(BigDecimal decimal) { this.decimal = decimal; @@ -297,7 +291,6 @@ public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } - public FormatTest string(String string) { this.string = string; @@ -323,7 +316,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -349,7 +341,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -375,7 +366,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -401,7 +391,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -427,7 +416,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -453,7 +441,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -479,7 +466,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest patternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; @@ -505,7 +491,6 @@ public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 717fd9fdccac..d3086c06434a 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -44,7 +44,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -69,7 +71,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MapTest.java index a029b04e6abf..dce05f7c2f94 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MapTest.java @@ -122,7 +122,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -156,7 +155,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -190,7 +188,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 06f28027091f..e364fa2122e3 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -78,7 +78,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -104,7 +103,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Model200Response.java index 7088515dfa89..4a38c3069a81 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Model200Response.java @@ -70,7 +70,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java index bf5a8c71ed26..7f8cedfefa97 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -74,7 +74,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -100,7 +99,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Name.java index cecab37aebbb..8e8bbd44bdae 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Name.java @@ -51,7 +51,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -87,7 +89,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -102,7 +103,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -128,7 +128,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NullableClass.java index 796fbb1bcc95..65d1232d9efe 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NullableClass.java @@ -130,7 +130,6 @@ public void setIntegerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); } - public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); @@ -164,7 +163,6 @@ public void setNumberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); } - public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); @@ -198,7 +196,6 @@ public void setBooleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); } - public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); @@ -232,7 +229,6 @@ public void setStringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); } - public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); @@ -266,7 +262,6 @@ public void setDateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); } - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); @@ -300,7 +295,6 @@ public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); } - public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); @@ -346,7 +340,6 @@ public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); @@ -392,7 +385,6 @@ public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; @@ -426,7 +418,6 @@ public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } - public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); @@ -472,7 +463,6 @@ public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); @@ -518,7 +508,6 @@ public void setObjectAndItemsNullableProp(Map objectAndItemsNull this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index f4e683673622..9cf03ce9e060 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -82,7 +82,6 @@ public void setUuid(String uuid) { this.uuid = uuid; } - public ObjectWithDeprecatedFields id(BigDecimal id) { this.id = id; @@ -110,7 +109,6 @@ public void setId(BigDecimal id) { this.id = id; } - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -138,7 +136,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Order.java index 2d87105ae12a..3f155eaa3174 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Order.java @@ -123,7 +123,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -149,7 +148,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -175,7 +173,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -201,7 +198,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -227,7 +223,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterComposite.java index 84984ad11f35..e697f453c81a 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -74,7 +74,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -100,7 +99,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java index d2018b870d6b..774a07a23e74 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -88,7 +88,7 @@ public static TypeEnum fromValue(String value) { protected TypeEnum type; public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; - private JsonNullable nullableProperty = JsonNullable.undefined(); + protected JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { } @@ -118,7 +118,6 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { this.nullableProperty = JsonNullable.of(nullableProperty); diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java index bc9c7d4dadc9..5f11ef0a7079 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java @@ -130,7 +130,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -156,7 +155,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -182,7 +180,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -217,7 +214,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -251,7 +247,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 6fcb882e616e..85e7d623fa24 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -43,7 +43,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -66,7 +68,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java index 3cb4aeb318cb..11ad40482b48 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java @@ -69,7 +69,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/User.java index 5057d7cc666a..6358740dc228 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/User.java @@ -93,7 +93,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -119,7 +118,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -145,7 +143,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -171,7 +168,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -197,7 +193,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -223,7 +218,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -249,7 +243,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 052a661a1a5b..3594095e6faa 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -114,7 +114,6 @@ public void setMapString(Map mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -148,7 +147,6 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -182,7 +180,6 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -216,7 +213,6 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -250,7 +246,6 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -284,7 +279,6 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -318,7 +312,6 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -352,7 +345,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -378,7 +370,6 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -404,7 +395,6 @@ public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java index 4f734a1bcf47..b668c92d1e5f 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java @@ -50,7 +50,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -80,7 +80,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java index 8e539861d237..5354cab3943b 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -82,7 +82,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -116,7 +115,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java index eace91d32b31..676127450797 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java @@ -82,7 +82,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -108,7 +107,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -134,7 +132,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -160,7 +157,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -186,7 +182,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java index c3ce165a6858..ae2a7a582b93 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java @@ -45,7 +45,7 @@ public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; + protected Boolean declawed; public Cat() { diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java index 6276f76cbd37..f3c09fefafaa 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java index 905d8f49f490..e7654785df11 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -139,7 +139,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java index 897a0aac97a5..41b2f3eb8155 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java @@ -224,7 +224,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -250,7 +249,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -276,7 +274,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -302,7 +299,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index ddff4505b584..141dc551badc 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -70,7 +70,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java index 7a441b086816..85fb9e059359 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java @@ -122,7 +122,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -150,7 +149,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -176,7 +174,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -204,7 +201,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -232,7 +228,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -260,7 +255,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest string(String string) { this.string = string; @@ -286,7 +280,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -312,7 +305,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -338,7 +330,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -364,7 +355,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -390,7 +380,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -416,7 +405,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -442,7 +430,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index c0d039bc95f1..df9817e994bf 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -41,7 +41,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -66,7 +68,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java index 6b740281b9bf..5da2e18def94 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java @@ -119,7 +119,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -153,7 +152,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -187,7 +185,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index a950a03dbe41..aabbecd4bbb4 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -75,7 +75,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -101,7 +100,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java index d03369c5dff5..ed6d620c7aa4 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java @@ -67,7 +67,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 9f704484bfd2..a50edcc17615 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -71,7 +71,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -97,7 +96,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java index c496a00abb89..8b7d774a9f09 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java @@ -48,7 +48,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -84,7 +86,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -99,7 +100,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -125,7 +125,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java index 39763d34d3a8..460999a479a4 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java @@ -120,7 +120,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -146,7 +145,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -172,7 +170,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -198,7 +195,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -224,7 +220,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java index 71a7e405ad91..9a4a6ca10d07 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -71,7 +71,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -97,7 +96,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java index aa4b9b43ff58..ae2f5a64fbd6 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java @@ -127,7 +127,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -179,7 +177,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -214,7 +211,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -248,7 +244,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index cd1a62e24e0e..630a96f5f512 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -40,7 +40,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -63,7 +65,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java index 85abf11df318..9145e5deea22 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index dc106be155da..79af9537f9fb 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -82,7 +82,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -108,7 +107,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -134,7 +132,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -160,7 +157,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 605348bc3f76..30578e13ee90 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -86,7 +86,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -112,7 +111,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -138,7 +136,6 @@ public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } - public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -164,7 +161,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -190,7 +186,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java index c412c56bcc2d..0523f7495459 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java @@ -90,7 +90,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -116,7 +115,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -142,7 +140,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -168,7 +165,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -194,7 +190,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -220,7 +215,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -246,7 +240,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java index 0e34303e5ecc..a2ecfc8cd044 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java @@ -178,7 +178,6 @@ public void setAttributeString(String attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -204,7 +203,6 @@ public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -230,7 +228,6 @@ public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -256,7 +253,6 @@ public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -290,7 +286,6 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -316,7 +311,6 @@ public void setNameString(String nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -342,7 +336,6 @@ public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -368,7 +361,6 @@ public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -394,7 +386,6 @@ public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -428,7 +419,6 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -462,7 +452,6 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -488,7 +477,6 @@ public void setPrefixString(String prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -514,7 +502,6 @@ public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -540,7 +527,6 @@ public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -566,7 +552,6 @@ public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -600,7 +585,6 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -634,7 +618,6 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -660,7 +643,6 @@ public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -686,7 +668,6 @@ public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -712,7 +693,6 @@ public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -738,7 +718,6 @@ public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -772,7 +751,6 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -806,7 +784,6 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -832,7 +809,6 @@ public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -858,7 +834,6 @@ public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -884,7 +859,6 @@ public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -910,7 +884,6 @@ public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -944,7 +917,6 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 38873e50362d..2fe982340a08 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -22,7 +22,7 @@ import java.util.GregorianCalendar; import java.util.TimeZone; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-09T12:47:38.548062100Z[UTC]", comments = "Generator version: 7.5.0-SNAPSHOT") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0-SNAPSHOT") public class RFC3339DateFormat extends DateFormat { private static final long serialVersionUID = 1L; private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java index 69171b9f8fc5..2fe982340a08 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -22,7 +22,7 @@ import java.util.GregorianCalendar; import java.util.TimeZone; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-09T12:47:39.283968500Z[UTC]", comments = "Generator version: 7.5.0-SNAPSHOT") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0-SNAPSHOT") public class RFC3339DateFormat extends DateFormat { private static final long serialVersionUID = 1L; private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index b94c473e5526..6a93e010d051 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -101,7 +101,7 @@ public CompletableFuture call123testSpecialTags(Client client) throws Ap try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -138,7 +138,7 @@ public CompletableFuture> call123testSpecialTagsWithHttpInfo new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -180,4 +180,5 @@ private HttpRequest.Builder call123testSpecialTagsRequestBuilder(Client client) } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/DefaultApi.java index d05cc8c18acc..f0ee67f5b312 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -100,7 +100,7 @@ public CompletableFuture fooGet() throws ApiException { try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -136,7 +136,7 @@ public CompletableFuture> fooGetWithHttpInfo( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -168,4 +168,5 @@ private HttpRequest.Builder fooGetRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java index 9313c033af5d..5a66fd98a285 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java @@ -117,7 +117,7 @@ public CompletableFuture fakeBigDecimalMap() throw try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -153,7 +153,7 @@ public CompletableFuture> fakeBigDecim new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -185,6 +185,7 @@ private HttpRequest.Builder fakeBigDecimalMapRequestBuilder() throws ApiExceptio } return localVarRequestBuilder; } + /** * Health check endpoint * @@ -203,7 +204,7 @@ public CompletableFuture fakeHealthGet() throws ApiException try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -239,7 +240,7 @@ public CompletableFuture> fakeHealthGetWithHttpIn new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -271,6 +272,7 @@ private HttpRequest.Builder fakeHealthGetRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * * Test serialization of outer boolean types @@ -290,7 +292,7 @@ public CompletableFuture fakeOuterBooleanSerialize(Boolean body) throws try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -327,7 +329,7 @@ public CompletableFuture> fakeOuterBooleanSerializeWithHttp new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -365,6 +367,7 @@ private HttpRequest.Builder fakeOuterBooleanSerializeRequestBuilder(Boolean body } return localVarRequestBuilder; } + /** * * Test serialization of object with outer number type @@ -384,7 +387,7 @@ public CompletableFuture fakeOuterCompositeSerialize(OuterCompos try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -421,7 +424,7 @@ public CompletableFuture> fakeOuterCompositeSerializ new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -459,6 +462,7 @@ private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterCompo } return localVarRequestBuilder; } + /** * * Test serialization of outer number types @@ -478,7 +482,7 @@ public CompletableFuture fakeOuterNumberSerialize(BigDecimal body) t try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -515,7 +519,7 @@ public CompletableFuture> fakeOuterNumberSerializeWithHt new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -553,6 +557,7 @@ private HttpRequest.Builder fakeOuterNumberSerializeRequestBuilder(BigDecimal bo } return localVarRequestBuilder; } + /** * * Test serialization of outer string types @@ -572,7 +577,7 @@ public CompletableFuture fakeOuterStringSerialize(String body) throws Ap try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -609,7 +614,7 @@ public CompletableFuture> fakeOuterStringSerializeWithHttpIn new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -642,6 +647,7 @@ private HttpRequest.Builder fakeOuterStringSerializeRequestBuilder(String body) } return localVarRequestBuilder; } + /** * application/json UTF8 * @@ -660,7 +666,7 @@ public CompletableFuture> getApplicationJsonUtf8() throws ApiExc try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -696,7 +702,7 @@ public CompletableFuture>> getApplicationJsonUtf8Wit new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -728,6 +734,7 @@ private HttpRequest.Builder getApplicationJsonUtf8RequestBuilder() throws ApiExc } return localVarRequestBuilder; } + /** * Array of Enums * @@ -746,7 +753,7 @@ public CompletableFuture> getArrayOfEnums() throws ApiException try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -782,7 +789,7 @@ public CompletableFuture>> getArrayOfEnumsWithHttpIn new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -814,6 +821,7 @@ private HttpRequest.Builder getArrayOfEnumsRequestBuilder() throws ApiException } return localVarRequestBuilder; } + /** * test referenced additionalProperties * @@ -897,6 +905,7 @@ private HttpRequest.Builder testAdditionalPropertiesReferenceRequestBuilder(Map< } return localVarRequestBuilder; } + /** * * For this test, the body for this request much reference a schema named `File`. @@ -980,6 +989,7 @@ private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestC } return localVarRequestBuilder; } + /** * * @@ -1084,6 +1094,7 @@ private HttpRequest.Builder testBodyWithQueryParamsRequestBuilder(String query, } return localVarRequestBuilder; } + /** * To test \"client\" model * To test \"client\" model @@ -1103,7 +1114,7 @@ public CompletableFuture testClientModel(Client client) throws ApiExcept try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -1140,7 +1151,7 @@ public CompletableFuture> testClientModelWithHttpInfo(Client new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -1182,6 +1193,7 @@ private HttpRequest.Builder testClientModelRequestBuilder(Client client) throws } return localVarRequestBuilder; } + /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1350,6 +1362,7 @@ private HttpRequest.Builder testEndpointParametersRequestBuilder(BigDecimal numb } return localVarRequestBuilder; } + /** * To test enum parameters * To test enum parameters @@ -1483,6 +1496,7 @@ private HttpRequest.Builder testEnumParametersRequestBuilder(List enumHe } return localVarRequestBuilder; } + /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) @@ -1640,6 +1654,7 @@ private HttpRequest.Builder testGroupParametersRequestBuilder(Integer requiredSt return localVarRequestBuilder; } + public static final class APItestGroupParametersRequest { private Integer requiredStringGroup; // Required String in group parameters (required) private Boolean requiredBooleanGroup; // Required Boolean in group parameters (required) @@ -1716,9 +1731,6 @@ public APItestGroupParametersRequest build() { } } - @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0-SNAPSHOT") - private static final class GenericTypeRef extends TypeReference {} - /** * test inline additionalProperties * @@ -1802,6 +1814,7 @@ private HttpRequest.Builder testInlineAdditionalPropertiesRequestBuilder(Map testClassname(Client client) throws ApiExceptio try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -144,7 +144,7 @@ public CompletableFuture> testClassnameWithHttpInfo(Client c new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -186,4 +186,5 @@ private HttpRequest.Builder testClassnameRequestBuilder(Client client) throws Ap } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java index b5ececd23676..f32afafcb64c 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java @@ -173,6 +173,7 @@ private HttpRequest.Builder addPetRequestBuilder(Pet pet) throws ApiException { } return localVarRequestBuilder; } + /** * Deletes a pet * @@ -256,6 +257,7 @@ private HttpRequest.Builder deletePetRequestBuilder(Long petId, String apiKey) t } return localVarRequestBuilder; } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -275,7 +277,7 @@ public CompletableFuture> findPetsByStatus(List status) throws try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -312,7 +314,7 @@ public CompletableFuture>> findPetsByStatusWithHttpInfo(Li new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -363,6 +365,7 @@ private HttpRequest.Builder findPetsByStatusRequestBuilder(List status) } return localVarRequestBuilder; } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -384,7 +387,7 @@ public CompletableFuture> findPetsByTags(List tags) throws Api try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -423,7 +426,7 @@ public CompletableFuture>> findPetsByTagsWithHttpInfo(List new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -474,6 +477,7 @@ private HttpRequest.Builder findPetsByTagsRequestBuilder(List tags) thro } return localVarRequestBuilder; } + /** * Find pet by ID * Returns a single pet @@ -493,7 +497,7 @@ public CompletableFuture getPetById(Long petId) throws ApiException { try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -530,7 +534,7 @@ public CompletableFuture> getPetByIdWithHttpInfo(Long petId) th new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -567,6 +571,7 @@ private HttpRequest.Builder getPetByIdRequestBuilder(Long petId) throws ApiExcep } return localVarRequestBuilder; } + /** * Update an existing pet * @@ -650,6 +655,7 @@ private HttpRequest.Builder updatePetRequestBuilder(Pet pet) throws ApiException } return localVarRequestBuilder; } + /** * Updates a pet in the store with form data * @@ -749,6 +755,7 @@ private HttpRequest.Builder updatePetWithFormRequestBuilder(Long petId, String n } return localVarRequestBuilder; } + /** * uploads an image * @@ -770,7 +777,7 @@ public CompletableFuture uploadFile(Long petId, String additio try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -809,7 +816,7 @@ public CompletableFuture> uploadFileWithHttpInfo(L new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -880,6 +887,7 @@ private HttpRequest.Builder uploadFileRequestBuilder(Long petId, String addition } return localVarRequestBuilder; } + /** * uploads an image (required) * @@ -901,7 +909,7 @@ public CompletableFuture uploadFileWithRequiredFile(Long petId try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -940,7 +948,7 @@ public CompletableFuture> uploadFileWithRequiredFi new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -1015,4 +1023,5 @@ private HttpRequest.Builder uploadFileWithRequiredFileRequestBuilder(Long petId, } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java index 19d3120412ff..bf0127e7dd6e 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java @@ -166,6 +166,7 @@ private HttpRequest.Builder deleteOrderRequestBuilder(String orderId) throws Api } return localVarRequestBuilder; } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -184,7 +185,7 @@ public CompletableFuture> getInventory() throws ApiExceptio try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -220,7 +221,7 @@ public CompletableFuture>> getInventoryWithHttp new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef>())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -252,6 +253,7 @@ private HttpRequest.Builder getInventoryRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @@ -271,7 +273,7 @@ public CompletableFuture getOrderById(Long orderId) throws ApiException { try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -308,7 +310,7 @@ public CompletableFuture> getOrderByIdWithHttpInfo(Long order new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -345,6 +347,7 @@ private HttpRequest.Builder getOrderByIdRequestBuilder(Long orderId) throws ApiE } return localVarRequestBuilder; } + /** * Place an order for a pet * @@ -364,7 +367,7 @@ public CompletableFuture placeOrder(Order order) throws ApiException { try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -401,7 +404,7 @@ public CompletableFuture> placeOrderWithHttpInfo(Order order) new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -443,4 +446,5 @@ private HttpRequest.Builder placeOrderRequestBuilder(Order order) throws ApiExce } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java index 1411a66af41a..5973a05f0fe3 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java @@ -172,6 +172,7 @@ private HttpRequest.Builder createUserRequestBuilder(User user) throws ApiExcept } return localVarRequestBuilder; } + /** * Creates list of users with given input array * @@ -255,6 +256,7 @@ private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List u } return localVarRequestBuilder; } + /** * Creates list of users with given input array * @@ -338,6 +340,7 @@ private HttpRequest.Builder createUsersWithListInputRequestBuilder(List us } return localVarRequestBuilder; } + /** * Delete user * This can only be done by the logged in user. @@ -416,6 +419,7 @@ private HttpRequest.Builder deleteUserRequestBuilder(String username) throws Api } return localVarRequestBuilder; } + /** * Get user by user name * @@ -435,7 +439,7 @@ public CompletableFuture getUserByName(String username) throws ApiExceptio try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -472,7 +476,7 @@ public CompletableFuture> getUserByNameWithHttpInfo(String use new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -509,6 +513,7 @@ private HttpRequest.Builder getUserByNameRequestBuilder(String username) throws } return localVarRequestBuilder; } + /** * Logs user into the system * @@ -529,7 +534,7 @@ public CompletableFuture loginUser(String username, String password) thr try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef()) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -567,7 +572,7 @@ public CompletableFuture> loginUserWithHttpInfo(String usern new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new GenericTypeRef())) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -624,6 +629,7 @@ private HttpRequest.Builder loginUserRequestBuilder(String username, String pass } return localVarRequestBuilder; } + /** * Logs out current logged in user session * @@ -695,6 +701,7 @@ private HttpRequest.Builder logoutUserRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * Updated user * This can only be done by the logged in user. @@ -785,4 +792,5 @@ private HttpRequest.Builder updateUserRequestBuilder(String username, User user) } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/PetApi.java index 506ac244f594..01e793fd2c71 100644 --- a/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/PetApi.java @@ -124,7 +124,7 @@ public ApiResponse addPetWithHttpInfo(Pet pet) throws ApiException { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -166,6 +166,7 @@ private HttpRequest.Builder addPetRequestBuilder(Pet pet) throws ApiException { } return localVarRequestBuilder; } + /** * Deletes a pet * @@ -246,6 +247,7 @@ private HttpRequest.Builder deletePetRequestBuilder(Long petId, String apiKey) t } return localVarRequestBuilder; } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -281,7 +283,7 @@ public ApiResponse> findPetsByStatusWithHttpInfo(List status) return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -332,6 +334,7 @@ private HttpRequest.Builder findPetsByStatusRequestBuilder(List status) } return localVarRequestBuilder; } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -371,7 +374,7 @@ public ApiResponse> findPetsByTagsWithHttpInfo(List tags) thro return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -422,6 +425,7 @@ private HttpRequest.Builder findPetsByTagsRequestBuilder(List tags) thro } return localVarRequestBuilder; } + /** * Find pet by ID * Returns a single pet @@ -457,7 +461,7 @@ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -494,6 +498,7 @@ private HttpRequest.Builder getPetByIdRequestBuilder(Long petId) throws ApiExcep } return localVarRequestBuilder; } + /** * Update an existing pet * @@ -533,7 +538,7 @@ public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -575,6 +580,7 @@ private HttpRequest.Builder updatePetRequestBuilder(Pet pet) throws ApiException } return localVarRequestBuilder; } + /** * Updates a pet in the store with form data * @@ -671,6 +677,7 @@ private HttpRequest.Builder updatePetWithFormRequestBuilder(Long petId, String n } return localVarRequestBuilder; } + /** * uploads an image * @@ -710,7 +717,7 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -781,4 +788,5 @@ private HttpRequest.Builder uploadFileRequestBuilder(Long petId, String addition } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/StoreApi.java index 634185138da5..80d6ba07c08d 100644 --- a/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/StoreApi.java @@ -162,6 +162,7 @@ private HttpRequest.Builder deleteOrderRequestBuilder(String orderId) throws Api } return localVarRequestBuilder; } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -195,7 +196,7 @@ public ApiResponse> getInventoryWithHttpInfo() throws ApiEx return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -227,6 +228,7 @@ private HttpRequest.Builder getInventoryRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @@ -262,7 +264,7 @@ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiExcep return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -299,6 +301,7 @@ private HttpRequest.Builder getOrderByIdRequestBuilder(Long orderId) throws ApiE } return localVarRequestBuilder; } + /** * Place an order for a pet * @@ -334,7 +337,7 @@ public ApiResponse placeOrderWithHttpInfo(Order order) throws ApiExceptio return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -376,4 +379,5 @@ private HttpRequest.Builder placeOrderRequestBuilder(Order order) throws ApiExce } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/UserApi.java index 019f781c1275..f4819f5197a6 100644 --- a/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/api/UserApi.java @@ -168,6 +168,7 @@ private HttpRequest.Builder createUserRequestBuilder(User user) throws ApiExcept } return localVarRequestBuilder; } + /** * Creates list of users with given input array * @@ -248,6 +249,7 @@ private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List u } return localVarRequestBuilder; } + /** * Creates list of users with given input array * @@ -328,6 +330,7 @@ private HttpRequest.Builder createUsersWithListInputRequestBuilder(List us } return localVarRequestBuilder; } + /** * Delete user * This can only be done by the logged in user. @@ -403,6 +406,7 @@ private HttpRequest.Builder deleteUserRequestBuilder(String username) throws Api } return localVarRequestBuilder; } + /** * Get user by user name * @@ -438,7 +442,7 @@ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiEx return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -475,6 +479,7 @@ private HttpRequest.Builder getUserByNameRequestBuilder(String username) throws } return localVarRequestBuilder; } + /** * Logs user into the system * @@ -512,7 +517,7 @@ public ApiResponse loginUserWithHttpInfo(String username, String passwor return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -569,6 +574,7 @@ private HttpRequest.Builder loginUserRequestBuilder(String username, String pass } return localVarRequestBuilder; } + /** * Logs out current logged in user session * @@ -637,6 +643,7 @@ private HttpRequest.Builder logoutUserRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * Updated user * This can only be done by the logged in user. @@ -724,4 +731,5 @@ private HttpRequest.Builder updateUserRequestBuilder(String username, User user) } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 3c652cd0e847..e34c5f850b44 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -116,7 +116,7 @@ public ApiResponse call123testSpecialTagsWithHttpInfo(Client client) thr return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -158,4 +158,5 @@ private HttpRequest.Builder call123testSpecialTagsRequestBuilder(Client client) } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java index bcc858139e28..6e28f9d55395 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -114,7 +114,7 @@ public ApiResponse fooGetWithHttpInfo() throws ApiExcepti return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -146,4 +146,5 @@ private HttpRequest.Builder fooGetRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java index e60835847869..359ec9a77ebb 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java @@ -131,7 +131,7 @@ public ApiResponse fakeBigDecimalMapWithHttpInfo() return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -163,6 +163,7 @@ private HttpRequest.Builder fakeBigDecimalMapRequestBuilder() throws ApiExceptio } return localVarRequestBuilder; } + /** * Health check endpoint * @@ -196,7 +197,7 @@ public ApiResponse fakeHealthGetWithHttpInfo() throws ApiExce return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -228,6 +229,7 @@ private HttpRequest.Builder fakeHealthGetRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * * Test serialization of outer boolean types @@ -263,7 +265,7 @@ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -301,6 +303,7 @@ private HttpRequest.Builder fakeOuterBooleanSerializeRequestBuilder(Boolean body } return localVarRequestBuilder; } + /** * * Test serialization of object with outer number type @@ -336,7 +339,7 @@ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(Outer return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -374,6 +377,7 @@ private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterCompo } return localVarRequestBuilder; } + /** * * Test serialization of outer number types @@ -409,7 +413,7 @@ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal b return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -447,6 +451,7 @@ private HttpRequest.Builder fakeOuterNumberSerializeRequestBuilder(BigDecimal bo } return localVarRequestBuilder; } + /** * * Test serialization of outer string types @@ -482,7 +487,7 @@ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) thr return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -515,6 +520,7 @@ private HttpRequest.Builder fakeOuterStringSerializeRequestBuilder(String body) } return localVarRequestBuilder; } + /** * application/json UTF8 * @@ -548,7 +554,7 @@ public ApiResponse> getApplicationJsonUtf8WithHttpInfo() throws return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -580,6 +586,7 @@ private HttpRequest.Builder getApplicationJsonUtf8RequestBuilder() throws ApiExc } return localVarRequestBuilder; } + /** * Array of Enums * @@ -613,7 +620,7 @@ public ApiResponse> getArrayOfEnumsWithHttpInfo() throws ApiExce return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -645,6 +652,7 @@ private HttpRequest.Builder getArrayOfEnumsRequestBuilder() throws ApiException } return localVarRequestBuilder; } + /** * test referenced additionalProperties * @@ -725,6 +733,7 @@ private HttpRequest.Builder testAdditionalPropertiesReferenceRequestBuilder(Map< } return localVarRequestBuilder; } + /** * * For this test, the body for this request much reference a schema named `File`. @@ -805,6 +814,7 @@ private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestC } return localVarRequestBuilder; } + /** * * @@ -906,6 +916,7 @@ private HttpRequest.Builder testBodyWithQueryParamsRequestBuilder(String query, } return localVarRequestBuilder; } + /** * To test \"client\" model * To test \"client\" model @@ -941,7 +952,7 @@ public ApiResponse testClientModelWithHttpInfo(Client client) throws Api return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -983,6 +994,7 @@ private HttpRequest.Builder testClientModelRequestBuilder(Client client) throws } return localVarRequestBuilder; } + /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1148,6 +1160,7 @@ private HttpRequest.Builder testEndpointParametersRequestBuilder(BigDecimal numb } return localVarRequestBuilder; } + /** * To test enum parameters * To test enum parameters @@ -1278,6 +1291,7 @@ private HttpRequest.Builder testEnumParametersRequestBuilder(List enumHe } return localVarRequestBuilder; } + /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) @@ -1431,6 +1445,7 @@ private HttpRequest.Builder testGroupParametersRequestBuilder(Integer requiredSt return localVarRequestBuilder; } + public static final class APItestGroupParametersRequest { private Integer requiredStringGroup; // Required String in group parameters (required) private Boolean requiredBooleanGroup; // Required Boolean in group parameters (required) @@ -1507,9 +1522,6 @@ public APItestGroupParametersRequest build() { } } - @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0-SNAPSHOT") - private static final class GenericTypeRef extends TypeReference {} - /** * test inline additionalProperties * @@ -1590,6 +1602,7 @@ private HttpRequest.Builder testInlineAdditionalPropertiesRequestBuilder(Map testClassnameWithHttpInfo(Client client) throws ApiEx return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -164,4 +164,5 @@ private HttpRequest.Builder testClassnameRequestBuilder(Client client) throws Ap } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java index 37b6ca0aa299..d58042691484 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java @@ -169,6 +169,7 @@ private HttpRequest.Builder addPetRequestBuilder(Pet pet) throws ApiException { } return localVarRequestBuilder; } + /** * Deletes a pet * @@ -249,6 +250,7 @@ private HttpRequest.Builder deletePetRequestBuilder(Long petId, String apiKey) t } return localVarRequestBuilder; } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -284,7 +286,7 @@ public ApiResponse> findPetsByStatusWithHttpInfo(List status) return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -335,6 +337,7 @@ private HttpRequest.Builder findPetsByStatusRequestBuilder(List status) } return localVarRequestBuilder; } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -374,7 +377,7 @@ public ApiResponse> findPetsByTagsWithHttpInfo(List tags) thro return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -425,6 +428,7 @@ private HttpRequest.Builder findPetsByTagsRequestBuilder(List tags) thro } return localVarRequestBuilder; } + /** * Find pet by ID * Returns a single pet @@ -460,7 +464,7 @@ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -497,6 +501,7 @@ private HttpRequest.Builder getPetByIdRequestBuilder(Long petId) throws ApiExcep } return localVarRequestBuilder; } + /** * Update an existing pet * @@ -577,6 +582,7 @@ private HttpRequest.Builder updatePetRequestBuilder(Pet pet) throws ApiException } return localVarRequestBuilder; } + /** * Updates a pet in the store with form data * @@ -673,6 +679,7 @@ private HttpRequest.Builder updatePetWithFormRequestBuilder(Long petId, String n } return localVarRequestBuilder; } + /** * uploads an image * @@ -712,7 +719,7 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -783,6 +790,7 @@ private HttpRequest.Builder uploadFileRequestBuilder(Long petId, String addition } return localVarRequestBuilder; } + /** * uploads an image (required) * @@ -822,7 +830,7 @@ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -897,4 +905,5 @@ private HttpRequest.Builder uploadFileWithRequiredFileRequestBuilder(Long petId, } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java index a48d45863ee3..5bf03d6a98f2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java @@ -162,6 +162,7 @@ private HttpRequest.Builder deleteOrderRequestBuilder(String orderId) throws Api } return localVarRequestBuilder; } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -195,7 +196,7 @@ public ApiResponse> getInventoryWithHttpInfo() throws ApiEx return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef>()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -227,6 +228,7 @@ private HttpRequest.Builder getInventoryRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @@ -262,7 +264,7 @@ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiExcep return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -299,6 +301,7 @@ private HttpRequest.Builder getOrderByIdRequestBuilder(Long orderId) throws ApiE } return localVarRequestBuilder; } + /** * Place an order for a pet * @@ -334,7 +337,7 @@ public ApiResponse placeOrderWithHttpInfo(Order order) throws ApiExceptio return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -376,4 +379,5 @@ private HttpRequest.Builder placeOrderRequestBuilder(Order order) throws ApiExce } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java index f7edca010e3d..e78bc8f4805f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java @@ -168,6 +168,7 @@ private HttpRequest.Builder createUserRequestBuilder(User user) throws ApiExcept } return localVarRequestBuilder; } + /** * Creates list of users with given input array * @@ -248,6 +249,7 @@ private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List u } return localVarRequestBuilder; } + /** * Creates list of users with given input array * @@ -328,6 +330,7 @@ private HttpRequest.Builder createUsersWithListInputRequestBuilder(List us } return localVarRequestBuilder; } + /** * Delete user * This can only be done by the logged in user. @@ -403,6 +406,7 @@ private HttpRequest.Builder deleteUserRequestBuilder(String username) throws Api } return localVarRequestBuilder; } + /** * Get user by user name * @@ -438,7 +442,7 @@ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiEx return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -475,6 +479,7 @@ private HttpRequest.Builder getUserByNameRequestBuilder(String username) throws } return localVarRequestBuilder; } + /** * Logs user into the system * @@ -512,7 +517,7 @@ public ApiResponse loginUserWithHttpInfo(String username, String passwor return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new GenericTypeRef()) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -569,6 +574,7 @@ private HttpRequest.Builder loginUserRequestBuilder(String username, String pass } return localVarRequestBuilder; } + /** * Logs out current logged in user session * @@ -637,6 +643,7 @@ private HttpRequest.Builder logoutUserRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** * Updated user * This can only be done by the logged in user. @@ -724,4 +731,5 @@ private HttpRequest.Builder updateUserRequestBuilder(String username, User user) } return localVarRequestBuilder; } + } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/ApiClient.java index 08a6cfe9ddd5..a524171d7e1a 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/ApiClient.java @@ -547,6 +547,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/ApiClient.java index 209f378884b6..4708b9034701 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/ApiClient.java @@ -559,6 +559,27 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + for (Authentication auth : authentications.values()) { + if (auth instanceof AWS4Auth) { + ((AWS4Auth) auth).setCredentials(accessKey, secretKey, sessionToken); + ((AWS4Auth) auth).setRegion(region); + ((AWS4Auth) auth).setService(service); + return; + } + } + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/auth/AWS4Auth.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/auth/AWS4Auth.java index 2c9dc2694de0..1b7694a2fa6a 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/auth/AWS4Auth.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/auth/AWS4Auth.java @@ -27,6 +27,7 @@ import software.amazon.awssdk.auth.credentials.AnonymousCredentialsProvider; import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; +import software.amazon.awssdk.auth.credentials.AwsSessionCredentials; import software.amazon.awssdk.auth.credentials.AwsCredentials; import software.amazon.awssdk.auth.signer.Aws4Signer; import software.amazon.awssdk.auth.signer.params.Aws4SignerParams; @@ -52,6 +53,10 @@ public void setCredentials(String accessKey, String secretKey) { this.credentials = AwsBasicCredentials.create(accessKey, secretKey); } + public void setCredentials(String accessKey, String secretKey, String sessionToken) { + this.credentials = AwsSessionCredentials.create(accessKey, secretKey, sessionToken); + } + public void setRegion(String region) { this.region = region; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java index ac08baa4cc4d..e4443654b300 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java @@ -564,6 +564,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiClient.java index 08a6cfe9ddd5..a524171d7e1a 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiClient.java @@ -547,6 +547,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/ApiClient.java index bccc06dde46a..690c499f5936 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/ApiClient.java @@ -550,6 +550,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java index f211421d38b4..d16ca42dee12 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java @@ -553,6 +553,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson-swagger1/.openapi-generator/FILES index 1db889c4947b..13f5d83f9cff 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson-swagger1/.openapi-generator/FILES @@ -6,14 +6,12 @@ api/openapi.yaml build.gradle build.sbt docs/Category.md +docs/CommonApi.md docs/ModelApiResponse.md docs/Order.md docs/Pet.md -docs/PetApi.md -docs/StoreApi.md docs/Tag.md docs/User.md -docs/UserApi.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -36,9 +34,7 @@ src/main/java/org/openapitools/client/ProgressResponseBody.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/StringUtil.java -src/main/java/org/openapitools/client/api/PetApi.java -src/main/java/org/openapitools/client/api/StoreApi.java -src/main/java/org/openapitools/client/api/UserApi.java +src/main/java/org/openapitools/client/api/CommonApi.java src/main/java/org/openapitools/client/auth/ApiKeyAuth.java src/main/java/org/openapitools/client/auth/Authentication.java src/main/java/org/openapitools/client/auth/HttpBasicAuth.java diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/README.md b/samples/client/petstore/java/okhttp-gson-swagger1/README.md index 459105f15c8f..fe07ad94bcd4 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/README.md +++ b/samples/client/petstore/java/okhttp-gson-swagger1/README.md @@ -85,7 +85,7 @@ import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; import org.openapitools.client.auth.*; import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; +import org.openapitools.client.api.CommonApi; public class Example { public static void main(String[] args) { @@ -96,13 +96,13 @@ public class Example { OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - PetApi apiInstance = new PetApi(defaultClient); + CommonApi apiInstance = new CommonApi(defaultClient); Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { Pet result = apiInstance.addPet(pet); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Exception when calling CommonApi#addPet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -119,26 +119,26 @@ All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID -*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user +*CommonApi* | [**addPet**](docs/CommonApi.md#addPet) | **POST** /pet | Add a new pet to the store +*CommonApi* | [**createUser**](docs/CommonApi.md#createUser) | **POST** /user | Create user +*CommonApi* | [**createUsersWithArrayInput**](docs/CommonApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +*CommonApi* | [**createUsersWithListInput**](docs/CommonApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +*CommonApi* | [**deleteOrder**](docs/CommonApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*CommonApi* | [**deletePet**](docs/CommonApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +*CommonApi* | [**deleteUser**](docs/CommonApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +*CommonApi* | [**findPetsByStatus**](docs/CommonApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +*CommonApi* | [**findPetsByTags**](docs/CommonApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +*CommonApi* | [**getInventory**](docs/CommonApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +*CommonApi* | [**getOrderById**](docs/CommonApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +*CommonApi* | [**getPetById**](docs/CommonApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +*CommonApi* | [**getUserByName**](docs/CommonApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +*CommonApi* | [**loginUser**](docs/CommonApi.md#loginUser) | **GET** /user/login | Logs user into the system +*CommonApi* | [**logoutUser**](docs/CommonApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +*CommonApi* | [**placeOrder**](docs/CommonApi.md#placeOrder) | **POST** /store/order | Place an order for a pet +*CommonApi* | [**updatePet**](docs/CommonApi.md#updatePet) | **PUT** /pet | Update an existing pet +*CommonApi* | [**updatePetWithForm**](docs/CommonApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +*CommonApi* | [**updateUser**](docs/CommonApi.md#updateUser) | **PUT** /user/{username} | Updated user +*CommonApi* | [**uploadFile**](docs/CommonApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image ## Documentation for Models diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml index cd0be0cc180b..e3d4e3eec104 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml @@ -44,7 +44,7 @@ paths: - read:pets summary: Add a new pet to the store tags: - - pet + - common x-content-type: application/json x-accepts: - application/json @@ -79,7 +79,7 @@ paths: - read:pets summary: Update an existing pet tags: - - pet + - common x-content-type: application/json x-accepts: - application/json @@ -126,7 +126,7 @@ paths: - read:pets summary: Finds Pets by status tags: - - pet + - common x-accepts: - application/json - application/xml @@ -168,7 +168,7 @@ paths: - read:pets summary: Finds Pets by tags tags: - - pet + - common x-accepts: - application/json - application/xml @@ -202,7 +202,7 @@ paths: - read:pets summary: Deletes a pet tags: - - pet + - common x-accepts: - application/json get: @@ -236,7 +236,7 @@ paths: - api_key: [] summary: Find pet by ID tags: - - pet + - common x-accepts: - application/json - application/xml @@ -267,7 +267,7 @@ paths: - read:pets summary: Updates a pet in the store with form data tags: - - pet + - common x-content-type: application/x-www-form-urlencoded x-accepts: - application/json @@ -303,7 +303,7 @@ paths: - read:pets summary: uploads an image tags: - - pet + - common x-content-type: multipart/form-data x-accepts: - application/json @@ -325,7 +325,7 @@ paths: - api_key: [] summary: Returns pet inventories by status tags: - - store + - common x-accepts: - application/json /store/order: @@ -353,7 +353,7 @@ paths: description: Invalid Order summary: Place an order for a pet tags: - - store + - common x-content-type: application/json x-accepts: - application/json @@ -379,7 +379,7 @@ paths: description: Order not found summary: Delete purchase order by ID tags: - - store + - common x-accepts: - application/json get: @@ -414,7 +414,7 @@ paths: description: Order not found summary: Find purchase order by ID tags: - - store + - common x-accepts: - application/json - application/xml @@ -436,7 +436,7 @@ paths: - api_key: [] summary: Create user tags: - - user + - common x-content-type: application/json x-accepts: - application/json @@ -453,7 +453,7 @@ paths: - api_key: [] summary: Creates list of users with given input array tags: - - user + - common x-content-type: application/json x-accepts: - application/json @@ -470,7 +470,7 @@ paths: - api_key: [] summary: Creates list of users with given input array tags: - - user + - common x-content-type: application/json x-accepts: - application/json @@ -533,7 +533,7 @@ paths: description: Invalid username/password supplied summary: Logs user into the system tags: - - user + - common x-accepts: - application/json - application/xml @@ -548,7 +548,7 @@ paths: - api_key: [] summary: Logs out current logged in user session tags: - - user + - common x-accepts: - application/json /user/{username}: @@ -573,7 +573,7 @@ paths: - api_key: [] summary: Delete user tags: - - user + - common x-accepts: - application/json get: @@ -604,7 +604,7 @@ paths: description: User not found summary: Get user by user name tags: - - user + - common x-accepts: - application/json - application/xml @@ -636,7 +636,7 @@ paths: - api_key: [] summary: Updated user tags: - - user + - common x-content-type: application/json x-accepts: - application/json diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/docs/CommonApi.md b/samples/client/petstore/java/okhttp-gson-swagger1/docs/CommonApi.md new file mode 100644 index 000000000000..28b3e5e5cf2c --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-swagger1/docs/CommonApi.md @@ -0,0 +1,1373 @@ +# CommonApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addPet**](CommonApi.md#addPet) | **POST** /pet | Add a new pet to the store | +| [**createUser**](CommonApi.md#createUser) | **POST** /user | Create user | +| [**createUsersWithArrayInput**](CommonApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | +| [**createUsersWithListInput**](CommonApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array | +| [**deleteOrder**](CommonApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID | +| [**deletePet**](CommonApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | +| [**deleteUser**](CommonApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | +| [**findPetsByStatus**](CommonApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByTags**](CommonApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | +| [**getInventory**](CommonApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | +| [**getOrderById**](CommonApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID | +| [**getPetById**](CommonApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | +| [**getUserByName**](CommonApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | +| [**loginUser**](CommonApi.md#loginUser) | **GET** /user/login | Logs user into the system | +| [**logoutUser**](CommonApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | +| [**placeOrder**](CommonApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | +| [**updatePet**](CommonApi.md#updatePet) | **PUT** /pet | Update an existing pet | +| [**updatePetWithForm**](CommonApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**updateUser**](CommonApi.md#updateUser) | **PUT** /user/{username} | Updated user | +| [**uploadFile**](CommonApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | + + + +# **addPet** +> Pet addPet(pet) + +Add a new pet to the store + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + CommonApi apiInstance = new CommonApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.addPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + + +# **createUser** +> createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + CommonApi apiInstance = new CommonApi(defaultClient); + User user = new User(); // User | Created user object + try { + apiInstance.createUser(user); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(user) + +Creates list of users with given input array + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + CommonApi apiInstance = new CommonApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(user); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +# **createUsersWithListInput** +> createUsersWithListInput(user) + +Creates list of users with given input array + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + CommonApi apiInstance = new CommonApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + apiInstance.createUsersWithListInput(user); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + CommonApi apiInstance = new CommonApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + CommonApi apiInstance = new CommonApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid pet value | - | + + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + CommonApi apiInstance = new CommonApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +# **findPetsByStatus** +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + CommonApi apiInstance = new CommonApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + + +# **findPetsByTags** +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + CommonApi apiInstance = new CommonApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**List<String>**](String.md)| Tags to filter by | | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + + +# **getInventory** +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + CommonApi apiInstance = new CommonApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map<String, Integer>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + CommonApi apiInstance = new CommonApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + CommonApi apiInstance = new CommonApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + CommonApi apiInstance = new CommonApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + CommonApi apiInstance = new CommonApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + CommonApi apiInstance = new CommonApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +# **placeOrder** +> Order placeOrder(order) + +Place an order for a pet + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + CommonApi apiInstance = new CommonApi(defaultClient); + Order order = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + + +# **updatePet** +> Pet updatePet(pet) + +Update an existing pet + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + CommonApi apiInstance = new CommonApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.updatePet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/xml, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + CommonApi apiInstance = new CommonApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + + +# **updateUser** +> updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + CommonApi apiInstance = new CommonApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User user = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, user); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + + +# **uploadFile** +> ModelApiResponse uploadFile(petId, additionalMetadata, _file) + +uploads an image + + + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommonApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + CommonApi apiInstance = new CommonApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File _file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommonApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-swagger1/docs/PetApi.md deleted file mode 100644 index f395ba3f6f16..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/docs/PetApi.md +++ /dev/null @@ -1,570 +0,0 @@ -# PetApi - -All URIs are relative to *http://petstore.swagger.io/v2* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store | -| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | -| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | -| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | -| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | -| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet | -| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | -| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | - - - -# **addPet** -> Pet addPet(pet) - -Add a new pet to the store - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store - try { - Pet result = apiInstance.addPet(pet); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **405** | Invalid input | - | - - -# **deletePet** -> deletePet(petId, apiKey) - -Deletes a pet - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | Pet id to delete - String apiKey = "apiKey_example"; // String | - try { - apiInstance.deletePet(petId, apiKey); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| Pet id to delete | | -| **apiKey** | **String**| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid pet value | - | - - -# **findPetsByStatus** -> List<Pet> findPetsByStatus(status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter - try { - List result = apiInstance.findPetsByStatus(status); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid status value | - | - - -# **findPetsByTags** -> List<Pet> findPetsByTags(tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - List tags = Arrays.asList(); // List | Tags to filter by - try { - List result = apiInstance.findPetsByTags(tags); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **tags** | [**List<String>**](String.md)| Tags to filter by | | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid tag value | - | - - -# **getPetById** -> Pet getPetById(petId) - -Find pet by ID - -Returns a single pet - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | ID of pet to return - try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| ID of pet to return | | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | - - -# **updatePet** -> Pet updatePet(pet) - -Update an existing pet - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store - try { - Pet result = apiInstance.updatePet(pet); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | -| **405** | Validation exception | - | - - -# **updatePetWithForm** -> updatePetWithForm(petId, name, status) - -Updates a pet in the store with form data - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | ID of pet that needs to be updated - String name = "name_example"; // String | Updated name of the pet - String status = "status_example"; // String | Updated status of the pet - try { - apiInstance.updatePetWithForm(petId, name, status); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| ID of pet that needs to be updated | | -| **name** | **String**| Updated name of the pet | [optional] | -| **status** | **String**| Updated status of the pet | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **405** | Invalid input | - | - - -# **uploadFile** -> ModelApiResponse uploadFile(petId, additionalMetadata, _file) - -uploads an image - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | ID of pet to update - String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server - File _file = new File("/path/to/file"); // File | file to upload - try { - ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| ID of pet to update | | -| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | -| **_file** | **File**| file to upload | [optional] | - -### Return type - -[**ModelApiResponse**](ModelApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson-swagger1/docs/StoreApi.md deleted file mode 100644 index af54298ffc2e..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/docs/StoreApi.md +++ /dev/null @@ -1,266 +0,0 @@ -# StoreApi - -All URIs are relative to *http://petstore.swagger.io/v2* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID | -| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | -| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID | -| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | - - - -# **deleteOrder** -> deleteOrder(orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.StoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - StoreApi apiInstance = new StoreApi(defaultClient); - String orderId = "orderId_example"; // String | ID of the order that needs to be deleted - try { - apiInstance.deleteOrder(orderId); - } catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orderId** | **String**| ID of the order that needs to be deleted | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - - -# **getInventory** -> Map<String, Integer> getInventory() - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.StoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - StoreApi apiInstance = new StoreApi(defaultClient); - try { - Map result = apiInstance.getInventory(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**Map<String, Integer>** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - - -# **getOrderById** -> Order getOrderById(orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.StoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - StoreApi apiInstance = new StoreApi(defaultClient); - Long orderId = 56L; // Long | ID of pet that needs to be fetched - try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orderId** | **Long**| ID of pet that needs to be fetched | | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - - -# **placeOrder** -> Order placeOrder(order) - -Place an order for a pet - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.StoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - StoreApi apiInstance = new StoreApi(defaultClient); - Order order = new Order(); // Order | order placed for purchasing the pet - try { - Order result = apiInstance.placeOrder(order); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid Order | - | - diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/docs/UserApi.md b/samples/client/petstore/java/okhttp-gson-swagger1/docs/UserApi.md deleted file mode 100644 index 4c338a42137a..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/docs/UserApi.md +++ /dev/null @@ -1,553 +0,0 @@ -# UserApi - -All URIs are relative to *http://petstore.swagger.io/v2* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user | -| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | -| [**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array | -| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | -| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | -| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system | -| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | -| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user | - - - -# **createUser** -> createUser(user) - -Create user - -This can only be done by the logged in user. - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - UserApi apiInstance = new UserApi(defaultClient); - User user = new User(); // User | Created user object - try { - apiInstance.createUser(user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **user** | [**User**](User.md)| Created user object | | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - - -# **createUsersWithArrayInput** -> createUsersWithArrayInput(user) - -Creates list of users with given input array - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - UserApi apiInstance = new UserApi(defaultClient); - List user = Arrays.asList(); // List | List of user object - try { - apiInstance.createUsersWithArrayInput(user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **user** | [**List<User>**](User.md)| List of user object | | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - - -# **createUsersWithListInput** -> createUsersWithListInput(user) - -Creates list of users with given input array - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - UserApi apiInstance = new UserApi(defaultClient); - List user = Arrays.asList(); // List | List of user object - try { - apiInstance.createUsersWithListInput(user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **user** | [**List<User>**](User.md)| List of user object | | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - - -# **deleteUser** -> deleteUser(username) - -Delete user - -This can only be done by the logged in user. - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | The name that needs to be deleted - try { - apiInstance.deleteUser(username); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **username** | **String**| The name that needs to be deleted | | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - - -# **getUserByName** -> User getUserByName(username) - -Get user by user name - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. - try { - User result = apiInstance.getUserByName(username); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - - -# **loginUser** -> String loginUser(username, password) - -Logs user into the system - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | The user name for login - String password = "password_example"; // String | The password for login in clear text - try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **username** | **String**| The user name for login | | -| **password** | **String**| The password for login in clear text | | - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| -| **400** | Invalid username/password supplied | - | - - -# **logoutUser** -> logoutUser() - -Logs out current logged in user session - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - UserApi apiInstance = new UserApi(defaultClient); - try { - apiInstance.logoutUser(); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - - -# **updateUser** -> updateUser(username, user) - -Updated user - -This can only be done by the logged in user. - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://petstore.swagger.io/v2"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | name that need to be deleted - User user = new User(); // User | Updated user object - try { - apiInstance.updateUser(username, user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **username** | **String**| name that need to be deleted | | -| **user** | [**User**](User.md)| Updated user object | | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid user supplied | - | -| **404** | User not found | - | - diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiClient.java index 08a6cfe9ddd5..a524171d7e1a 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiClient.java @@ -547,6 +547,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/CommonApi.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/CommonApi.java new file mode 100644 index 000000000000..acf847d569b3 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/CommonApi.java @@ -0,0 +1,2645 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiCallback; +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; +import org.openapitools.client.ProgressRequestBody; +import org.openapitools.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import java.time.OffsetDateTime; +import org.openapitools.client.model.Order; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.User; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CommonApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public CommonApi() { + this(Configuration.getDefaultApiClient()); + } + + public CommonApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for addPet + * @param pet Pet object that needs to be added to the store (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details +
+ + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
+ */ + public okhttp3.Call addPetCall(Pet pet, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = pet; + + // create path and map variables + String localVarPath = "/pet"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json", + "application/xml" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call addPetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException("Missing the required parameter 'pet' when calling addPet(Async)"); + } + + return addPetCall(pet, _callback); + + } + + /** + * Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store (required) + * @return Pet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
+ */ + public Pet addPet(Pet pet) throws ApiException { + ApiResponse localVarResp = addPetWithHttpInfo(pet); + return localVarResp.getData(); + } + + /** + * Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store (required) + * @return ApiResponse<Pet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
+ */ + public ApiResponse addPetWithHttpInfo(Pet pet) throws ApiException { + okhttp3.Call localVarCall = addPetValidateBeforeCall(pet, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Add a new pet to the store (asynchronously) + * + * @param pet Pet object that needs to be added to the store (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
+ */ + public okhttp3.Call addPetAsync(Pet pet, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = addPetValidateBeforeCall(pet, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createUser + * @param user Created user object (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public okhttp3.Call createUserCall(User user, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = user; + + // create path and map variables + String localVarPath = "/user"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createUserValidateBeforeCall(User user, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException("Missing the required parameter 'user' when calling createUser(Async)"); + } + + return createUserCall(user, _callback); + + } + + /** + * Create user + * This can only be done by the logged in user. + * @param user Created user object (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public void createUser(User user) throws ApiException { + createUserWithHttpInfo(user); + } + + /** + * Create user + * This can only be done by the logged in user. + * @param user Created user object (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public ApiResponse createUserWithHttpInfo(User user) throws ApiException { + okhttp3.Call localVarCall = createUserValidateBeforeCall(user, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Create user (asynchronously) + * This can only be done by the logged in user. + * @param user Created user object (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public okhttp3.Call createUserAsync(User user, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createUserValidateBeforeCall(user, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for createUsersWithArrayInput + * @param user List of user object (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public okhttp3.Call createUsersWithArrayInputCall(List user, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = user; + + // create path and map variables + String localVarPath = "/user/createWithArray"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List user, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException("Missing the required parameter 'user' when calling createUsersWithArrayInput(Async)"); + } + + return createUsersWithArrayInputCall(user, _callback); + + } + + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public void createUsersWithArrayInput(List user) throws ApiException { + createUsersWithArrayInputWithHttpInfo(user); + } + + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public ApiResponse createUsersWithArrayInputWithHttpInfo(List user) throws ApiException { + okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(user, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Creates list of users with given input array (asynchronously) + * + * @param user List of user object (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public okhttp3.Call createUsersWithArrayInputAsync(List user, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(user, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for createUsersWithListInput + * @param user List of user object (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public okhttp3.Call createUsersWithListInputCall(List user, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = user; + + // create path and map variables + String localVarPath = "/user/createWithList"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createUsersWithListInputValidateBeforeCall(List user, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException("Missing the required parameter 'user' when calling createUsersWithListInput(Async)"); + } + + return createUsersWithListInputCall(user, _callback); + + } + + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public void createUsersWithListInput(List user) throws ApiException { + createUsersWithListInputWithHttpInfo(user); + } + + /** + * Creates list of users with given input array + * + * @param user List of user object (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public ApiResponse createUsersWithListInputWithHttpInfo(List user) throws ApiException { + okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(user, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Creates list of users with given input array (asynchronously) + * + * @param user List of user object (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public okhttp3.Call createUsersWithListInputAsync(List user, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(user, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteOrder + * @param orderId ID of the order that needs to be deleted (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
+ */ + public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/store/order/{orderId}" + .replace("{" + "orderId" + "}", localVarApiClient.escapeString(orderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orderId' is set + if (orderId == null) { + throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)"); + } + + return deleteOrderCall(orderId, _callback); + + } + + /** + * 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) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
+ */ + public void deleteOrder(String orderId) throws ApiException { + deleteOrderWithHttpInfo(orderId); + } + + /** + * 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 ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
+ */ + public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { + okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete purchase order by ID (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
+ */ + public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deletePet + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
400 Invalid pet value -
+ */ + public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/pet/{petId}" + .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (apiKey != null) { + localVarHeaderParams.put("api_key", localVarApiClient.parameterToString(apiKey)); + } + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)"); + } + + return deletePetCall(petId, apiKey, _callback); + + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
400 Invalid pet value -
+ */ + public void deletePet(Long petId, String apiKey) throws ApiException { + deletePetWithHttpInfo(petId, apiKey); + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
400 Invalid pet value -
+ */ + public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { + okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Deletes a pet (asynchronously) + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
400 Invalid pet value -
+ */ + public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteUser + * @param username The name that needs to be deleted (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
+ */ + public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/{username}" + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)"); + } + + return deleteUserCall(username, _callback); + + } + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
+ */ + public void deleteUser(String username) throws ApiException { + deleteUserWithHttpInfo(username); + } + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
+ */ + public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete user (asynchronously) + * This can only be done by the logged in user. + * @param username The name that needs to be deleted (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
+ */ + public okhttp3.Call deleteUserAsync(String username, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for findPetsByStatus + * @param status Status values that need to be considered for filter (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
+ */ + public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/pet/findByStatus"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (status != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "status", status)); + } + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'status' is set + if (status == null) { + throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)"); + } + + return findPetsByStatusCall(status, _callback); + + } + + /** + * 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 List<Pet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
+ */ + public List findPetsByStatus(List status) throws ApiException { + ApiResponse> localVarResp = findPetsByStatusWithHttpInfo(status); + return localVarResp.getData(); + } + + /** + * 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 ApiResponse<List<Pet>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
+ */ + public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { + okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Finds Pets by status (asynchronously) + * Multiple status values can be provided with comma separated strings + * @param status Status values that need to be considered for filter (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
+ */ + public okhttp3.Call findPetsByStatusAsync(List status, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for findPetsByTags + * @param tags Tags to filter by (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call findPetsByTagsCall(List tags, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/pet/findByTags"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tags != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "tags", tags)); + } + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call findPetsByTagsValidateBeforeCall(List tags, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'tags' is set + if (tags == null) { + throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)"); + } + + return findPetsByTagsCall(tags, _callback); + + } + + /** + * 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 List<Pet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
+ * @deprecated + */ + @Deprecated + public List findPetsByTags(List tags) throws ApiException { + ApiResponse> localVarResp = findPetsByTagsWithHttpInfo(tags); + return localVarResp.getData(); + } + + /** + * 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 ApiResponse<List<Pet>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
+ * @deprecated + */ + @Deprecated + public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { + okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Finds Pets by tags (asynchronously) + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @param tags Tags to filter by (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call findPetsByTagsAsync(List tags, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getInventory + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
+ */ + public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/store/inventory"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getInventoryValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getInventoryCall(_callback); + + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @return Map<String, Integer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
+ */ + public Map getInventory() throws ApiException { + ApiResponse> localVarResp = getInventoryWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @return ApiResponse<Map<String, Integer>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
+ */ + public ApiResponse> getInventoryWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns pet inventories by status (asynchronously) + * Returns a map of status codes to quantities + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
+ */ + public okhttp3.Call getInventoryAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOrderById + * @param orderId ID of pet that needs to be fetched (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
+ */ + public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/store/order/{orderId}" + .replace("{" + "orderId" + "}", localVarApiClient.escapeString(orderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orderId' is set + if (orderId == null) { + throw new ApiException("Missing the required parameter 'orderId' when calling getOrderById(Async)"); + } + + return getOrderByIdCall(orderId, _callback); + + } + + /** + * 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 Order + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
+ */ + public Order getOrderById(Long orderId) throws ApiException { + ApiResponse localVarResp = getOrderByIdWithHttpInfo(orderId); + return localVarResp.getData(); + } + + /** + * 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 ApiResponse<Order> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
+ */ + public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { + okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Find purchase order by ID (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
+ */ + public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getPetById + * @param petId ID of pet to return (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
+ */ + public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/pet/{petId}" + .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)"); + } + + return getPetByIdCall(petId, _callback); + + } + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return (required) + * @return Pet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
+ */ + public Pet getPetById(Long petId) throws ApiException { + ApiResponse localVarResp = getPetByIdWithHttpInfo(petId); + return localVarResp.getData(); + } + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return (required) + * @return ApiResponse<Pet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
+ */ + public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { + okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Find pet by ID (asynchronously) + * Returns a single pet + * @param petId ID of pet to return (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
+ */ + public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserByName + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
+ */ + public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/{username}" + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException("Missing the required parameter 'username' when calling getUserByName(Async)"); + } + + return getUserByNameCall(username, _callback); + + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return User + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
+ */ + public User getUserByName(String username) throws ApiException { + ApiResponse localVarResp = getUserByNameWithHttpInfo(username); + return localVarResp.getData(); + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return ApiResponse<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
+ */ + public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { + okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get user by user name (asynchronously) + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
+ */ + public okhttp3.Call getUserByNameAsync(String username, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for loginUser + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
+ */ + public okhttp3.Call loginUserCall(String username, String password, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/login"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (username != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); + } + + if (password != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("password", password)); + } + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException("Missing the required parameter 'username' when calling loginUser(Async)"); + } + + // verify the required parameter 'password' is set + if (password == null) { + throw new ApiException("Missing the required parameter 'password' when calling loginUser(Async)"); + } + + return loginUserCall(username, password, _callback); + + } + + /** + * Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return String + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
+ */ + public String loginUser(String username, String password) throws ApiException { + ApiResponse localVarResp = loginUserWithHttpInfo(username, password); + return localVarResp.getData(); + } + + /** + * Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return ApiResponse<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
+ */ + public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { + okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Logs user into the system (asynchronously) + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
+ */ + public okhttp3.Call loginUserAsync(String username, String password, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for logoutUser + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/logout"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call logoutUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return logoutUserCall(_callback); + + } + + /** + * Logs out current logged in user session + * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public void logoutUser() throws ApiException { + logoutUserWithHttpInfo(); + } + + /** + * Logs out current logged in user session + * + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public ApiResponse logoutUserWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = logoutUserValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Logs out current logged in user session (asynchronously) + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
0 successful operation -
+ */ + public okhttp3.Call logoutUserAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = logoutUserValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for placeOrder + * @param order order placed for purchasing the pet (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
+ */ + public okhttp3.Call placeOrderCall(Order order, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = order; + + // create path and map variables + String localVarPath = "/store/order"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call placeOrderValidateBeforeCall(Order order, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'order' is set + if (order == null) { + throw new ApiException("Missing the required parameter 'order' when calling placeOrder(Async)"); + } + + return placeOrderCall(order, _callback); + + } + + /** + * Place an order for a pet + * + * @param order order placed for purchasing the pet (required) + * @return Order + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
+ */ + public Order placeOrder(Order order) throws ApiException { + ApiResponse localVarResp = placeOrderWithHttpInfo(order); + return localVarResp.getData(); + } + + /** + * Place an order for a pet + * + * @param order order placed for purchasing the pet (required) + * @return ApiResponse<Order> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
+ */ + public ApiResponse placeOrderWithHttpInfo(Order order) throws ApiException { + okhttp3.Call localVarCall = placeOrderValidateBeforeCall(order, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Place an order for a pet (asynchronously) + * + * @param order order placed for purchasing the pet (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
+ */ + public okhttp3.Call placeOrderAsync(Order order, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = placeOrderValidateBeforeCall(order, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updatePet + * @param pet Pet object that needs to be added to the store (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
+ * API documentation for the updatePet operation + * @see Update an existing pet Documentation + */ + public okhttp3.Call updatePetCall(Pet pet, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = pet; + + // create path and map variables + String localVarPath = "/pet"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/xml", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json", + "application/xml" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updatePetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException("Missing the required parameter 'pet' when calling updatePet(Async)"); + } + + return updatePetCall(pet, _callback); + + } + + /** + * Update an existing pet + * + * @param pet Pet object that needs to be added to the store (required) + * @return Pet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
+ * API documentation for the updatePet operation + * @see Update an existing pet Documentation + */ + public Pet updatePet(Pet pet) throws ApiException { + ApiResponse localVarResp = updatePetWithHttpInfo(pet); + return localVarResp.getData(); + } + + /** + * Update an existing pet + * + * @param pet Pet object that needs to be added to the store (required) + * @return ApiResponse<Pet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
+ * API documentation for the updatePet operation + * @see Update an existing pet Documentation + */ + public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { + okhttp3.Call localVarCall = updatePetValidateBeforeCall(pet, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update an existing pet (asynchronously) + * + * @param pet Pet object that needs to be added to the store (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
+ * API documentation for the updatePet operation + * @see Update an existing pet Documentation + */ + public okhttp3.Call updatePetAsync(Pet pet, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updatePetValidateBeforeCall(pet, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updatePetWithForm + * @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) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
+ */ + public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/pet/{petId}" + .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (name != null) { + localVarFormParams.put("name", name); + } + + if (status != null) { + localVarFormParams.put("status", status); + } + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)"); + } + + return updatePetWithFormCall(petId, name, status, _callback); + + } + + /** + * 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) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
+ */ + public void updatePetWithForm(Long petId, String name, String status) throws ApiException { + updatePetWithFormWithHttpInfo(petId, name, status); + } + + /** + * 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 ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
+ */ + public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { + okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Updates a pet in the store with form data (asynchronously) + * + * @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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
405 Invalid input -
+ */ + public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateUser + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
+ */ + public okhttp3.Call updateUserCall(String username, User user, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = user; + + // create path and map variables + String localVarPath = "/user/{username}" + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "api_key" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateUserValidateBeforeCall(String username, User user, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException("Missing the required parameter 'username' when calling updateUser(Async)"); + } + + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException("Missing the required parameter 'user' when calling updateUser(Async)"); + } + + return updateUserCall(username, user, _callback); + + } + + /** + * 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) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
+ */ + public void updateUser(String username, User user) throws ApiException { + updateUserWithHttpInfo(username, user); + } + + /** + * 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 ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
+ */ + public ApiResponse updateUserWithHttpInfo(String username, User user) throws ApiException { + okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, user, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Updated user (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
+ */ + public okhttp3.Call updateUserAsync(String username, User user, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, user, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for uploadFile + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param _file file to upload (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
+ */ + public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImage" + .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (additionalMetadata != null) { + localVarFormParams.put("additionalMetadata", additionalMetadata); + } + + if (_file != null) { + localVarFormParams.put("file", _file); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)"); + } + + return uploadFileCall(petId, additionalMetadata, _file, _callback); + + } + + /** + * 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 ModelApiResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
+ */ + public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws ApiException { + ApiResponse localVarResp = uploadFileWithHttpInfo(petId, additionalMetadata, _file); + return localVarResp.getData(); + } + + /** + * 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 ApiResponse<ModelApiResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
+ */ + public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException { + okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, _file, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * uploads an image (asynchronously) + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param _file file to upload (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 successful operation -
+ */ + public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, _file, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/PetApi.java deleted file mode 100644 index 2c57d0c17dcd..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/PetApi.java +++ /dev/null @@ -1,1155 +0,0 @@ -/* - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PetApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PetApi() { - this(Configuration.getDefaultApiClient()); - } - - public PetApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for addPet - * @param pet Pet object that needs to be added to the store (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
- */ - public okhttp3.Call addPetCall(Pet pet, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = pet; - - // create path and map variables - String localVarPath = "/pet"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json", - "application/xml" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call addPetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pet' is set - if (pet == null) { - throw new ApiException("Missing the required parameter 'pet' when calling addPet(Async)"); - } - - return addPetCall(pet, _callback); - - } - - /** - * Add a new pet to the store - * - * @param pet Pet object that needs to be added to the store (required) - * @return Pet - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
- */ - public Pet addPet(Pet pet) throws ApiException { - ApiResponse localVarResp = addPetWithHttpInfo(pet); - return localVarResp.getData(); - } - - /** - * Add a new pet to the store - * - * @param pet Pet object that needs to be added to the store (required) - * @return ApiResponse<Pet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
- */ - public ApiResponse addPetWithHttpInfo(Pet pet) throws ApiException { - okhttp3.Call localVarCall = addPetValidateBeforeCall(pet, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Add a new pet to the store (asynchronously) - * - * @param pet Pet object that needs to be added to the store (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
405 Invalid input -
- */ - public okhttp3.Call addPetAsync(Pet pet, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = addPetValidateBeforeCall(pet, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deletePet - * @param petId Pet id to delete (required) - * @param apiKey (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
400 Invalid pet value -
- */ - public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/pet/{petId}" - .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (apiKey != null) { - localVarHeaderParams.put("api_key", localVarApiClient.parameterToString(apiKey)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)"); - } - - return deletePetCall(petId, apiKey, _callback); - - } - - /** - * Deletes a pet - * - * @param petId Pet id to delete (required) - * @param apiKey (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
400 Invalid pet value -
- */ - public void deletePet(Long petId, String apiKey) throws ApiException { - deletePetWithHttpInfo(petId, apiKey); - } - - /** - * Deletes a pet - * - * @param petId Pet id to delete (required) - * @param apiKey (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
400 Invalid pet value -
- */ - public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { - okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Deletes a pet (asynchronously) - * - * @param petId Pet id to delete (required) - * @param apiKey (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
400 Invalid pet value -
- */ - public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findPetsByStatus - * @param status Status values that need to be considered for filter (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
- */ - public okhttp3.Call findPetsByStatusCall(List status, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/pet/findByStatus"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (status != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "status", status)); - } - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'status' is set - if (status == null) { - throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)"); - } - - return findPetsByStatusCall(status, _callback); - - } - - /** - * 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 List<Pet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
- */ - public List findPetsByStatus(List status) throws ApiException { - ApiResponse> localVarResp = findPetsByStatusWithHttpInfo(status); - return localVarResp.getData(); - } - - /** - * 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 ApiResponse<List<Pet>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
- */ - public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { - okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Finds Pets by status (asynchronously) - * Multiple status values can be provided with comma separated strings - * @param status Status values that need to be considered for filter (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid status value -
- */ - public okhttp3.Call findPetsByStatusAsync(List status, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPetsByTags - * @param tags Tags to filter by (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
- * @deprecated - */ - @Deprecated - public okhttp3.Call findPetsByTagsCall(List tags, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/pet/findByTags"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (tags != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "tags", tags)); - } - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call findPetsByTagsValidateBeforeCall(List tags, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'tags' is set - if (tags == null) { - throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)"); - } - - return findPetsByTagsCall(tags, _callback); - - } - - /** - * 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 List<Pet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
- * @deprecated - */ - @Deprecated - public List findPetsByTags(List tags) throws ApiException { - ApiResponse> localVarResp = findPetsByTagsWithHttpInfo(tags); - return localVarResp.getData(); - } - - /** - * 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 ApiResponse<List<Pet>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
- * @deprecated - */ - @Deprecated - public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { - okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Finds Pets by tags (asynchronously) - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @param tags Tags to filter by (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid tag value -
- * @deprecated - */ - @Deprecated - public okhttp3.Call findPetsByTagsAsync(List tags, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getPetById - * @param petId ID of pet to return (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
- */ - public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/pet/{petId}" - .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)"); - } - - return getPetByIdCall(petId, _callback); - - } - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return (required) - * @return Pet - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
- */ - public Pet getPetById(Long petId) throws ApiException { - ApiResponse localVarResp = getPetByIdWithHttpInfo(petId); - return localVarResp.getData(); - } - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return (required) - * @return ApiResponse<Pet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
- */ - public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { - okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Find pet by ID (asynchronously) - * Returns a single pet - * @param petId ID of pet to return (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
- */ - public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updatePet - * @param pet Pet object that needs to be added to the store (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
- * API documentation for the updatePet operation - * @see Update an existing pet Documentation - */ - public okhttp3.Call updatePetCall(Pet pet, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = pet; - - // create path and map variables - String localVarPath = "/pet"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json", - "application/xml" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updatePetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pet' is set - if (pet == null) { - throw new ApiException("Missing the required parameter 'pet' when calling updatePet(Async)"); - } - - return updatePetCall(pet, _callback); - - } - - /** - * Update an existing pet - * - * @param pet Pet object that needs to be added to the store (required) - * @return Pet - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
- * API documentation for the updatePet operation - * @see Update an existing pet Documentation - */ - public Pet updatePet(Pet pet) throws ApiException { - ApiResponse localVarResp = updatePetWithHttpInfo(pet); - return localVarResp.getData(); - } - - /** - * Update an existing pet - * - * @param pet Pet object that needs to be added to the store (required) - * @return ApiResponse<Pet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
- * API documentation for the updatePet operation - * @see Update an existing pet Documentation - */ - public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { - okhttp3.Call localVarCall = updatePetValidateBeforeCall(pet, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update an existing pet (asynchronously) - * - * @param pet Pet object that needs to be added to the store (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Pet not found -
405 Validation exception -
- * API documentation for the updatePet operation - * @see Update an existing pet Documentation - */ - public okhttp3.Call updatePetAsync(Pet pet, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updatePetValidateBeforeCall(pet, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updatePetWithForm - * @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) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
405 Invalid input -
- */ - public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/pet/{petId}" - .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (name != null) { - localVarFormParams.put("name", name); - } - - if (status != null) { - localVarFormParams.put("status", status); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)"); - } - - return updatePetWithFormCall(petId, name, status, _callback); - - } - - /** - * 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) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
405 Invalid input -
- */ - public void updatePetWithForm(Long petId, String name, String status) throws ApiException { - updatePetWithFormWithHttpInfo(petId, name, status); - } - - /** - * 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 ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
405 Invalid input -
- */ - public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { - okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Updates a pet in the store with form data (asynchronously) - * - * @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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
405 Invalid input -
- */ - public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for uploadFile - * @param petId ID of pet to update (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param _file file to upload (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
- */ - public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/pet/{petId}/uploadImage" - .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (additionalMetadata != null) { - localVarFormParams.put("additionalMetadata", additionalMetadata); - } - - if (_file != null) { - localVarFormParams.put("file", _file); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)"); - } - - return uploadFileCall(petId, additionalMetadata, _file, _callback); - - } - - /** - * 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 ModelApiResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
- */ - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws ApiException { - ApiResponse localVarResp = uploadFileWithHttpInfo(petId, additionalMetadata, _file); - return localVarResp.getData(); - } - - /** - * 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 ApiResponse<ModelApiResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
- */ - public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException { - okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, _file, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * uploads an image (asynchronously) - * - * @param petId ID of pet to update (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param _file file to upload (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
- */ - public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, _file, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java deleted file mode 100644 index df8db739366f..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java +++ /dev/null @@ -1,570 +0,0 @@ -/* - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.Order; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class StoreApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public StoreApi() { - this(Configuration.getDefaultApiClient()); - } - - public StoreApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for deleteOrder - * @param orderId ID of the order that needs to be deleted (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
- */ - public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replace("{" + "orderId" + "}", localVarApiClient.escapeString(orderId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'orderId' is set - if (orderId == null) { - throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)"); - } - - return deleteOrderCall(orderId, _callback); - - } - - /** - * 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) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
- */ - public void deleteOrder(String orderId) throws ApiException { - deleteOrderWithHttpInfo(orderId); - } - - /** - * 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 ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
- */ - public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { - okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete purchase order by ID (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid ID supplied -
404 Order not found -
- */ - public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getInventory - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
- */ - public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/store/inventory"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getInventoryValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getInventoryCall(_callback); - - } - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * @return Map<String, Integer> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
- */ - public Map getInventory() throws ApiException { - ApiResponse> localVarResp = getInventoryWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * @return ApiResponse<Map<String, Integer>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
- */ - public ApiResponse> getInventoryWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Returns pet inventories by status (asynchronously) - * Returns a map of status codes to quantities - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 successful operation -
- */ - public okhttp3.Call getInventoryAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getOrderById - * @param orderId ID of pet that needs to be fetched (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
- */ - public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replace("{" + "orderId" + "}", localVarApiClient.escapeString(orderId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'orderId' is set - if (orderId == null) { - throw new ApiException("Missing the required parameter 'orderId' when calling getOrderById(Async)"); - } - - return getOrderByIdCall(orderId, _callback); - - } - - /** - * 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 Order - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
- */ - public Order getOrderById(Long orderId) throws ApiException { - ApiResponse localVarResp = getOrderByIdWithHttpInfo(orderId); - return localVarResp.getData(); - } - - /** - * 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 ApiResponse<Order> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
- */ - public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { - okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Find purchase order by ID (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid ID supplied -
404 Order not found -
- */ - public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for placeOrder - * @param order order placed for purchasing the pet (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
- */ - public okhttp3.Call placeOrderCall(Order order, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = order; - - // create path and map variables - String localVarPath = "/store/order"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call placeOrderValidateBeforeCall(Order order, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'order' is set - if (order == null) { - throw new ApiException("Missing the required parameter 'order' when calling placeOrder(Async)"); - } - - return placeOrderCall(order, _callback); - - } - - /** - * Place an order for a pet - * - * @param order order placed for purchasing the pet (required) - * @return Order - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
- */ - public Order placeOrder(Order order) throws ApiException { - ApiResponse localVarResp = placeOrderWithHttpInfo(order); - return localVarResp.getData(); - } - - /** - * Place an order for a pet - * - * @param order order placed for purchasing the pet (required) - * @return ApiResponse<Order> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
- */ - public ApiResponse placeOrderWithHttpInfo(Order order) throws ApiException { - okhttp3.Call localVarCall = placeOrderValidateBeforeCall(order, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Place an order for a pet (asynchronously) - * - * @param order order placed for purchasing the pet (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid Order -
- */ - public okhttp3.Call placeOrderAsync(Order order, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = placeOrderValidateBeforeCall(order, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/UserApi.java deleted file mode 100644 index 7b8cb5c3dcbe..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/UserApi.java +++ /dev/null @@ -1,1068 +0,0 @@ -/* - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import java.time.OffsetDateTime; -import org.openapitools.client.model.User; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UserApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UserApi() { - this(Configuration.getDefaultApiClient()); - } - - public UserApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createUser - * @param user Created user object (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public okhttp3.Call createUserCall(User user, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = user; - - // create path and map variables - String localVarPath = "/user"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createUserValidateBeforeCall(User user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException("Missing the required parameter 'user' when calling createUser(Async)"); - } - - return createUserCall(user, _callback); - - } - - /** - * Create user - * This can only be done by the logged in user. - * @param user Created user object (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public void createUser(User user) throws ApiException { - createUserWithHttpInfo(user); - } - - /** - * Create user - * This can only be done by the logged in user. - * @param user Created user object (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public ApiResponse createUserWithHttpInfo(User user) throws ApiException { - okhttp3.Call localVarCall = createUserValidateBeforeCall(user, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Create user (asynchronously) - * This can only be done by the logged in user. - * @param user Created user object (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public okhttp3.Call createUserAsync(User user, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createUserValidateBeforeCall(user, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for createUsersWithArrayInput - * @param user List of user object (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public okhttp3.Call createUsersWithArrayInputCall(List user, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = user; - - // create path and map variables - String localVarPath = "/user/createWithArray"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException("Missing the required parameter 'user' when calling createUsersWithArrayInput(Async)"); - } - - return createUsersWithArrayInputCall(user, _callback); - - } - - /** - * Creates list of users with given input array - * - * @param user List of user object (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public void createUsersWithArrayInput(List user) throws ApiException { - createUsersWithArrayInputWithHttpInfo(user); - } - - /** - * Creates list of users with given input array - * - * @param user List of user object (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public ApiResponse createUsersWithArrayInputWithHttpInfo(List user) throws ApiException { - okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(user, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Creates list of users with given input array (asynchronously) - * - * @param user List of user object (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public okhttp3.Call createUsersWithArrayInputAsync(List user, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(user, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for createUsersWithListInput - * @param user List of user object (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public okhttp3.Call createUsersWithListInputCall(List user, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = user; - - // create path and map variables - String localVarPath = "/user/createWithList"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createUsersWithListInputValidateBeforeCall(List user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException("Missing the required parameter 'user' when calling createUsersWithListInput(Async)"); - } - - return createUsersWithListInputCall(user, _callback); - - } - - /** - * Creates list of users with given input array - * - * @param user List of user object (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public void createUsersWithListInput(List user) throws ApiException { - createUsersWithListInputWithHttpInfo(user); - } - - /** - * Creates list of users with given input array - * - * @param user List of user object (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public ApiResponse createUsersWithListInputWithHttpInfo(List user) throws ApiException { - okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(user, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Creates list of users with given input array (asynchronously) - * - * @param user List of user object (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public okhttp3.Call createUsersWithListInputAsync(List user, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(user, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteUser - * @param username The name that needs to be deleted (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
- */ - public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/{username}" - .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)"); - } - - return deleteUserCall(username, _callback); - - } - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
- */ - public void deleteUser(String username) throws ApiException { - deleteUserWithHttpInfo(username); - } - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
- */ - public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { - okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete user (asynchronously) - * This can only be done by the logged in user. - * @param username The name that needs to be deleted (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid username supplied -
404 User not found -
- */ - public okhttp3.Call deleteUserAsync(String username, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getUserByName - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
- */ - public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/{username}" - .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException("Missing the required parameter 'username' when calling getUserByName(Async)"); - } - - return getUserByNameCall(username, _callback); - - } - - /** - * Get user by user name - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
- */ - public User getUserByName(String username) throws ApiException { - ApiResponse localVarResp = getUserByNameWithHttpInfo(username); - return localVarResp.getData(); - } - - /** - * Get user by user name - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
- */ - public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { - okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get user by user name (asynchronously) - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid username supplied -
404 User not found -
- */ - public okhttp3.Call getUserByNameAsync(String username, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for loginUser - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
- */ - public okhttp3.Call loginUserCall(String username, String password, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/login"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (username != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); - } - - if (password != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("password", password)); - } - - final String[] localVarAccepts = { - "application/xml", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException("Missing the required parameter 'username' when calling loginUser(Async)"); - } - - // verify the required parameter 'password' is set - if (password == null) { - throw new ApiException("Missing the required parameter 'password' when calling loginUser(Async)"); - } - - return loginUserCall(username, password, _callback); - - } - - /** - * Logs user into the system - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @return String - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
- */ - public String loginUser(String username, String password) throws ApiException { - ApiResponse localVarResp = loginUserWithHttpInfo(username, password); - return localVarResp.getData(); - } - - /** - * Logs user into the system - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @return ApiResponse<String> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
- */ - public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { - okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Logs user into the system (asynchronously) - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
400 Invalid username/password supplied -
- */ - public okhttp3.Call loginUserAsync(String username, String password, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for logoutUser - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/logout"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call logoutUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return logoutUserCall(_callback); - - } - - /** - * Logs out current logged in user session - * - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public void logoutUser() throws ApiException { - logoutUserWithHttpInfo(); - } - - /** - * Logs out current logged in user session - * - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public ApiResponse logoutUserWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = logoutUserValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Logs out current logged in user session (asynchronously) - * - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
0 successful operation -
- */ - public okhttp3.Call logoutUserAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = logoutUserValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for updateUser - * @param username name that need to be deleted (required) - * @param user Updated user object (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
- */ - public okhttp3.Call updateUserCall(String username, User user, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = user; - - // create path and map variables - String localVarPath = "/user/{username}" - .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "api_key" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserValidateBeforeCall(String username, User user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException("Missing the required parameter 'username' when calling updateUser(Async)"); - } - - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException("Missing the required parameter 'user' when calling updateUser(Async)"); - } - - return updateUserCall(username, user, _callback); - - } - - /** - * 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) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
- */ - public void updateUser(String username, User user) throws ApiException { - updateUserWithHttpInfo(username, user); - } - - /** - * 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 ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
- */ - public ApiResponse updateUserWithHttpInfo(String username, User user) throws ApiException { - okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, user, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Updated user (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
400 Invalid user supplied -
404 User not found -
- */ - public okhttp3.Call updateUserAsync(String username, User user, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, user, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/CommonApiTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/CommonApiTest.java new file mode 100644 index 000000000000..5d0164957bc0 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/CommonApiTest.java @@ -0,0 +1,324 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import java.time.OffsetDateTime; +import org.openapitools.client.model.Order; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.User; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for CommonApi + */ +@Disabled +public class CommonApiTest { + + private final CommonApi api = new CommonApi(); + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void addPetTest() throws ApiException { + Pet pet = null; + Pet response = api.addPet(pet); + // TODO: test validations + } + + /** + * Create user + * + * This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUserTest() throws ApiException { + User user = null; + api.createUser(user); + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUsersWithArrayInputTest() throws ApiException { + List user = null; + api.createUsersWithArrayInput(user); + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createUsersWithListInputTest() throws ApiException { + List user = null; + api.createUsersWithListInput(user); + // TODO: test validations + } + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrderTest() throws ApiException { + String orderId = null; + api.deleteOrder(orderId); + // TODO: test validations + } + + /** + * Deletes a pet + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deletePetTest() throws ApiException { + Long petId = null; + String apiKey = null; + api.deletePet(petId, apiKey); + // TODO: test validations + } + + /** + * Delete user + * + * This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteUserTest() throws ApiException { + String username = null; + api.deleteUser(username); + // TODO: test validations + } + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException if the Api call fails + */ + @Test + public void findPetsByStatusTest() throws ApiException { + List status = null; + List response = api.findPetsByStatus(status); + // TODO: test validations + } + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @throws ApiException if the Api call fails + */ + @Test + public void findPetsByTagsTest() throws ApiException { + List tags = null; + List response = api.findPetsByTags(tags); + // TODO: test validations + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException if the Api call fails + */ + @Test + public void getInventoryTest() throws ApiException { + Map response = api.getInventory(); + // TODO: test validations + } + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrderByIdTest() throws ApiException { + Long orderId = null; + Order response = api.getOrderById(orderId); + // TODO: test validations + } + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPetByIdTest() throws ApiException { + Long petId = null; + Pet response = api.getPetById(petId); + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getUserByNameTest() throws ApiException { + String username = null; + User response = api.getUserByName(username); + // TODO: test validations + } + + /** + * Logs user into the system + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void loginUserTest() throws ApiException { + String username = null; + String password = null; + String response = api.loginUser(username, password); + // TODO: test validations + } + + /** + * Logs out current logged in user session + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void logoutUserTest() throws ApiException { + api.logoutUser(); + // TODO: test validations + } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void placeOrderTest() throws ApiException { + Order order = null; + Order response = api.placeOrder(order); + // TODO: test validations + } + + /** + * Update an existing pet + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void updatePetTest() throws ApiException { + Pet pet = null; + Pet response = api.updatePet(pet); + // TODO: test validations + } + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void updatePetWithFormTest() throws ApiException { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); + // TODO: test validations + } + + /** + * Updated user + * + * This can only be done by the logged in user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateUserTest() throws ApiException { + String username = null; + User user = null; + api.updateUser(username, user); + // TODO: test validations + } + + /** + * uploads an image + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void uploadFileTest() throws ApiException { + Long petId = null; + String additionalMetadata = null; + File _file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/PetApiTest.java deleted file mode 100644 index 44e74f1cf98b..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/PetApiTest.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PetApi - */ -@Disabled -public class PetApiTest { - - private final PetApi api = new PetApi(); - - /** - * Add a new pet to the store - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void addPetTest() throws ApiException { - Pet pet = null; - Pet response = api.addPet(pet); - // TODO: test validations - } - - /** - * Deletes a pet - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void deletePetTest() throws ApiException { - Long petId = null; - String apiKey = null; - api.deletePet(petId, apiKey); - // TODO: test validations - } - - /** - * Finds Pets by status - * - * Multiple status values can be provided with comma separated strings - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPetsByStatusTest() throws ApiException { - List status = null; - List response = api.findPetsByStatus(status); - // TODO: test validations - } - - /** - * Finds Pets by tags - * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPetsByTagsTest() throws ApiException { - List tags = null; - List response = api.findPetsByTags(tags); - // TODO: test validations - } - - /** - * Find pet by ID - * - * Returns a single pet - * - * @throws ApiException if the Api call fails - */ - @Test - public void getPetByIdTest() throws ApiException { - Long petId = null; - Pet response = api.getPetById(petId); - // TODO: test validations - } - - /** - * Update an existing pet - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void updatePetTest() throws ApiException { - Pet pet = null; - Pet response = api.updatePet(pet); - // TODO: test validations - } - - /** - * Updates a pet in the store with form data - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void updatePetWithFormTest() throws ApiException { - Long petId = null; - String name = null; - String status = null; - api.updatePetWithForm(petId, name, status); - // TODO: test validations - } - - /** - * uploads an image - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void uploadFileTest() throws ApiException { - Long petId = null; - String additionalMetadata = null; - File _file = null; - ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java deleted file mode 100644 index 3ca20d0b210b..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Order; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for StoreApi - */ -@Disabled -public class StoreApiTest { - - private final StoreApi api = new StoreApi(); - - /** - * Delete purchase order by ID - * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteOrderTest() throws ApiException { - String orderId = null; - api.deleteOrder(orderId); - // TODO: test validations - } - - /** - * Returns pet inventories by status - * - * Returns a map of status codes to quantities - * - * @throws ApiException if the Api call fails - */ - @Test - public void getInventoryTest() throws ApiException { - Map response = api.getInventory(); - // TODO: test validations - } - - /** - * Find purchase order by ID - * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - * - * @throws ApiException if the Api call fails - */ - @Test - public void getOrderByIdTest() throws ApiException { - Long orderId = null; - Order response = api.getOrderById(orderId); - // TODO: test validations - } - - /** - * Place an order for a pet - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void placeOrderTest() throws ApiException { - Order order = null; - Order response = api.placeOrder(order); - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/UserApiTest.java deleted file mode 100644 index a46743c4435d..000000000000 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/UserApiTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import java.time.OffsetDateTime; -import org.openapitools.client.model.User; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserApi - */ -@Disabled -public class UserApiTest { - - private final UserApi api = new UserApi(); - - /** - * Create user - * - * This can only be done by the logged in user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createUserTest() throws ApiException { - User user = null; - api.createUser(user); - // TODO: test validations - } - - /** - * Creates list of users with given input array - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void createUsersWithArrayInputTest() throws ApiException { - List user = null; - api.createUsersWithArrayInput(user); - // TODO: test validations - } - - /** - * Creates list of users with given input array - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void createUsersWithListInputTest() throws ApiException { - List user = null; - api.createUsersWithListInput(user); - // TODO: test validations - } - - /** - * Delete user - * - * This can only be done by the logged in user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteUserTest() throws ApiException { - String username = null; - api.deleteUser(username); - // TODO: test validations - } - - /** - * Get user by user name - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void getUserByNameTest() throws ApiException { - String username = null; - User response = api.getUserByName(username); - // TODO: test validations - } - - /** - * Logs user into the system - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void loginUserTest() throws ApiException { - String username = null; - String password = null; - String response = api.loginUser(username, password); - // TODO: test validations - } - - /** - * Logs out current logged in user session - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void logoutUserTest() throws ApiException { - api.logoutUser(); - // TODO: test validations - } - - /** - * Updated user - * - * This can only be done by the logged in user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateUserTest() throws ApiException { - String username = null; - User user = null; - api.updateUser(username, user); - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/CategoryTest.java index a7c58d0acbf4..377335db70bb 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Category */ diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index ed1673bdc763..097389aea149 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for ModelApiResponse */ diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/OrderTest.java index 1b27fe89a42e..a70d4f602c83 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/OrderTest.java @@ -22,10 +22,10 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Order */ diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/PetTest.java index 99c3d8911087..71d066cd0e1d 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/PetTest.java @@ -22,13 +22,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Pet */ diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/TagTest.java index 49228a52bb70..e127ab5c7c40 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/TagTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Tag */ diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/UserTest.java index 851b9cc57ac4..612602dec404 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/model/UserTest.java @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for User */ diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/ApiClient.java index 08a6cfe9ddd5..a524171d7e1a 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/ApiClient.java @@ -547,6 +547,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java index b74876964ed0..d3c3e6d35035 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -621,6 +621,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index b519a0146ac9..fdc3adcd48e7 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -118,7 +118,6 @@ public void setMapString(Map mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -154,7 +153,6 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -189,7 +187,6 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -224,7 +221,6 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -260,7 +256,6 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -296,7 +291,6 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -332,7 +326,6 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -368,7 +361,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -395,7 +387,6 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -422,7 +413,6 @@ public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java index 035d74afdfff..8f8863b17ba8 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java @@ -53,7 +53,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -85,7 +85,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java index 237666020726..809b64446d33 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -86,7 +86,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -122,7 +121,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java index 4c33382e34f0..346176cfaf01 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -86,7 +86,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -113,7 +112,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -140,7 +138,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -167,7 +164,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -194,7 +190,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java index fb992667a2dc..24116d618ece 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java @@ -48,7 +48,7 @@ public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; + protected Boolean declawed; public Cat() { diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java index 867f7915d696..a895c05cd750 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java @@ -70,7 +70,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java index 8fa284cd1c5f..50442e66da83 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -143,7 +143,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java index ed7c3fb16e9b..2450492ebd71 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -228,7 +228,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -256,7 +255,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -283,7 +281,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -310,7 +307,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index d6df3224e06b..245db7dc9809 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -75,7 +75,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java index 6369b260b83e..eab9d14bd75d 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -126,7 +126,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -155,7 +154,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -182,7 +180,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -213,7 +210,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -242,7 +238,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -271,7 +266,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest string(String string) { this.string = string; @@ -298,7 +292,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -326,7 +319,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -354,7 +346,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -383,7 +374,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -411,7 +401,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -439,7 +428,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -467,7 +455,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 31904533e88e..97662ee9d934 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -44,7 +44,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -70,7 +72,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java index c14fe47167bc..e57814e938e1 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java @@ -124,7 +124,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -159,7 +158,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -194,7 +192,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index cf96758ef811..19aa493aaa9d 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -80,7 +80,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -108,7 +107,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java index f854b18b3588..aa528752d895 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -71,7 +71,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 9175c85bd8a3..ff3c8c5717c1 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -75,7 +75,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -102,7 +101,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java index eebd3e8de2f3..57049bd0fab1 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java @@ -51,7 +51,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -89,7 +91,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -105,7 +106,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -132,7 +132,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java index a153fe964677..552a1e867f2d 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java @@ -124,7 +124,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -151,7 +150,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -178,7 +176,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -206,7 +203,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -233,7 +229,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java index dfe69ed2411d..181da793433a 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -76,7 +76,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -103,7 +102,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java index 3a1d97800ff1..002ec9c2279e 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java @@ -131,7 +131,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -159,7 +158,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -187,7 +185,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -224,7 +221,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { this.tags = tags; @@ -260,7 +256,6 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 665378879668..e22ff92abd11 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -43,7 +43,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -67,7 +69,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java index 87f6f8acfa57..d845028780f6 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java @@ -70,7 +70,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 2477c55bfdfb..e645718b940c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -87,7 +87,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -116,7 +115,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -144,7 +142,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -172,7 +169,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 9aa8f3adeb5e..6433f9593038 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -91,7 +91,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -120,7 +119,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -148,7 +146,6 @@ public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } - public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -176,7 +173,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -204,7 +200,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java index d5f7a8c0ba01..2dff66593b01 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java @@ -94,7 +94,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -121,7 +120,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -148,7 +146,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -175,7 +172,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -202,7 +198,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -229,7 +224,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -256,7 +250,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java index d83ecbd8b353..6fd218b2d9e5 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java @@ -182,7 +182,6 @@ public void setAttributeString(String attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -210,7 +209,6 @@ public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -237,7 +235,6 @@ public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -264,7 +261,6 @@ public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -299,7 +295,6 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -326,7 +321,6 @@ public void setNameString(String nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -354,7 +348,6 @@ public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -381,7 +374,6 @@ public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -408,7 +400,6 @@ public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -443,7 +434,6 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -478,7 +468,6 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -505,7 +494,6 @@ public void setPrefixString(String prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -533,7 +521,6 @@ public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -560,7 +547,6 @@ public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -587,7 +573,6 @@ public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -622,7 +607,6 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -657,7 +641,6 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -684,7 +667,6 @@ public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -712,7 +694,6 @@ public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -739,7 +720,6 @@ public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -766,7 +746,6 @@ public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -801,7 +780,6 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -836,7 +814,6 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -863,7 +840,6 @@ public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -891,7 +867,6 @@ public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -918,7 +893,6 @@ public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -945,7 +919,6 @@ public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -980,7 +953,6 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 2f264ca4cf3b..df098806daf5 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -111,7 +111,6 @@ public void setMapString(Map mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -143,7 +142,6 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -174,7 +172,6 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -205,7 +202,6 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -237,7 +233,6 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -269,7 +264,6 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -301,7 +295,6 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -333,7 +326,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -356,7 +348,6 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -379,7 +370,6 @@ public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java index 5b25bda0d8f1..cd63698c0c2e 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java @@ -36,7 +36,7 @@ public class Animal { public static final String SERIALIZED_NAME_COLOR = "color"; @SerializedName(SERIALIZED_NAME_COLOR) - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -64,7 +64,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java index e9c4e65fd9e1..0559e167a241 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -79,7 +79,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -111,7 +110,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java index 4bdb8eb3654e..72cf6f5613eb 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java @@ -79,7 +79,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -102,7 +101,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -125,7 +123,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -148,7 +145,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -171,7 +167,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java index 3e2c929eef7f..c2ac2103d6da 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java @@ -33,7 +33,7 @@ public class Cat extends Animal { public static final String SERIALIZED_NAME_DECLAWED = "declawed"; @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; + protected Boolean declawed; public Cat() { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java index 6781fff432d8..2da36ac7fb53 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java @@ -63,7 +63,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java index 8d3e0088fe2d..d295b99230ff 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -160,7 +160,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java index 2b86ee86490e..9cdcc4fd6c60 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java @@ -268,7 +268,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -292,7 +291,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -315,7 +313,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -338,7 +335,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 5eb3ab845b10..967039fa02b0 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -68,7 +68,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java index c6696e018480..1c8adc3e5d14 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java @@ -118,7 +118,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -143,7 +142,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -166,7 +164,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -193,7 +190,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -218,7 +214,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -243,7 +238,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest string(String string) { this.string = string; @@ -266,7 +260,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -290,7 +283,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -314,7 +306,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -339,7 +330,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -363,7 +353,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -387,7 +376,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -411,7 +399,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 816cdf836850..5483e834688c 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -40,7 +40,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ public HasOnlyReadOnly( String bar, @@ -64,7 +66,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java index 014f5519a7d2..f2eef0372dac 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java @@ -129,7 +129,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -160,7 +159,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -191,7 +189,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 1c1fa52399c7..cf74f92b1651 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -73,7 +73,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -97,7 +96,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java index dbf14b6efd7c..ee77680a5e9a 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java @@ -63,7 +63,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 23741aa56c34..be4af903e67f 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -67,7 +67,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -90,7 +89,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java index fee25b4d2387..95041e4fed1d 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java @@ -48,7 +48,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ public Name( Integer snakeCase, @@ -82,7 +84,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -96,7 +97,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -119,7 +119,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java index 8e8f16f1a961..4e83694628c0 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java @@ -129,7 +129,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -152,7 +151,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -175,7 +173,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -199,7 +196,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -222,7 +218,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java index 5224e356af66..6e996df731ed 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -69,7 +69,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -92,7 +91,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java index 63c242266c23..719ef71b57a5 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java @@ -135,7 +135,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -159,7 +158,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -183,7 +181,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -215,7 +212,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { this.tags = tags; @@ -247,7 +243,6 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index cb60621cd736..979ea01f0048 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -40,7 +40,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ public ReadOnlyFirst( String bar @@ -62,7 +64,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java index adb182afc565..278fb473ebb6 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java @@ -63,7 +63,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 8612ffe4a603..cb82fbfcbb75 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -80,7 +80,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -105,7 +104,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -129,7 +127,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -153,7 +150,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderExample.java index a1a29e15df95..dacf39c9a438 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -84,7 +84,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -109,7 +108,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -133,7 +131,6 @@ public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } - public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -157,7 +154,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -181,7 +177,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java index 73aac7c63899..1df2c8916c2a 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java @@ -87,7 +87,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -110,7 +109,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -133,7 +131,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -156,7 +153,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -179,7 +175,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -202,7 +197,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -225,7 +219,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/XmlItem.java index 14e5bd20c8af..3838396b3cc7 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/XmlItem.java @@ -175,7 +175,6 @@ public void setAttributeString(String attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -199,7 +198,6 @@ public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -222,7 +220,6 @@ public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -245,7 +242,6 @@ public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -276,7 +272,6 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -299,7 +294,6 @@ public void setNameString(String nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -323,7 +317,6 @@ public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -346,7 +339,6 @@ public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -369,7 +361,6 @@ public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -400,7 +391,6 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -431,7 +421,6 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -454,7 +443,6 @@ public void setPrefixString(String prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -478,7 +466,6 @@ public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -501,7 +488,6 @@ public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -524,7 +510,6 @@ public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -555,7 +540,6 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -586,7 +570,6 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -609,7 +592,6 @@ public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -633,7 +615,6 @@ public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -656,7 +637,6 @@ public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -679,7 +659,6 @@ public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -710,7 +689,6 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -741,7 +719,6 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -764,7 +741,6 @@ public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -788,7 +764,6 @@ public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -811,7 +786,6 @@ public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -834,7 +808,6 @@ public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -865,7 +838,6 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0ef961db5bf1..3120bfe33367 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -76,7 +76,6 @@ public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 220c2ba3b1a1..8417192b7e2d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -67,7 +67,6 @@ public void setUsername(String username) { this.username = username; } - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { this.singleRefType = singleRefType; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java index 686d838b0cb9..b6a44a024b77 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java @@ -49,7 +49,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -79,7 +79,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java index 8e539861d237..5354cab3943b 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -82,7 +82,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -116,7 +115,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java index eace91d32b31..676127450797 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java @@ -82,7 +82,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -108,7 +107,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -134,7 +132,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -160,7 +157,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -186,7 +182,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java index 6276f76cbd37..f3c09fefafaa 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java index 905d8f49f490..e7654785df11 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -139,7 +139,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java index 716d2bca80f8..25f20bd693a0 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java @@ -243,7 +243,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -269,7 +268,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -295,7 +293,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -321,7 +318,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); @@ -355,7 +351,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; @@ -381,7 +376,6 @@ public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; @@ -407,7 +401,6 @@ public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue this.outerEnumDefaultValue = outerEnumDefaultValue; } - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 568b3785cfb5..02d4afd18ff1 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -70,7 +70,6 @@ public void setSomeId(BigDecimal someId) { this.someId = someId; } - public FakeBigDecimalMap200Response someMap(Map someMap) { this.someMap = someMap; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index ddff4505b584..141dc551badc 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -70,7 +70,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java index 8e813ac8d389..9e7ef21e437d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java @@ -130,7 +130,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -158,7 +157,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -184,7 +182,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -212,7 +209,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -240,7 +236,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -268,7 +263,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest decimal(BigDecimal decimal) { this.decimal = decimal; @@ -294,7 +288,6 @@ public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } - public FormatTest string(String string) { this.string = string; @@ -320,7 +313,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -346,7 +338,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -372,7 +363,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -398,7 +388,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -424,7 +413,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -450,7 +438,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -476,7 +463,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest patternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; @@ -502,7 +488,6 @@ public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index c0d039bc95f1..df9817e994bf 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -41,7 +41,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -66,7 +68,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java index 6b740281b9bf..5da2e18def94 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java @@ -119,7 +119,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -153,7 +152,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -187,7 +185,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index a950a03dbe41..aabbecd4bbb4 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -75,7 +75,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -101,7 +100,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java index d03369c5dff5..ed6d620c7aa4 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java @@ -67,7 +67,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 9f704484bfd2..a50edcc17615 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -71,7 +71,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -97,7 +96,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java index c496a00abb89..8b7d774a9f09 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java @@ -48,7 +48,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -84,7 +86,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -99,7 +100,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -125,7 +125,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NullableClass.java index 58c4c2d1bdc6..56e0bd75d39b 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NullableClass.java @@ -127,7 +127,6 @@ public void setIntegerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); } - public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); @@ -161,7 +160,6 @@ public void setNumberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); } - public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); @@ -195,7 +193,6 @@ public void setBooleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); } - public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); @@ -229,7 +226,6 @@ public void setStringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); } - public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); @@ -263,7 +259,6 @@ public void setDateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); } - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); @@ -297,7 +292,6 @@ public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); } - public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); @@ -343,7 +337,6 @@ public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); @@ -389,7 +382,6 @@ public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; @@ -423,7 +415,6 @@ public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } - public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); @@ -469,7 +460,6 @@ public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); @@ -515,7 +505,6 @@ public void setObjectAndItemsNullableProp(Map objectAndItemsNull this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 6699a31ae158..cfcf8a77e1de 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -79,7 +79,6 @@ public void setUuid(String uuid) { this.uuid = uuid; } - public ObjectWithDeprecatedFields id(BigDecimal id) { this.id = id; @@ -107,7 +106,6 @@ public void setId(BigDecimal id) { this.id = id; } - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -135,7 +133,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java index 39763d34d3a8..460999a479a4 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java @@ -120,7 +120,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -146,7 +145,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -172,7 +170,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -198,7 +195,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -224,7 +220,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java index 71a7e405ad91..9a4a6ca10d07 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -71,7 +71,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -97,7 +96,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 75ce8d2d540d..616e2c1b5374 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -85,7 +85,7 @@ public static TypeEnum fromValue(String value) { protected TypeEnum type; public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; - private JsonNullable nullableProperty = JsonNullable.undefined(); + protected JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { } @@ -115,7 +115,6 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { this.nullableProperty = JsonNullable.of(nullableProperty); diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java index aa4b9b43ff58..ae2f5a64fbd6 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java @@ -127,7 +127,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -179,7 +177,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -214,7 +211,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -248,7 +244,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index cd1a62e24e0e..630a96f5f512 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -40,7 +40,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -63,7 +65,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java index 85abf11df318..9145e5deea22 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java index c412c56bcc2d..0523f7495459 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java @@ -90,7 +90,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -116,7 +115,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -142,7 +140,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -168,7 +165,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -194,7 +190,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -220,7 +215,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -246,7 +240,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Category.java index ad1df1abc879..efa7b011c278 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Category.java @@ -41,6 +41,14 @@ public class Category { public Category() { } + /** + * Constructor with all args parameters + */ + public Category(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_NAME) String name) { + this.id = id; + this.name = name; + } + public Category id(Long id) { this.id = id; @@ -66,7 +74,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 015402c41622..0640e0255128 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -46,6 +46,15 @@ public class ModelApiResponse { public ModelApiResponse() { } + /** + * Constructor with all args parameters + */ + public ModelApiResponse(@JsonProperty(JSON_PROPERTY_CODE) Integer code, @JsonProperty(JSON_PROPERTY_TYPE) String type, @JsonProperty(JSON_PROPERTY_MESSAGE) String message) { + this.code = code; + this.type = type; + this.message = message; + } + public ModelApiResponse code(Integer code) { this.code = code; @@ -71,7 +80,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -97,7 +105,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Order.java index 343f0c864fc1..e725b2c6ac1e 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Order.java @@ -95,6 +95,18 @@ public static StatusEnum fromValue(String value) { public Order() { } + /** + * Constructor with all args parameters + */ + public Order(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_PET_ID) Long petId, @JsonProperty(JSON_PROPERTY_QUANTITY) Integer quantity, @JsonProperty(JSON_PROPERTY_SHIP_DATE) OffsetDateTime shipDate, @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status, @JsonProperty(JSON_PROPERTY_COMPLETE) Boolean complete) { + this.id = id; + this.petId = petId; + this.quantity = quantity; + this.shipDate = shipDate; + this.status = status; + this.complete = complete; + } + public Order id(Long id) { this.id = id; @@ -120,7 +132,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -146,7 +157,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -172,7 +182,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -198,7 +207,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -224,7 +232,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Pet.java index 7d73cad29f6e..ec671fefa660 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Pet.java @@ -99,6 +99,18 @@ public static StatusEnum fromValue(String value) { public Pet() { } + /** + * Constructor with all args parameters + */ + public Pet(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_CATEGORY) Category category, @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_PHOTO_URLS) List photoUrls, @JsonProperty(JSON_PROPERTY_TAGS) List tags, @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status) { + this.id = id; + this.category = category; + this.name = name; + this.photoUrls = photoUrls; + this.tags = tags; + this.status = status; + } + public Pet id(Long id) { this.id = id; @@ -124,7 +136,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -150,7 +161,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -176,7 +186,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; @@ -210,7 +219,6 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -244,7 +252,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Tag.java index d6ae9daae263..26a56d0774fb 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/Tag.java @@ -41,6 +41,14 @@ public class Tag { public Tag() { } + /** + * Constructor with all args parameters + */ + public Tag(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_NAME) String name) { + this.id = id; + this.name = name; + } + public Tag id(Long id) { this.id = id; @@ -66,7 +74,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/User.java index 6aa3a5bea179..4f40a0b82d36 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/model/User.java @@ -65,6 +65,20 @@ public class User { public User() { } + /** + * Constructor with all args parameters + */ + public User(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_USERNAME) String username, @JsonProperty(JSON_PROPERTY_FIRST_NAME) String firstName, @JsonProperty(JSON_PROPERTY_LAST_NAME) String lastName, @JsonProperty(JSON_PROPERTY_EMAIL) String email, @JsonProperty(JSON_PROPERTY_PASSWORD) String password, @JsonProperty(JSON_PROPERTY_PHONE) String phone, @JsonProperty(JSON_PROPERTY_USER_STATUS) Integer userStatus) { + this.id = id; + this.username = username; + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + this.password = password; + this.phone = phone; + this.userStatus = userStatus; + } + public User id(Long id) { this.id = id; @@ -90,7 +104,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -116,7 +129,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -142,7 +154,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -168,7 +179,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -194,7 +204,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -220,7 +229,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -246,7 +254,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Category.java index 2ded9a220362..fc9c77a3905e 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Category.java @@ -70,7 +70,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 524e18884964..e089d0e1fe93 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -75,7 +75,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -102,7 +101,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Order.java index 8c7ddddc15f6..6a986092f3dd 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Order.java @@ -124,7 +124,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -151,7 +150,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -178,7 +176,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -205,7 +202,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -232,7 +228,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Pet.java index 173a736a7707..067c2ac28521 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Pet.java @@ -128,7 +128,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -155,7 +154,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -182,7 +180,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; @@ -217,7 +214,6 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -252,7 +248,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Tag.java index 30c6b9536cdf..5191cfd053f8 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/Tag.java @@ -70,7 +70,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/User.java index 95b3d96ee28e..d3ad968d8bd1 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/model/User.java @@ -94,7 +94,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -121,7 +120,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -148,7 +146,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -175,7 +172,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -202,7 +198,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -229,7 +224,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -256,7 +250,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Category.java index c3194929185b..bfd58b5729f2 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Category.java @@ -69,7 +69,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 96ed556b7dde..6b580705beeb 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -74,7 +74,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -101,7 +100,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Order.java index d83b2087f9f0..eab9396b4fd6 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Order.java @@ -123,7 +123,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -150,7 +149,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -177,7 +175,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -204,7 +201,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -231,7 +227,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Pet.java index 5b8ed31ec21d..939fa3998f14 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Pet.java @@ -127,7 +127,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -154,7 +153,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -181,7 +179,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; @@ -216,7 +213,6 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -251,7 +247,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Tag.java index 13b7b4ee882c..c273473bd9b9 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/Tag.java @@ -69,7 +69,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/User.java index 6b7cf72ca06d..0c54bc473bcb 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/model/User.java @@ -93,7 +93,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -120,7 +119,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -147,7 +145,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -174,7 +171,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -201,7 +197,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -228,7 +223,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -255,7 +249,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 5ad7b80b392c..8c98cc00eebc 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -95,7 +95,6 @@ public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index a55d5e49ffa1..c1c052653547 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -78,7 +78,6 @@ public void setUsername(String username) { this.username = username; } - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { this.singleRefType = singleRefType; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java index dd81cec9da88..ba8e6f52a131 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java @@ -58,7 +58,7 @@ public class Animal { public static final String JSON_PROPERTY_COLOR = "color"; @XmlElement(name = "color") - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -90,7 +90,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java index b1e17c7e2d12..1a941f2e4fb0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -105,7 +105,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -143,7 +142,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java index 585c8212fecd..0ea99e7f62d7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java @@ -97,7 +97,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -125,7 +124,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -153,7 +151,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -181,7 +178,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -209,7 +205,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java index 38a82b6cd35c..5173a9244a71 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java @@ -77,7 +77,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java index 9e9aeb0afccd..6e4a6166d0cf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -161,7 +161,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java index fdef6785c237..5f7045b11246 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java @@ -278,7 +278,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -306,7 +305,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -334,7 +332,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -362,7 +359,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); @@ -397,7 +393,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; @@ -425,7 +420,6 @@ public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; @@ -453,7 +447,6 @@ public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue this.outerEnumDefaultValue = outerEnumDefaultValue; } - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 3f8ae17edcfb..ab7cbbf5efca 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -84,7 +84,6 @@ public void setSomeId(BigDecimal someId) { this.someId = someId; } - public FakeBigDecimalMap200Response someMap(Map someMap) { this.someMap = someMap; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index a0a6be321d60..19422e885759 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -84,7 +84,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java index e219d371adcf..70f60567e7b0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java @@ -156,7 +156,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -186,7 +185,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -214,7 +212,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -244,7 +241,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -274,7 +270,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -304,7 +299,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest decimal(BigDecimal decimal) { this.decimal = decimal; @@ -332,7 +326,6 @@ public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } - public FormatTest string(String string) { this.string = string; @@ -360,7 +353,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -388,7 +380,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -416,7 +407,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -444,7 +434,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -472,7 +461,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -500,7 +488,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -528,7 +515,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest patternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; @@ -556,7 +542,6 @@ public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index d2ed2632c59d..18055512466d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -66,7 +66,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java index 11e6fcee88dc..521fa7238c03 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java @@ -150,7 +150,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -188,7 +187,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -226,7 +224,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 1cfc778e5009..873b6c01ce6b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -91,7 +91,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -119,7 +118,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java index 44c683a1caf1..a4d8a90ff839 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java @@ -78,7 +78,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java index c92c219570ad..31ca28704e62 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -83,7 +83,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -111,7 +110,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java index 6d1dbb433791..21401788a231 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java @@ -87,7 +87,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -103,7 +102,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -131,7 +129,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NullableClass.java index a755b1072d55..0dd48b890a55 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NullableClass.java @@ -166,7 +166,6 @@ public void setIntegerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); } - public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); @@ -201,7 +200,6 @@ public void setNumberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); } - public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); @@ -236,7 +234,6 @@ public void setBooleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); } - public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); @@ -271,7 +268,6 @@ public void setStringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); } - public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); @@ -306,7 +302,6 @@ public void setDateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); } - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); @@ -341,7 +336,6 @@ public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); } - public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); @@ -389,7 +383,6 @@ public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); @@ -437,7 +430,6 @@ public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; @@ -475,7 +467,6 @@ public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } - public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); @@ -523,7 +514,6 @@ public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); @@ -571,7 +561,6 @@ public void setObjectAndItemsNullableProp(Map objectAndItemsNull this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index c3fa7fd7f3d4..135e7c900e60 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -95,7 +95,6 @@ public void setUuid(String uuid) { this.uuid = uuid; } - public ObjectWithDeprecatedFields id(BigDecimal id) { this.id = id; @@ -125,7 +124,6 @@ public void setId(BigDecimal id) { this.id = id; } - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -155,7 +153,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java index 3724fc7f5444..672127b83271 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java @@ -141,7 +141,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -169,7 +168,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -197,7 +195,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -225,7 +222,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -253,7 +249,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java index 91de7c0dcdbc..ae827294aad9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -83,7 +83,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -111,7 +110,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 89d6f1e13cf3..9a7b2926dd83 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -97,7 +97,7 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; @XmlElement(name = "nullableProperty") - private JsonNullable nullableProperty = JsonNullable.undefined(); + protected JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { } @@ -129,7 +129,6 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { this.nullableProperty = JsonNullable.of(nullableProperty); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java index 220fc766c32e..dc9e2844f1e1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java @@ -155,7 +155,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -183,7 +182,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -211,7 +209,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -252,7 +249,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -292,7 +288,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index d660b1255e9f..1c6e45bc57e4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -65,7 +65,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java index 389595a2d001..24768b1c4dbf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java @@ -77,7 +77,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java index 80de90628a4f..0f972cee4165 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java @@ -107,7 +107,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -135,7 +134,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -163,7 +161,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -191,7 +188,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -219,7 +215,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -247,7 +242,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -275,7 +269,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 133a5113101a..bce9c54e9291 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -43,6 +43,14 @@ public class AdditionalPropertiesClass { public AdditionalPropertiesClass() { } + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesClass(@JsonProperty(JSON_PROPERTY_MAP_PROPERTY) Map mapProperty, @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) Map> mapOfMapProperty) { + this.mapProperty = mapProperty; + this.mapOfMapProperty = mapOfMapProperty; + } + public AdditionalPropertiesClass mapProperty(Map mapProperty) { this.mapProperty = mapProperty; @@ -76,7 +84,6 @@ public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 220c2ba3b1a1..0c49102a7350 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -42,6 +42,14 @@ public class AllOfWithSingleRef { public AllOfWithSingleRef() { } + /** + * Constructor with all args parameters + */ + public AllOfWithSingleRef(@JsonProperty(JSON_PROPERTY_USERNAME) String username, @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) SingleRefType singleRefType) { + this.username = username; + this.singleRefType = singleRefType; + } + public AllOfWithSingleRef username(String username) { this.username = username; @@ -67,7 +75,6 @@ public void setUsername(String username) { this.username = username; } - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { this.singleRefType = singleRefType; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java index 686d838b0cb9..369ad19fc1f2 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java @@ -49,11 +49,19 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } + /** + * Constructor with all args parameters + */ + public Animal(@JsonProperty(JSON_PROPERTY_CLASS_NAME) String className, @JsonProperty(JSON_PROPERTY_COLOR) String color) { + this.className = className; + this.color = color; + } + public Animal className(String className) { this.className = className; @@ -79,7 +87,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index fe288f05fd34..3ecaf35030cd 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -41,6 +41,13 @@ public class ArrayOfArrayOfNumberOnly { public ArrayOfArrayOfNumberOnly() { } + /** + * Constructor with all args parameters + */ + public ArrayOfArrayOfNumberOnly(@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 93563735c8eb..7ed1db61ce53 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -41,6 +41,13 @@ public class ArrayOfNumberOnly { public ArrayOfNumberOnly() { } + /** + * Constructor with all args parameters + */ + public ArrayOfNumberOnly(@JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) List arrayNumber) { + this.arrayNumber = arrayNumber; + } + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java index 085f248e13ca..bded23738508 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -49,6 +49,15 @@ public class ArrayTest { public ArrayTest() { } + /** + * Constructor with all args parameters + */ + public ArrayTest(@JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) List arrayOfString, @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) List> arrayArrayOfInteger, @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) List> arrayArrayOfModel) { + this.arrayOfString = arrayOfString; + this.arrayArrayOfInteger = arrayArrayOfInteger; + this.arrayArrayOfModel = arrayArrayOfModel; + } + public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -82,7 +91,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -116,7 +124,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java index eace91d32b31..c763841045ea 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java @@ -57,6 +57,18 @@ public class Capitalization { public Capitalization() { } + /** + * Constructor with all args parameters + */ + public Capitalization(@JsonProperty(JSON_PROPERTY_SMALL_CAMEL) String smallCamel, @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) String capitalCamel, @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) String smallSnake, @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) String capitalSnake, @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) String scAETHFlowPoints, @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) String ATT_NAME) { + this.smallCamel = smallCamel; + this.capitalCamel = capitalCamel; + this.smallSnake = smallSnake; + this.capitalSnake = capitalSnake; + this.scAETHFlowPoints = scAETHFlowPoints; + this.ATT_NAME = ATT_NAME; + } + public Capitalization smallCamel(String smallCamel) { this.smallCamel = smallCamel; @@ -82,7 +94,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -108,7 +119,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -134,7 +144,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -160,7 +169,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -186,7 +194,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java index 0cca7513a8cb..889d19d199e8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java @@ -48,6 +48,14 @@ public Cat() { } + /** + * Constructor with all args parameters + */ + public Cat(@JsonProperty(JSON_PROPERTY_DECLAWED) Boolean declawed, @JsonProperty(JSON_PROPERTY_CLASS_NAME) String className, @JsonProperty(JSON_PROPERTY_COLOR) String color) { + super(className, color); + this.declawed = declawed; + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java index 6276f76cbd37..0e400d8421cb 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java @@ -41,6 +41,14 @@ public class Category { public Category() { } + /** + * Constructor with all args parameters + */ + public Category(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_NAME) String name) { + this.id = id; + this.name = name; + } + public Category id(Long id) { this.id = id; @@ -66,7 +74,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java index b61a44c24ebe..7b2538ad0cab 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -49,6 +49,14 @@ public ChildWithNullable() { } + /** + * Constructor with all args parameters + */ + public ChildWithNullable(@JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) String otherProperty, @JsonProperty(JSON_PROPERTY_TYPE) TypeEnum type, @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) String nullableProperty) { + super(type, nullableProperty); + this.otherProperty = otherProperty; + } + public ChildWithNullable otherProperty(String otherProperty) { this.otherProperty = otherProperty; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java index 1f7c81dc0eca..0bc68650ea7a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java @@ -37,6 +37,13 @@ public class ClassModel { public ClassModel() { } + /** + * Constructor with all args parameters + */ + public ClassModel(@JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) String propertyClass) { + this.propertyClass = propertyClass; + } + public ClassModel propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java index a7502526be42..77226a81217e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java @@ -37,6 +37,13 @@ public class Client { public Client() { } + /** + * Constructor with all args parameters + */ + public Client(@JsonProperty(JSON_PROPERTY_CLIENT) String client) { + this.client = client; + } + public Client client(String client) { this.client = client; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java index cbdd22b42b8f..6e6c6c19b863 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -39,6 +39,13 @@ public class DeprecatedObject { public DeprecatedObject() { } + /** + * Constructor with all args parameters + */ + public DeprecatedObject(@JsonProperty(JSON_PROPERTY_NAME) String name) { + this.name = name; + } + public DeprecatedObject name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java index 89b62c14028c..cf45881c1155 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java @@ -48,6 +48,14 @@ public Dog() { } + /** + * Constructor with all args parameters + */ + public Dog(@JsonProperty(JSON_PROPERTY_BREED) String breed, @JsonProperty(JSON_PROPERTY_CLASS_NAME) String className, @JsonProperty(JSON_PROPERTY_COLOR) String color) { + super(className, color); + this.breed = breed; + } + public Dog breed(String breed) { this.breed = breed; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java index f709cd80b8e1..aa6addf5c957 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -114,6 +114,14 @@ public static ArrayEnumEnum fromValue(String value) { public EnumArrays() { } + /** + * Constructor with all args parameters + */ + public EnumArrays(@JsonProperty(JSON_PROPERTY_JUST_SYMBOL) JustSymbolEnum justSymbol, @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) List arrayEnum) { + this.justSymbol = justSymbol; + this.arrayEnum = arrayEnum; + } + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -139,7 +147,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java index 716d2bca80f8..675b4881067e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java @@ -218,6 +218,20 @@ public static EnumNumberEnum fromValue(Double value) { public EnumTest() { } + /** + * Constructor with all args parameters + */ + public EnumTest(@JsonProperty(JSON_PROPERTY_ENUM_STRING) EnumStringEnum enumString, @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) EnumStringRequiredEnum enumStringRequired, @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) EnumIntegerEnum enumInteger, @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) EnumNumberEnum enumNumber, @JsonProperty(JSON_PROPERTY_OUTER_ENUM) OuterEnum outerEnum, @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) OuterEnumInteger outerEnumInteger, @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) OuterEnumDefaultValue outerEnumDefaultValue, @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.enumString = enumString; + this.enumStringRequired = enumStringRequired; + this.enumInteger = enumInteger; + this.enumNumber = enumNumber; + this.outerEnum = outerEnum == null ? JsonNullable.undefined() : JsonNullable.of(outerEnum); + this.outerEnumInteger = outerEnumInteger; + this.outerEnumDefaultValue = outerEnumDefaultValue; + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; @@ -243,7 +257,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -269,7 +282,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -295,7 +307,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -321,7 +332,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); @@ -355,7 +365,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; @@ -381,7 +390,6 @@ public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; @@ -407,7 +415,6 @@ public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue this.outerEnumDefaultValue = outerEnumDefaultValue; } - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index a254b62d8726..54a3529e2167 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -45,6 +45,14 @@ public class FakeBigDecimalMap200Response { public FakeBigDecimalMap200Response() { } + /** + * Constructor with all args parameters + */ + public FakeBigDecimalMap200Response(@JsonProperty(JSON_PROPERTY_SOME_ID) BigDecimal someId, @JsonProperty(JSON_PROPERTY_SOME_MAP) Map someMap) { + this.someId = someId; + this.someMap = someMap; + } + public FakeBigDecimalMap200Response someId(BigDecimal someId) { this.someId = someId; @@ -70,7 +78,6 @@ public void setSomeId(BigDecimal someId) { this.someId = someId; } - public FakeBigDecimalMap200Response someMap(Map someMap) { this.someMap = someMap; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 94b9aa8c47b0..da4367dfea41 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -45,6 +45,14 @@ public class FileSchemaTestClass { public FileSchemaTestClass() { } + /** + * Constructor with all args parameters + */ + public FileSchemaTestClass(@JsonProperty(JSON_PROPERTY_FILE) ModelFile _file, @JsonProperty(JSON_PROPERTY_FILES) List files) { + this._file = _file; + this.files = files; + } + public FileSchemaTestClass _file(ModelFile _file) { this._file = _file; @@ -70,7 +78,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java index 6b035e64fd22..b231ffccd6ff 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java @@ -37,6 +37,13 @@ public class Foo { public Foo() { } + /** + * Constructor with all args parameters + */ + public Foo(@JsonProperty(JSON_PROPERTY_BAR) String bar) { + this.bar = bar; + } + public Foo bar(String bar) { this.bar = bar; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index 1b9acee81ccb..4c7df387fb27 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -39,6 +39,13 @@ public class FooGetDefaultResponse { public FooGetDefaultResponse() { } + /** + * Constructor with all args parameters + */ + public FooGetDefaultResponse(@JsonProperty(JSON_PROPERTY_STRING) Foo string) { + this.string = string; + } + public FooGetDefaultResponse string(Foo string) { this.string = string; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java index 8e813ac8d389..296a6b11ee34 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java @@ -103,6 +103,28 @@ public class FormatTest { public FormatTest() { } + /** + * Constructor with all args parameters + */ + public FormatTest(@JsonProperty(JSON_PROPERTY_INTEGER) Integer integer, @JsonProperty(JSON_PROPERTY_INT32) Integer int32, @JsonProperty(JSON_PROPERTY_INT64) Long int64, @JsonProperty(JSON_PROPERTY_NUMBER) BigDecimal number, @JsonProperty(JSON_PROPERTY_FLOAT) Float _float, @JsonProperty(JSON_PROPERTY_DOUBLE) Double _double, @JsonProperty(JSON_PROPERTY_DECIMAL) BigDecimal decimal, @JsonProperty(JSON_PROPERTY_STRING) String string, @JsonProperty(JSON_PROPERTY_BYTE) byte[] _byte, @JsonProperty(JSON_PROPERTY_BINARY) File binary, @JsonProperty(JSON_PROPERTY_DATE) LocalDate date, @JsonProperty(JSON_PROPERTY_DATE_TIME) OffsetDateTime dateTime, @JsonProperty(JSON_PROPERTY_UUID) UUID uuid, @JsonProperty(JSON_PROPERTY_PASSWORD) String password, @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) String patternWithDigits, @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) String patternWithDigitsAndDelimiter) { + this.integer = integer; + this.int32 = int32; + this.int64 = int64; + this.number = number; + this._float = _float; + this._double = _double; + this.decimal = decimal; + this.string = string; + this._byte = _byte; + this.binary = binary; + this.date = date; + this.dateTime = dateTime; + this.uuid = uuid; + this.password = password; + this.patternWithDigits = patternWithDigits; + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + } + public FormatTest integer(Integer integer) { this.integer = integer; @@ -130,7 +152,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -158,7 +179,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -184,7 +204,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -212,7 +231,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -240,7 +258,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -268,7 +285,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest decimal(BigDecimal decimal) { this.decimal = decimal; @@ -294,7 +310,6 @@ public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } - public FormatTest string(String string) { this.string = string; @@ -320,7 +335,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -346,7 +360,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -372,7 +385,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -398,7 +410,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -424,7 +435,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -450,7 +460,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -476,7 +485,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest patternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; @@ -502,7 +510,6 @@ public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index c0d039bc95f1..2ebbde7cfe19 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -41,7 +41,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters and all parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -66,7 +68,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 61d32c18d10c..b5d8e09d015c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -41,6 +41,13 @@ public class HealthCheckResult { public HealthCheckResult() { } + /** + * Constructor with all args parameters + */ + public HealthCheckResult(@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) String nullableMessage) { + this.nullableMessage = nullableMessage == null ? JsonNullable.undefined() : JsonNullable.of(nullableMessage); + } + public HealthCheckResult nullableMessage(String nullableMessage) { this.nullableMessage = JsonNullable.of(nullableMessage); diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java index ee19e5300f0a..211bc8412c6f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java @@ -86,6 +86,16 @@ public static InnerEnum fromValue(String value) { public MapTest() { } + /** + * Constructor with all args parameters + */ + public MapTest(@JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) Map> mapMapOfString, @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) Map mapOfEnumString, @JsonProperty(JSON_PROPERTY_DIRECT_MAP) Map directMap, @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) Map indirectMap) { + this.mapMapOfString = mapMapOfString; + this.mapOfEnumString = mapOfEnumString; + this.directMap = directMap; + this.indirectMap = indirectMap; + } + public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -119,7 +129,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -153,7 +162,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -187,7 +195,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9590b79ddd30..42690f892302 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -50,6 +50,15 @@ public class MixedPropertiesAndAdditionalPropertiesClass { public MixedPropertiesAndAdditionalPropertiesClass() { } + /** + * Constructor with all args parameters + */ + public MixedPropertiesAndAdditionalPropertiesClass(@JsonProperty(JSON_PROPERTY_UUID) UUID uuid, @JsonProperty(JSON_PROPERTY_DATE_TIME) OffsetDateTime dateTime, @JsonProperty(JSON_PROPERTY_MAP) Map map) { + this.uuid = uuid; + this.dateTime = dateTime; + this.map = map; + } + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -75,7 +84,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -101,7 +109,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java index d03369c5dff5..2d7555704d63 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java @@ -42,6 +42,14 @@ public class Model200Response { public Model200Response() { } + /** + * Constructor with all args parameters + */ + public Model200Response(@JsonProperty(JSON_PROPERTY_NAME) Integer name, @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) String propertyClass) { + this.name = name; + this.propertyClass = propertyClass; + } + public Model200Response name(Integer name) { this.name = name; @@ -67,7 +75,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 9f704484bfd2..01a4c5895f29 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -46,6 +46,15 @@ public class ModelApiResponse { public ModelApiResponse() { } + /** + * Constructor with all args parameters + */ + public ModelApiResponse(@JsonProperty(JSON_PROPERTY_CODE) Integer code, @JsonProperty(JSON_PROPERTY_TYPE) String type, @JsonProperty(JSON_PROPERTY_MESSAGE) String message) { + this.code = code; + this.type = type; + this.message = message; + } + public ModelApiResponse code(Integer code) { this.code = code; @@ -71,7 +80,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -97,7 +105,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java index 62503bceba9c..e7efef8f1f95 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java @@ -38,6 +38,13 @@ public class ModelFile { public ModelFile() { } + /** + * Constructor with all args parameters + */ + public ModelFile(@JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) String sourceURI) { + this.sourceURI = sourceURI; + } + public ModelFile sourceURI(String sourceURI) { this.sourceURI = sourceURI; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java index 79175b7ee878..4e5a3ae624de 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java @@ -38,6 +38,13 @@ public class ModelList { public ModelList() { } + /** + * Constructor with all args parameters + */ + public ModelList(@JsonProperty(JSON_PROPERTY_123LIST) String _123list) { + this._123list = _123list; + } + public ModelList _123list(String _123list) { this._123list = _123list; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java index e1be6dff5bbb..ee81a96cc3e3 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -38,6 +38,13 @@ public class ModelReturn { public ModelReturn() { } + /** + * Constructor with all args parameters + */ + public ModelReturn(@JsonProperty(JSON_PROPERTY_RETURN) Integer _return) { + this._return = _return; + } + public ModelReturn _return(Integer _return) { this._return = _return; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java index c496a00abb89..8c0119c3afc9 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java @@ -48,7 +48,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -59,6 +61,16 @@ public Name( this._123number = _123number; } + /** + * Constructor with all args parameters + */ + public Name(@JsonProperty(JSON_PROPERTY_NAME) Integer name, @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @JsonProperty(JSON_PROPERTY_PROPERTY) String property, @JsonProperty(JSON_PROPERTY_123NUMBER) Integer _123number) { + this.name = name; + this.snakeCase = snakeCase; + this.property = property; + this._123number = _123number; + } + public Name name(Integer name) { this.name = name; @@ -84,7 +96,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -99,7 +110,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -125,7 +135,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java index 1510a46024d4..05d33fc4b357 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java @@ -94,6 +94,25 @@ public NullableClass() { } + /** + * Constructor with all args parameters + */ + public NullableClass(@JsonProperty(JSON_PROPERTY_INTEGER_PROP) Integer integerProp, @JsonProperty(JSON_PROPERTY_NUMBER_PROP) BigDecimal numberProp, @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) Boolean booleanProp, @JsonProperty(JSON_PROPERTY_STRING_PROP) String stringProp, @JsonProperty(JSON_PROPERTY_DATE_PROP) LocalDate dateProp, @JsonProperty(JSON_PROPERTY_DATETIME_PROP) OffsetDateTime datetimeProp, @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) List arrayNullableProp, @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) List arrayAndItemsNullableProp, @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) List arrayItemsNullable, @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) Map objectNullableProp, @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) Map objectAndItemsNullableProp, @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) Map objectItemsNullable) { + super(); + this.integerProp = integerProp == null ? JsonNullable.undefined() : JsonNullable.of(integerProp); + this.numberProp = numberProp == null ? JsonNullable.undefined() : JsonNullable.of(numberProp); + this.booleanProp = booleanProp == null ? JsonNullable.undefined() : JsonNullable.of(booleanProp); + this.stringProp = stringProp == null ? JsonNullable.undefined() : JsonNullable.of(stringProp); + this.dateProp = dateProp == null ? JsonNullable.undefined() : JsonNullable.of(dateProp); + this.datetimeProp = datetimeProp == null ? JsonNullable.undefined() : JsonNullable.of(datetimeProp); + this.arrayNullableProp = arrayNullableProp == null ? JsonNullable.>undefined() : JsonNullable.of(arrayNullableProp); + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp == null ? JsonNullable.>undefined() : JsonNullable.of(arrayAndItemsNullableProp); + this.arrayItemsNullable = arrayItemsNullable; + this.objectNullableProp = objectNullableProp == null ? JsonNullable.>undefined() : JsonNullable.of(objectNullableProp); + this.objectAndItemsNullableProp = objectAndItemsNullableProp == null ? JsonNullable.>undefined() : JsonNullable.of(objectAndItemsNullableProp); + this.objectItemsNullable = objectItemsNullable; + } + public NullableClass integerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); @@ -127,7 +146,6 @@ public void setIntegerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); } - public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); @@ -161,7 +179,6 @@ public void setNumberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); } - public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); @@ -195,7 +212,6 @@ public void setBooleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); } - public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); @@ -229,7 +245,6 @@ public void setStringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); } - public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); @@ -263,7 +278,6 @@ public void setDateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); } - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); @@ -297,7 +311,6 @@ public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); } - public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); @@ -343,7 +356,6 @@ public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); @@ -389,7 +401,6 @@ public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; @@ -423,7 +434,6 @@ public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } - public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); @@ -469,7 +479,6 @@ public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); @@ -515,7 +524,6 @@ public void setObjectAndItemsNullableProp(Map objectAndItemsNull this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java index eb35cce6a82c..e142a178e9df 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -38,6 +38,13 @@ public class NumberOnly { public NumberOnly() { } + /** + * Constructor with all args parameters + */ + public NumberOnly(@JsonProperty(JSON_PROPERTY_JUST_NUMBER) BigDecimal justNumber) { + this.justNumber = justNumber; + } + public NumberOnly justNumber(BigDecimal justNumber) { this.justNumber = justNumber; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 2dc51d40f65c..19889859e087 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -54,6 +54,16 @@ public class ObjectWithDeprecatedFields { public ObjectWithDeprecatedFields() { } + /** + * Constructor with all args parameters + */ + public ObjectWithDeprecatedFields(@JsonProperty(JSON_PROPERTY_UUID) String uuid, @JsonProperty(JSON_PROPERTY_ID) BigDecimal id, @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) DeprecatedObject deprecatedRef, @JsonProperty(JSON_PROPERTY_BARS) List bars) { + this.uuid = uuid; + this.id = id; + this.deprecatedRef = deprecatedRef; + this.bars = bars; + } + public ObjectWithDeprecatedFields uuid(String uuid) { this.uuid = uuid; @@ -79,7 +89,6 @@ public void setUuid(String uuid) { this.uuid = uuid; } - public ObjectWithDeprecatedFields id(BigDecimal id) { this.id = id; @@ -107,7 +116,6 @@ public void setId(BigDecimal id) { this.id = id; } - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -135,7 +143,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java index 39763d34d3a8..3ab954050024 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java @@ -95,6 +95,18 @@ public static StatusEnum fromValue(String value) { public Order() { } + /** + * Constructor with all args parameters + */ + public Order(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_PET_ID) Long petId, @JsonProperty(JSON_PROPERTY_QUANTITY) Integer quantity, @JsonProperty(JSON_PROPERTY_SHIP_DATE) OffsetDateTime shipDate, @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status, @JsonProperty(JSON_PROPERTY_COMPLETE) Boolean complete) { + this.id = id; + this.petId = petId; + this.quantity = quantity; + this.shipDate = shipDate; + this.status = status; + this.complete = complete; + } + public Order id(Long id) { this.id = id; @@ -120,7 +132,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -146,7 +157,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -172,7 +182,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -198,7 +207,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -224,7 +232,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java index 71a7e405ad91..65ca60d50efc 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -46,6 +46,15 @@ public class OuterComposite { public OuterComposite() { } + /** + * Constructor with all args parameters + */ + public OuterComposite(@JsonProperty(JSON_PROPERTY_MY_NUMBER) BigDecimal myNumber, @JsonProperty(JSON_PROPERTY_MY_STRING) String myString, @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) Boolean myBoolean) { + this.myNumber = myNumber; + this.myString = myString; + this.myBoolean = myBoolean; + } + public OuterComposite myNumber(BigDecimal myNumber) { this.myNumber = myNumber; @@ -71,7 +80,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -97,7 +105,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java index c3a8d1b71139..bdfee43b029c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -38,6 +38,13 @@ public class OuterObjectWithEnumProperty { public OuterObjectWithEnumProperty() { } + /** + * Constructor with all args parameters + */ + public OuterObjectWithEnumProperty(@JsonProperty(JSON_PROPERTY_VALUE) OuterEnumInteger value) { + this.value = value; + } + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { this.value = value; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 75ce8d2d540d..6923011646c4 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -85,11 +85,19 @@ public static TypeEnum fromValue(String value) { protected TypeEnum type; public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; - private JsonNullable nullableProperty = JsonNullable.undefined(); + protected JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { } + /** + * Constructor with all args parameters + */ + public ParentWithNullable(@JsonProperty(JSON_PROPERTY_TYPE) TypeEnum type, @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) String nullableProperty) { + this.type = type; + this.nullableProperty = nullableProperty == null ? JsonNullable.undefined() : JsonNullable.of(nullableProperty); + } + public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -115,7 +123,6 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { this.nullableProperty = JsonNullable.of(nullableProperty); diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java index 10720faacb43..80c187c0a2df 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java @@ -102,6 +102,18 @@ public static StatusEnum fromValue(String value) { public Pet() { } + /** + * Constructor with all args parameters + */ + public Pet(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_CATEGORY) Category category, @JsonProperty(JSON_PROPERTY_NAME) String name, @JsonProperty(JSON_PROPERTY_PHOTO_URLS) Set photoUrls, @JsonProperty(JSON_PROPERTY_TAGS) List tags, @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status) { + this.id = id; + this.category = category; + this.name = name; + this.photoUrls = photoUrls; + this.tags = tags; + this.status = status; + } + public Pet id(Long id) { this.id = id; @@ -127,7 +139,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +164,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -179,7 +189,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -214,7 +223,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -248,7 +256,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index cd1a62e24e0e..07d45bdab365 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -40,7 +40,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -49,6 +51,14 @@ public ReadOnlyFirst( this.bar = bar; } + /** + * Constructor with all args parameters + */ + public ReadOnlyFirst(@JsonProperty(JSON_PROPERTY_BAR) String bar, @JsonProperty(JSON_PROPERTY_BAZ) String baz) { + this.bar = bar; + this.baz = baz; + } + /** * Get bar * @return bar @@ -63,7 +73,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java index 702365c535bb..9864dd3aa538 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -38,6 +38,13 @@ public class SpecialModelName { public SpecialModelName() { } + /** + * Constructor with all args parameters + */ + public SpecialModelName(@JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java index 85abf11df318..72709e4b673d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java @@ -41,6 +41,14 @@ public class Tag { public Tag() { } + /** + * Constructor with all args parameters + */ + public Tag(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_NAME) String name) { + this.id = id; + this.name = name; + } + public Tag id(Long id) { this.id = id; @@ -66,7 +74,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 52b4c244ee96..c6a4b415bd58 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -41,6 +41,14 @@ public TestInlineFreeformAdditionalPropertiesRequest() { } + /** + * Constructor with all args parameters + */ + public TestInlineFreeformAdditionalPropertiesRequest(@JsonProperty(JSON_PROPERTY_SOME_PROPERTY) String someProperty) { + super(); + this.someProperty = someProperty; + } + public TestInlineFreeformAdditionalPropertiesRequest someProperty(String someProperty) { this.someProperty = someProperty; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java index c412c56bcc2d..53c54ea3b029 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java @@ -65,6 +65,20 @@ public class User { public User() { } + /** + * Constructor with all args parameters + */ + public User(@JsonProperty(JSON_PROPERTY_ID) Long id, @JsonProperty(JSON_PROPERTY_USERNAME) String username, @JsonProperty(JSON_PROPERTY_FIRST_NAME) String firstName, @JsonProperty(JSON_PROPERTY_LAST_NAME) String lastName, @JsonProperty(JSON_PROPERTY_EMAIL) String email, @JsonProperty(JSON_PROPERTY_PASSWORD) String password, @JsonProperty(JSON_PROPERTY_PHONE) String phone, @JsonProperty(JSON_PROPERTY_USER_STATUS) Integer userStatus) { + this.id = id; + this.username = username; + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + this.password = password; + this.phone = phone; + this.userStatus = userStatus; + } + public User id(Long id) { this.id = id; @@ -90,7 +104,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -116,7 +129,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -142,7 +154,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -168,7 +179,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -194,7 +204,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -220,7 +229,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -246,7 +254,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e8e6d79e3909..899da353f8ec 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -117,7 +117,6 @@ public void setMapString(Map mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -153,7 +152,6 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -188,7 +186,6 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -223,7 +220,6 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -259,7 +255,6 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -295,7 +290,6 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -331,7 +325,6 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -367,7 +360,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -394,7 +386,6 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -421,7 +412,6 @@ public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java index 600600c60c45..1f1c49176df6 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java @@ -52,7 +52,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -84,7 +84,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java index 3d5d2e8a0031..0b5b1f630af8 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -85,7 +85,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -121,7 +120,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java index fb7c772b74a9..578ca1e0855d 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java @@ -85,7 +85,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -112,7 +111,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -139,7 +137,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -166,7 +163,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -193,7 +189,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java index cf775e29640e..6ba0faf3a42a 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java @@ -47,7 +47,7 @@ public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; + protected Boolean declawed; public Cat() { diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java index 80f3a1ff8690..324b5ad37b4a 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java @@ -69,7 +69,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java index 4557d08eed78..01754e86fb08 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -142,7 +142,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java index e82d974b52ef..883964d50db2 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java @@ -227,7 +227,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -255,7 +254,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -282,7 +280,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -309,7 +306,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 2c44f160af0c..a615f86a24e2 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -74,7 +74,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java index 0e14e3bd522f..b98e5e52e7a3 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java @@ -125,7 +125,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -154,7 +153,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -181,7 +179,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -212,7 +209,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -241,7 +237,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -270,7 +265,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest string(String string) { this.string = string; @@ -297,7 +291,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -325,7 +318,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -353,7 +345,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -382,7 +373,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -410,7 +400,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -438,7 +427,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -466,7 +454,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 718954df8d34..3e7b65f97243 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -43,7 +43,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -69,7 +71,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java index 1e57ff328d1c..8f8038bc5c05 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java @@ -123,7 +123,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -158,7 +157,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -193,7 +191,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index bdb4915f0099..b99f415dfd15 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -79,7 +79,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -107,7 +106,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java index 4bdc1fc69e38..850c428801ca 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java @@ -70,7 +70,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 9dc19ac60eff..1e1e1c870f6c 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -74,7 +74,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -101,7 +100,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java index 65456a63b632..41629adec7ab 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java @@ -50,7 +50,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -88,7 +90,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -104,7 +105,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -131,7 +131,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java index a31ac84a9980..a76ee864e31f 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java @@ -123,7 +123,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -150,7 +149,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -177,7 +175,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -205,7 +202,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -232,7 +228,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java index 8a90f1212661..312d14827399 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -75,7 +75,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -102,7 +101,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java index efd41e3946f1..87788a0015a6 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java @@ -130,7 +130,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -158,7 +157,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -186,7 +184,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -223,7 +220,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { this.tags = tags; @@ -259,7 +255,6 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index a12e1513a8c2..9a1f19037ca5 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -42,7 +42,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -66,7 +68,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java index 09dcd63b9e7e..bc40b8d5234c 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java @@ -69,7 +69,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 41ab674825be..3fd540ae2cf1 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -86,7 +86,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -115,7 +114,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -143,7 +141,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -171,7 +168,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 5ec05261802e..d0399c4b092d 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -90,7 +90,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -119,7 +118,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -147,7 +145,6 @@ public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } - public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -175,7 +172,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -203,7 +199,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java index 1f74327455bb..498890790718 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java @@ -93,7 +93,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -120,7 +119,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -147,7 +145,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -174,7 +171,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -201,7 +197,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -228,7 +223,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -255,7 +249,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java index 1e86bb0a6011..d38c09f37658 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java @@ -181,7 +181,6 @@ public void setAttributeString(String attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -209,7 +208,6 @@ public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -236,7 +234,6 @@ public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -263,7 +260,6 @@ public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -298,7 +294,6 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -325,7 +320,6 @@ public void setNameString(String nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -353,7 +347,6 @@ public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -380,7 +373,6 @@ public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -407,7 +399,6 @@ public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -442,7 +433,6 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -477,7 +467,6 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -504,7 +493,6 @@ public void setPrefixString(String prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -532,7 +520,6 @@ public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -559,7 +546,6 @@ public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -586,7 +572,6 @@ public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -621,7 +606,6 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -656,7 +640,6 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -683,7 +666,6 @@ public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -711,7 +693,6 @@ public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -738,7 +719,6 @@ public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -765,7 +745,6 @@ public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -800,7 +779,6 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -835,7 +813,6 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -862,7 +839,6 @@ public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -890,7 +866,6 @@ public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -917,7 +892,6 @@ public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -944,7 +918,6 @@ public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -979,7 +952,6 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a3225df5a9d4..202603bfcd10 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public void setMapString(Map mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -137,7 +136,6 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -167,7 +165,6 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -197,7 +194,6 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -227,7 +223,6 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -257,7 +252,6 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -287,7 +281,6 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -317,7 +310,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -339,7 +331,6 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -361,7 +352,6 @@ public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java index a7dff59ff9a9..95acd2f955a0 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ public class Animal { public static final String SERIALIZED_NAME_COLOR = "color"; @SerializedName(SERIALIZED_NAME_COLOR) - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -59,7 +59,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java index 112ec07fe100..106534f2f0d1 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -75,7 +75,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -105,7 +104,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java index c4866dffd152..e61f318f97b8 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -97,7 +96,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -119,7 +117,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -141,7 +138,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -163,7 +159,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java index 9e46a17a74c9..f5f13bccc809 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,7 @@ public class Cat extends Animal { public static final String SERIALIZED_NAME_DECLAWED = "declawed"; @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; + protected Boolean declawed; public Cat() { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java index d7db42f2fb0b..ca33e359641b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java index f181d912391f..081eb2043e3f 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -156,7 +156,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java index f4c4d5954d5d..ae962673d756 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -264,7 +264,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -286,7 +285,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -308,7 +306,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -330,7 +327,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 72c9bd874b5a..fdc5b0737fdb 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -63,7 +63,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java index d983d2f42f21..ebd9a35017f4 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -138,7 +137,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -160,7 +158,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -184,7 +181,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -208,7 +204,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -232,7 +227,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest string(String string) { this.string = string; @@ -254,7 +248,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -276,7 +269,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -298,7 +290,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -320,7 +311,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -342,7 +332,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -364,7 +353,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -386,7 +374,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 523a637744bd..3f5fa3cf6acc 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -37,7 +37,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ public HasOnlyReadOnly( String bar, @@ -60,7 +62,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java index 3149cda35dfd..90fb54c48852 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java @@ -124,7 +124,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -154,7 +153,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -184,7 +182,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index f111e8e3ed6f..a7cd29cf21d2 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -68,7 +68,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -90,7 +89,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java index 27c8a1578533..758b1baea885 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java @@ -59,7 +59,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index e888cee24b23..c3c4ab0a7d30 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -85,7 +84,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java index ae95f1605486..8778aa21ede7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java @@ -45,7 +45,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ public Name( Integer snakeCase, @@ -77,7 +79,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -90,7 +91,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -112,7 +112,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java index 416fee15501a..fc323cc1e780 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java @@ -125,7 +125,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -147,7 +146,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -169,7 +167,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -191,7 +188,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -213,7 +209,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java index 8f16c099bb8f..014280ab163f 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -86,7 +85,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java index 6dae7446a9d8..f890f7fe0677 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java @@ -131,7 +131,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -175,7 +173,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -205,7 +202,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -235,7 +231,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index d2e3283247cf..45111a251ab6 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -37,7 +37,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ public ReadOnlyFirst( String bar @@ -58,7 +60,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java index 8b694400671c..6b5efe2f1f28 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index ab790b8a5ac5..f5662b44cb66 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -75,7 +75,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -97,7 +96,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -119,7 +117,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -141,7 +138,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 72888a3001bd..60f5be22dcb9 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -79,7 +79,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -101,7 +100,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -123,7 +121,6 @@ public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } - public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -145,7 +142,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -167,7 +163,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java index 8e5c36a783e1..92732cae9fa9 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -105,7 +104,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -127,7 +125,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -149,7 +146,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -171,7 +167,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -193,7 +188,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -215,7 +209,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/XmlItem.java index 184f09d430d3..4ebe92dfe9fc 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/XmlItem.java @@ -171,7 +171,6 @@ public void setAttributeString(String attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -193,7 +192,6 @@ public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -215,7 +213,6 @@ public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -237,7 +234,6 @@ public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -267,7 +263,6 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -289,7 +284,6 @@ public void setNameString(String nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -311,7 +305,6 @@ public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -333,7 +326,6 @@ public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -355,7 +347,6 @@ public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -385,7 +376,6 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -415,7 +405,6 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -437,7 +426,6 @@ public void setPrefixString(String prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -459,7 +447,6 @@ public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -481,7 +468,6 @@ public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -503,7 +489,6 @@ public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -533,7 +518,6 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -563,7 +547,6 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -585,7 +568,6 @@ public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -607,7 +589,6 @@ public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -629,7 +610,6 @@ public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -651,7 +631,6 @@ public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -681,7 +660,6 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -711,7 +689,6 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -733,7 +710,6 @@ public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -755,7 +731,6 @@ public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -777,7 +752,6 @@ public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -799,7 +773,6 @@ public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -829,7 +802,6 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a3225df5a9d4..202603bfcd10 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public void setMapString(Map mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -137,7 +136,6 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -167,7 +165,6 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -197,7 +194,6 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -227,7 +223,6 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -257,7 +252,6 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -287,7 +281,6 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -317,7 +310,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -339,7 +331,6 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -361,7 +352,6 @@ public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java index a7dff59ff9a9..95acd2f955a0 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ public class Animal { public static final String SERIALIZED_NAME_COLOR = "color"; @SerializedName(SERIALIZED_NAME_COLOR) - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -59,7 +59,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java index 112ec07fe100..106534f2f0d1 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -75,7 +75,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -105,7 +104,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java index c4866dffd152..e61f318f97b8 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -97,7 +96,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -119,7 +117,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -141,7 +138,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -163,7 +159,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java index 9e46a17a74c9..f5f13bccc809 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,7 @@ public class Cat extends Animal { public static final String SERIALIZED_NAME_DECLAWED = "declawed"; @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; + protected Boolean declawed; public Cat() { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java index d7db42f2fb0b..ca33e359641b 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java index f181d912391f..081eb2043e3f 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -156,7 +156,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java index f4c4d5954d5d..ae962673d756 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -264,7 +264,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -286,7 +285,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -308,7 +306,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -330,7 +327,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 72c9bd874b5a..fdc5b0737fdb 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -63,7 +63,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java index d983d2f42f21..ebd9a35017f4 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -138,7 +137,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -160,7 +158,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -184,7 +181,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -208,7 +204,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -232,7 +227,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest string(String string) { this.string = string; @@ -254,7 +248,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -276,7 +269,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -298,7 +290,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -320,7 +311,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -342,7 +332,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -364,7 +353,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -386,7 +374,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 523a637744bd..3f5fa3cf6acc 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -37,7 +37,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ public HasOnlyReadOnly( String bar, @@ -60,7 +62,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java index 3149cda35dfd..90fb54c48852 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java @@ -124,7 +124,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -154,7 +153,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -184,7 +182,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index f111e8e3ed6f..a7cd29cf21d2 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -68,7 +68,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -90,7 +89,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java index 27c8a1578533..758b1baea885 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java @@ -59,7 +59,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index e888cee24b23..c3c4ab0a7d30 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -85,7 +84,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java index ae95f1605486..8778aa21ede7 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java @@ -45,7 +45,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ public Name( Integer snakeCase, @@ -77,7 +79,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -90,7 +91,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -112,7 +112,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java index 416fee15501a..fc323cc1e780 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java @@ -125,7 +125,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -147,7 +146,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -169,7 +167,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -191,7 +188,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -213,7 +209,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java index 8f16c099bb8f..014280ab163f 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -86,7 +85,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java index 6dae7446a9d8..f890f7fe0677 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java @@ -131,7 +131,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -175,7 +173,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -205,7 +202,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -235,7 +231,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index d2e3283247cf..45111a251ab6 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -37,7 +37,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ public ReadOnlyFirst( String bar @@ -58,7 +60,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java index 8b694400671c..6b5efe2f1f28 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index ab790b8a5ac5..f5662b44cb66 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -75,7 +75,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -97,7 +96,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -119,7 +117,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -141,7 +138,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 72888a3001bd..60f5be22dcb9 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -79,7 +79,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -101,7 +100,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -123,7 +121,6 @@ public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } - public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -145,7 +142,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -167,7 +163,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java index 8e5c36a783e1..92732cae9fa9 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -105,7 +104,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -127,7 +125,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -149,7 +146,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -171,7 +167,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -193,7 +188,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -215,7 +209,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/XmlItem.java index 184f09d430d3..4ebe92dfe9fc 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/XmlItem.java @@ -171,7 +171,6 @@ public void setAttributeString(String attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -193,7 +192,6 @@ public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -215,7 +213,6 @@ public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -237,7 +234,6 @@ public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -267,7 +263,6 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -289,7 +284,6 @@ public void setNameString(String nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -311,7 +305,6 @@ public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -333,7 +326,6 @@ public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -355,7 +347,6 @@ public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -385,7 +376,6 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -415,7 +405,6 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -437,7 +426,6 @@ public void setPrefixString(String prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -459,7 +447,6 @@ public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -481,7 +468,6 @@ public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -503,7 +489,6 @@ public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -533,7 +518,6 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -563,7 +547,6 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -585,7 +568,6 @@ public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -607,7 +589,6 @@ public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -629,7 +610,6 @@ public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -651,7 +631,6 @@ public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -681,7 +660,6 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -711,7 +689,6 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -733,7 +710,6 @@ public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -755,7 +731,6 @@ public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -777,7 +752,6 @@ public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -799,7 +773,6 @@ public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -829,7 +802,6 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a3225df5a9d4..202603bfcd10 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -107,7 +107,6 @@ public void setMapString(Map mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -137,7 +136,6 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -167,7 +165,6 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -197,7 +194,6 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -227,7 +223,6 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -257,7 +252,6 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -287,7 +281,6 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -317,7 +310,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -339,7 +331,6 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -361,7 +352,6 @@ public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Animal.java index a7dff59ff9a9..95acd2f955a0 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Animal.java @@ -33,7 +33,7 @@ public class Animal { public static final String SERIALIZED_NAME_COLOR = "color"; @SerializedName(SERIALIZED_NAME_COLOR) - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -59,7 +59,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ArrayTest.java index 112ec07fe100..106534f2f0d1 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -75,7 +75,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -105,7 +104,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Capitalization.java index c4866dffd152..e61f318f97b8 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Capitalization.java @@ -75,7 +75,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -97,7 +96,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -119,7 +117,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -141,7 +138,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -163,7 +159,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Cat.java index 9e46a17a74c9..f5f13bccc809 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,7 @@ public class Cat extends Animal { public static final String SERIALIZED_NAME_DECLAWED = "declawed"; @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; + protected Boolean declawed; public Cat() { diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Category.java index d7db42f2fb0b..ca33e359641b 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Category.java @@ -59,7 +59,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/EnumArrays.java index f181d912391f..081eb2043e3f 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -156,7 +156,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/EnumTest.java index f4c4d5954d5d..ae962673d756 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/EnumTest.java @@ -264,7 +264,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -286,7 +285,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -308,7 +306,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -330,7 +327,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 72c9bd874b5a..fdc5b0737fdb 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -63,7 +63,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/FormatTest.java index d983d2f42f21..ebd9a35017f4 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/FormatTest.java @@ -114,7 +114,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -138,7 +137,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -160,7 +158,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -184,7 +181,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -208,7 +204,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -232,7 +227,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest string(String string) { this.string = string; @@ -254,7 +248,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -276,7 +269,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -298,7 +290,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -320,7 +311,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -342,7 +332,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -364,7 +353,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -386,7 +374,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 523a637744bd..3f5fa3cf6acc 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -37,7 +37,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ public HasOnlyReadOnly( String bar, @@ -60,7 +62,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/MapTest.java index 3149cda35dfd..90fb54c48852 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/MapTest.java @@ -124,7 +124,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -154,7 +153,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -184,7 +182,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index f111e8e3ed6f..a7cd29cf21d2 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -68,7 +68,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -90,7 +89,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Model200Response.java index 27c8a1578533..758b1baea885 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Model200Response.java @@ -59,7 +59,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ModelApiResponse.java index e888cee24b23..c3c4ab0a7d30 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -63,7 +63,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -85,7 +84,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Name.java index ae95f1605486..8778aa21ede7 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Name.java @@ -45,7 +45,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ public Name( Integer snakeCase, @@ -77,7 +79,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -90,7 +91,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -112,7 +112,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Order.java index 416fee15501a..fc323cc1e780 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Order.java @@ -125,7 +125,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -147,7 +146,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -169,7 +167,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -191,7 +188,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -213,7 +209,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/OuterComposite.java index 8f16c099bb8f..014280ab163f 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -64,7 +64,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -86,7 +85,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Pet.java index 6dae7446a9d8..f890f7fe0677 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Pet.java @@ -131,7 +131,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -175,7 +173,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -205,7 +202,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -235,7 +231,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index d2e3283247cf..45111a251ab6 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -37,7 +37,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ public ReadOnlyFirst( String bar @@ -58,7 +60,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Tag.java index 8b694400671c..6b5efe2f1f28 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/Tag.java @@ -59,7 +59,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index ab790b8a5ac5..f5662b44cb66 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -75,7 +75,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -97,7 +96,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -119,7 +117,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -141,7 +138,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 72888a3001bd..60f5be22dcb9 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -79,7 +79,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -101,7 +100,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -123,7 +121,6 @@ public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } - public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -145,7 +142,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -167,7 +163,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/User.java index 8e5c36a783e1..92732cae9fa9 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/User.java @@ -83,7 +83,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -105,7 +104,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -127,7 +125,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -149,7 +146,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -171,7 +167,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -193,7 +188,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -215,7 +209,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/XmlItem.java index 184f09d430d3..4ebe92dfe9fc 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/XmlItem.java @@ -171,7 +171,6 @@ public void setAttributeString(String attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -193,7 +192,6 @@ public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -215,7 +213,6 @@ public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -237,7 +234,6 @@ public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -267,7 +263,6 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -289,7 +284,6 @@ public void setNameString(String nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -311,7 +305,6 @@ public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -333,7 +326,6 @@ public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -355,7 +347,6 @@ public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -385,7 +376,6 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -415,7 +405,6 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -437,7 +426,6 @@ public void setPrefixString(String prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -459,7 +447,6 @@ public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -481,7 +468,6 @@ public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -503,7 +489,6 @@ public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -533,7 +518,6 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -563,7 +547,6 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -585,7 +568,6 @@ public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -607,7 +589,6 @@ public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -629,7 +610,6 @@ public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -651,7 +631,6 @@ public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -681,7 +660,6 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -711,7 +689,6 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -733,7 +710,6 @@ public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -755,7 +731,6 @@ public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -777,7 +752,6 @@ public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -799,7 +773,6 @@ public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -829,7 +802,6 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 052a661a1a5b..3594095e6faa 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -114,7 +114,6 @@ public void setMapString(Map mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { this.mapNumber = mapNumber; @@ -148,7 +147,6 @@ public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { this.mapInteger = mapInteger; @@ -182,7 +180,6 @@ public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; @@ -216,7 +213,6 @@ public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; @@ -250,7 +246,6 @@ public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; @@ -284,7 +279,6 @@ public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { this.mapMapString = mapMapString; @@ -318,7 +312,6 @@ public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; @@ -352,7 +345,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -378,7 +370,6 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { this.anytype2 = anytype2; @@ -404,7 +395,6 @@ public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { this.anytype3 = anytype3; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java index 4f734a1bcf47..b668c92d1e5f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java @@ -50,7 +50,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -80,7 +80,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java index 8e539861d237..5354cab3943b 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -82,7 +82,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -116,7 +115,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java index eace91d32b31..676127450797 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java @@ -82,7 +82,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -108,7 +107,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -134,7 +132,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -160,7 +157,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -186,7 +182,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java index c3ce165a6858..ae2a7a582b93 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java @@ -45,7 +45,7 @@ public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; + protected Boolean declawed; public Cat() { diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Category.java index 6276f76cbd37..f3c09fefafaa 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java index 905d8f49f490..e7654785df11 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -139,7 +139,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java index 897a0aac97a5..41b2f3eb8155 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java @@ -224,7 +224,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -250,7 +249,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -276,7 +274,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -302,7 +299,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index ddff4505b584..141dc551badc 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -70,7 +70,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java index 1c2400cf87d0..5c4aba61f694 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java @@ -122,7 +122,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -150,7 +149,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -176,7 +174,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -204,7 +201,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -232,7 +228,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -260,7 +255,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest string(String string) { this.string = string; @@ -286,7 +280,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -312,7 +305,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(AsyncFile binary) { this.binary = binary; @@ -338,7 +330,6 @@ public void setBinary(AsyncFile binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -364,7 +355,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -390,7 +380,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -416,7 +405,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -442,7 +430,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index c0d039bc95f1..df9817e994bf 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -41,7 +41,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -66,7 +68,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java index 6b740281b9bf..5da2e18def94 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java @@ -119,7 +119,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -153,7 +152,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -187,7 +185,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index a950a03dbe41..aabbecd4bbb4 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -75,7 +75,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -101,7 +100,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java index d03369c5dff5..ed6d620c7aa4 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java @@ -67,7 +67,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 9f704484bfd2..a50edcc17615 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -71,7 +71,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -97,7 +96,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Name.java index c496a00abb89..8b7d774a9f09 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Name.java @@ -48,7 +48,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -84,7 +86,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -99,7 +100,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -125,7 +125,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Order.java index 39763d34d3a8..460999a479a4 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Order.java @@ -120,7 +120,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -146,7 +145,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -172,7 +170,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -198,7 +195,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -224,7 +220,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java index 71a7e405ad91..9a4a6ca10d07 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -71,7 +71,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -97,7 +96,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Pet.java index aa4b9b43ff58..ae2f5a64fbd6 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Pet.java @@ -127,7 +127,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -179,7 +177,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -214,7 +211,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -248,7 +244,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index cd1a62e24e0e..630a96f5f512 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -40,7 +40,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -63,7 +65,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Tag.java index 85abf11df318..9145e5deea22 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index dc106be155da..79af9537f9fb 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -82,7 +82,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderDefault numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -108,7 +107,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderDefault integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -134,7 +132,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderDefault boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -160,7 +157,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 605348bc3f76..30578e13ee90 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -86,7 +86,6 @@ public void setStringItem(String stringItem) { this.stringItem = stringItem; } - public TypeHolderExample numberItem(BigDecimal numberItem) { this.numberItem = numberItem; @@ -112,7 +111,6 @@ public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } - public TypeHolderExample floatItem(Float floatItem) { this.floatItem = floatItem; @@ -138,7 +136,6 @@ public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } - public TypeHolderExample integerItem(Integer integerItem) { this.integerItem = integerItem; @@ -164,7 +161,6 @@ public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } - public TypeHolderExample boolItem(Boolean boolItem) { this.boolItem = boolItem; @@ -190,7 +186,6 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { this.arrayItem = arrayItem; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/User.java index c412c56bcc2d..0523f7495459 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/User.java @@ -90,7 +90,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -116,7 +115,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -142,7 +140,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -168,7 +165,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -194,7 +190,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -220,7 +215,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -246,7 +240,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java index 0e34303e5ecc..a2ecfc8cd044 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java @@ -178,7 +178,6 @@ public void setAttributeString(String attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; @@ -204,7 +203,6 @@ public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; @@ -230,7 +228,6 @@ public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; @@ -256,7 +253,6 @@ public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; @@ -290,7 +286,6 @@ public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { this.nameString = nameString; @@ -316,7 +311,6 @@ public void setNameString(String nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; @@ -342,7 +336,6 @@ public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { this.nameInteger = nameInteger; @@ -368,7 +361,6 @@ public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; @@ -394,7 +386,6 @@ public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { this.nameArray = nameArray; @@ -428,7 +419,6 @@ public void setNameArray(List nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; @@ -462,7 +452,6 @@ public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { this.prefixString = prefixString; @@ -488,7 +477,6 @@ public void setPrefixString(String prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; @@ -514,7 +502,6 @@ public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; @@ -540,7 +527,6 @@ public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; @@ -566,7 +552,6 @@ public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { this.prefixArray = prefixArray; @@ -600,7 +585,6 @@ public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; @@ -634,7 +618,6 @@ public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { this.namespaceString = namespaceString; @@ -660,7 +643,6 @@ public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; @@ -686,7 +668,6 @@ public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; @@ -712,7 +693,6 @@ public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; @@ -738,7 +718,6 @@ public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; @@ -772,7 +751,6 @@ public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; @@ -806,7 +784,6 @@ public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; @@ -832,7 +809,6 @@ public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; @@ -858,7 +834,6 @@ public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; @@ -884,7 +859,6 @@ public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; @@ -910,7 +884,6 @@ public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; @@ -944,7 +917,6 @@ public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0ef961db5bf1..3120bfe33367 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -76,7 +76,6 @@ public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 220c2ba3b1a1..8417192b7e2d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -67,7 +67,6 @@ public void setUsername(String username) { this.username = username; } - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { this.singleRefType = singleRefType; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java index 686d838b0cb9..b6a44a024b77 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java @@ -49,7 +49,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -79,7 +79,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java index 8e539861d237..5354cab3943b 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -82,7 +82,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -116,7 +115,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java index eace91d32b31..676127450797 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java @@ -82,7 +82,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -108,7 +107,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -134,7 +132,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -160,7 +157,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -186,7 +182,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java index 6276f76cbd37..f3c09fefafaa 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java index 905d8f49f490..e7654785df11 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -139,7 +139,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java index 716d2bca80f8..25f20bd693a0 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java @@ -243,7 +243,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -269,7 +268,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -295,7 +293,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -321,7 +318,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); @@ -355,7 +351,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; @@ -381,7 +376,6 @@ public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; @@ -407,7 +401,6 @@ public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue this.outerEnumDefaultValue = outerEnumDefaultValue; } - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 568b3785cfb5..02d4afd18ff1 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -70,7 +70,6 @@ public void setSomeId(BigDecimal someId) { this.someId = someId; } - public FakeBigDecimalMap200Response someMap(Map someMap) { this.someMap = someMap; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index ddff4505b584..141dc551badc 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -70,7 +70,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java index 21549002e441..ce5b64434fbd 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java @@ -130,7 +130,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -158,7 +157,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -184,7 +182,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -212,7 +209,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -240,7 +236,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -268,7 +263,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest decimal(BigDecimal decimal) { this.decimal = decimal; @@ -294,7 +288,6 @@ public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } - public FormatTest string(String string) { this.string = string; @@ -320,7 +313,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -346,7 +338,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(AsyncFile binary) { this.binary = binary; @@ -372,7 +363,6 @@ public void setBinary(AsyncFile binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -398,7 +388,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -424,7 +413,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -450,7 +438,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -476,7 +463,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest patternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; @@ -502,7 +488,6 @@ public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index c0d039bc95f1..df9817e994bf 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -41,7 +41,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -66,7 +68,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java index 6b740281b9bf..5da2e18def94 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java @@ -119,7 +119,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -153,7 +152,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -187,7 +185,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index a950a03dbe41..aabbecd4bbb4 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -75,7 +75,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -101,7 +100,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java index d03369c5dff5..ed6d620c7aa4 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java @@ -67,7 +67,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 9f704484bfd2..a50edcc17615 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -71,7 +71,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -97,7 +96,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java index c496a00abb89..8b7d774a9f09 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java @@ -48,7 +48,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -84,7 +86,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -99,7 +100,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -125,7 +125,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NullableClass.java index 58c4c2d1bdc6..56e0bd75d39b 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NullableClass.java @@ -127,7 +127,6 @@ public void setIntegerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); } - public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); @@ -161,7 +160,6 @@ public void setNumberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); } - public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); @@ -195,7 +193,6 @@ public void setBooleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); } - public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); @@ -229,7 +226,6 @@ public void setStringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); } - public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); @@ -263,7 +259,6 @@ public void setDateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); } - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); @@ -297,7 +292,6 @@ public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); } - public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); @@ -343,7 +337,6 @@ public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); @@ -389,7 +382,6 @@ public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; @@ -423,7 +415,6 @@ public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } - public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); @@ -469,7 +460,6 @@ public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); @@ -515,7 +505,6 @@ public void setObjectAndItemsNullableProp(Map objectAndItemsNull this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 6699a31ae158..cfcf8a77e1de 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -79,7 +79,6 @@ public void setUuid(String uuid) { this.uuid = uuid; } - public ObjectWithDeprecatedFields id(BigDecimal id) { this.id = id; @@ -107,7 +106,6 @@ public void setId(BigDecimal id) { this.id = id; } - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -135,7 +133,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java index 39763d34d3a8..460999a479a4 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java @@ -120,7 +120,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -146,7 +145,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -172,7 +170,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -198,7 +195,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -224,7 +220,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java index 71a7e405ad91..9a4a6ca10d07 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -71,7 +71,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -97,7 +96,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 75ce8d2d540d..616e2c1b5374 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -85,7 +85,7 @@ public static TypeEnum fromValue(String value) { protected TypeEnum type; public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; - private JsonNullable nullableProperty = JsonNullable.undefined(); + protected JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { } @@ -115,7 +115,6 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { this.nullableProperty = JsonNullable.of(nullableProperty); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java index aa4b9b43ff58..ae2f5a64fbd6 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java @@ -127,7 +127,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -179,7 +177,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -214,7 +211,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -248,7 +244,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index cd1a62e24e0e..630a96f5f512 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -40,7 +40,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -63,7 +65,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java index 85abf11df318..9145e5deea22 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java index c412c56bcc2d..0523f7495459 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java @@ -90,7 +90,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -116,7 +115,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -142,7 +140,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -168,7 +165,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -194,7 +190,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -220,7 +215,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -246,7 +240,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index b17367aa3ab4..c56060ec397c 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -76,7 +76,6 @@ public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 0c10b7df9631..19eb865fd663 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -67,7 +67,6 @@ public void setUsername(String username) { this.username = username; } - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { this.singleRefType = singleRefType; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Animal.java index b5fa149d2a37..e9ed6ab46f82 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Animal.java @@ -49,7 +49,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -79,7 +79,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ArrayTest.java index 5898dd6e96c1..ec815dc47e46 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -82,7 +82,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -116,7 +115,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Capitalization.java index 24fc3576eb22..3f2c9735d408 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Capitalization.java @@ -82,7 +82,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -108,7 +107,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -134,7 +132,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -160,7 +157,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -186,7 +182,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Category.java index 15c81d776e91..430537d04ae0 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumArrays.java index c75845c54ddc..e6b4521ffe18 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -139,7 +139,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java index 4d6d2b25dd54..638dddb0231a 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java @@ -243,7 +243,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -269,7 +268,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -295,7 +293,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -321,7 +318,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); @@ -355,7 +351,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; @@ -381,7 +376,6 @@ public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; @@ -407,7 +401,6 @@ public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue this.outerEnumDefaultValue = outerEnumDefaultValue; } - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 8cc6663192e7..40df83cdcc7e 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -70,7 +70,6 @@ public void setSomeId(BigDecimal someId) { this.someId = someId; } - public FakeBigDecimalMap200Response someMap(Map someMap) { this.someMap = someMap; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 37b2ab7a40fc..a69867b88559 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -70,7 +70,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FormatTest.java index 8329ba852a24..bc3537566cad 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/FormatTest.java @@ -130,7 +130,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -158,7 +157,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -184,7 +182,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -212,7 +209,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -240,7 +236,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -268,7 +263,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest decimal(BigDecimal decimal) { this.decimal = decimal; @@ -294,7 +288,6 @@ public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } - public FormatTest string(String string) { this.string = string; @@ -320,7 +313,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -346,7 +338,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -372,7 +363,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -398,7 +388,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -424,7 +413,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -450,7 +438,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -476,7 +463,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest patternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; @@ -502,7 +488,6 @@ public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index a6ea83d3fdbc..280bd3ceaa53 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -41,7 +41,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -66,7 +68,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/MapTest.java index af8e3e5aef96..f26d625bcfeb 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/MapTest.java @@ -119,7 +119,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -153,7 +152,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -187,7 +185,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index eaa8a9f7d8b1..55512f0ddf47 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -75,7 +75,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -101,7 +100,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Model200Response.java index 2b117f309b35..4f4220d59aeb 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Model200Response.java @@ -67,7 +67,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ModelApiResponse.java index db3dc79c9f84..78fc4df4dd0a 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -71,7 +71,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -97,7 +96,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Name.java index 3c9699dc5445..6ecec236e2d6 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Name.java @@ -48,7 +48,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -84,7 +86,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -99,7 +100,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -125,7 +125,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/NullableClass.java index c011ff870219..8691e71511d3 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/NullableClass.java @@ -127,7 +127,6 @@ public void setIntegerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); } - public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); @@ -161,7 +160,6 @@ public void setNumberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); } - public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); @@ -195,7 +193,6 @@ public void setBooleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); } - public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); @@ -229,7 +226,6 @@ public void setStringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); } - public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); @@ -263,7 +259,6 @@ public void setDateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); } - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); @@ -297,7 +292,6 @@ public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); } - public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); @@ -343,7 +337,6 @@ public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); @@ -389,7 +382,6 @@ public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; @@ -423,7 +415,6 @@ public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } - public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); @@ -469,7 +460,6 @@ public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); @@ -515,7 +505,6 @@ public void setObjectAndItemsNullableProp(Map objectAndItemsNull this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 7f559434a6f4..4e61cc339462 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -79,7 +79,6 @@ public void setUuid(String uuid) { this.uuid = uuid; } - public ObjectWithDeprecatedFields id(BigDecimal id) { this.id = id; @@ -107,7 +106,6 @@ public void setId(BigDecimal id) { this.id = id; } - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -135,7 +133,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Order.java index cdf6710ef0b1..bc0af5608b2a 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Order.java @@ -120,7 +120,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -146,7 +145,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -172,7 +170,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -198,7 +195,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -224,7 +220,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/OuterComposite.java index 4864c5b6f7da..d281b4caebfc 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -71,7 +71,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -97,7 +96,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 2d20ca3ea987..1214d8c6fa25 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -85,7 +85,7 @@ public static TypeEnum fromValue(String value) { protected TypeEnum type; public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; - private JsonNullable nullableProperty = JsonNullable.undefined(); + protected JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { } @@ -115,7 +115,6 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { this.nullableProperty = JsonNullable.of(nullableProperty); diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Pet.java index fbc1f5266b7d..203325a5f72e 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Pet.java @@ -127,7 +127,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -179,7 +177,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -214,7 +211,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -248,7 +244,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index b9c82689f247..68da2c0d786e 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -40,7 +40,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -63,7 +65,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Tag.java index 1bef4075ea90..b7796f2c6322 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/User.java index 333321812bfe..d2a15531c9a1 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/User.java @@ -90,7 +90,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -116,7 +115,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -142,7 +140,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -168,7 +165,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -194,7 +190,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -220,7 +215,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -246,7 +240,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java index f4543be62411..23587913ea55 100644 --- a/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java +++ b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java @@ -91,7 +91,6 @@ public void setNullableArray(byte[] nullableArray) { this.nullableArray = JsonNullable.of(nullableArray); } - public ByteArrayObject normalArray(byte[] normalArray) { this.normalArray = normalArray; @@ -117,7 +116,6 @@ public void setNormalArray(byte[] normalArray) { this.normalArray = normalArray; } - public ByteArrayObject nullableString(String nullableString) { this.nullableString = JsonNullable.of(nullableString); @@ -151,7 +149,6 @@ public void setNullableString(String nullableString) { this.nullableString = JsonNullable.of(nullableString); } - public ByteArrayObject stringField(String stringField) { this.stringField = stringField; @@ -177,7 +174,6 @@ public void setStringField(String stringField) { this.stringField = stringField; } - public ByteArrayObject intField(BigDecimal intField) { this.intField = intField; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 3b136100f8a8..db5149a1f358 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -78,7 +78,6 @@ public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 54272d1458bc..874e2f78f5f7 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -69,7 +69,6 @@ public void setUsername(String username) { this.username = username; } - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { this.singleRefType = singleRefType; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Animal.java index e6c75517850d..1ba4a3e38021 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Animal.java @@ -50,7 +50,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -81,7 +81,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ArrayTest.java index ae1c484ab6da..0d5234343bd4 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -84,7 +84,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -119,7 +118,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Capitalization.java index b5b7d7bbb8f0..ee94b3d79343 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Capitalization.java @@ -84,7 +84,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -111,7 +110,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -138,7 +136,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -165,7 +162,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -192,7 +188,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Category.java index 858f9aeb9285..dbb55d962f47 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Category.java @@ -68,7 +68,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumArrays.java index 30106e5c69c3..b19351d8f416 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -141,7 +141,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java index a02ff03785c5..bbbb7987c27b 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -245,7 +245,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -272,7 +271,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -299,7 +297,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -326,7 +323,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); @@ -361,7 +357,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; @@ -388,7 +383,6 @@ public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; @@ -415,7 +409,6 @@ public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue this.outerEnumDefaultValue = outerEnumDefaultValue; } - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 61c4668ccee5..cf96af74a4ed 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -72,7 +72,6 @@ public void setSomeId(BigDecimal someId) { this.someId = someId; } - public FakeBigDecimalMap200Response someMap(Map someMap) { this.someMap = someMap; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 0a126f3d664d..31c2a72767c0 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -72,7 +72,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java index f4fafcb82937..a209f8e8c51b 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -132,7 +132,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -161,7 +160,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -188,7 +186,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -217,7 +214,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -246,7 +242,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -275,7 +270,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest decimal(BigDecimal decimal) { this.decimal = decimal; @@ -302,7 +296,6 @@ public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } - public FormatTest string(String string) { this.string = string; @@ -329,7 +322,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -356,7 +348,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -383,7 +374,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -410,7 +400,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -437,7 +426,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -464,7 +452,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -491,7 +478,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest patternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; @@ -518,7 +504,6 @@ public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 819026e0518a..829491b007a3 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -42,7 +42,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -68,7 +70,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/MapTest.java index 0fed7028cc6a..b61aadc37802 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/MapTest.java @@ -121,7 +121,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -156,7 +155,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -191,7 +189,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index cc856cbf18a3..eb8f94a0fc92 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -77,7 +77,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -104,7 +103,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Model200Response.java index 0837da53264a..ce4ae34785ed 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Model200Response.java @@ -70,7 +70,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index cc4ff049a2f4..8f8bc5018f42 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -73,7 +73,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -100,7 +99,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Name.java index 1c23d222a22f..f7db4a806ea2 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Name.java @@ -50,7 +50,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -87,7 +89,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -103,7 +104,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -130,7 +130,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/NullableClass.java index cbb609068671..c8b4a2f1df2f 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/NullableClass.java @@ -129,7 +129,6 @@ public void setIntegerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); } - public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); @@ -164,7 +163,6 @@ public void setNumberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); } - public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); @@ -199,7 +197,6 @@ public void setBooleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); } - public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); @@ -234,7 +231,6 @@ public void setStringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); } - public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); @@ -269,7 +265,6 @@ public void setDateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); } - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); @@ -304,7 +299,6 @@ public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); } - public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); @@ -351,7 +345,6 @@ public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); @@ -398,7 +391,6 @@ public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; @@ -433,7 +425,6 @@ public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } - public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); @@ -480,7 +471,6 @@ public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); @@ -527,7 +517,6 @@ public void setObjectAndItemsNullableProp(Map objectAndItemsNull this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index da90dca6b3af..4532fcecccd2 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -81,7 +81,6 @@ public void setUuid(String uuid) { this.uuid = uuid; } - public ObjectWithDeprecatedFields id(BigDecimal id) { this.id = id; @@ -110,7 +109,6 @@ public void setId(BigDecimal id) { this.id = id; } - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -139,7 +137,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Order.java index 64bdd3f83053..2895fb64bf13 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Order.java @@ -122,7 +122,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -149,7 +148,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -176,7 +174,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -203,7 +200,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -230,7 +226,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/OuterComposite.java index 202d3200f21a..78393ff78e33 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -73,7 +73,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -100,7 +99,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 2517bac63e68..d8ea4cc8435a 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -86,7 +86,7 @@ public static TypeEnum fromValue(String value) { protected TypeEnum type; public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; - private JsonNullable nullableProperty = JsonNullable.undefined(); + protected JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { } @@ -117,7 +117,6 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { this.nullableProperty = JsonNullable.of(nullableProperty); diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Pet.java index 5ec12bd06282..30a25dcac0ac 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Pet.java @@ -129,7 +129,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -156,7 +155,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -183,7 +181,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -219,7 +216,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -254,7 +250,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 6900e021089e..a477e9fa753a 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -41,7 +41,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -65,7 +67,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Tag.java index fe890d4ebb97..85cadeadc670 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/Tag.java @@ -68,7 +68,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/User.java index ba00b0dfa95a..353781980849 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/User.java @@ -92,7 +92,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -119,7 +118,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -146,7 +144,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -173,7 +170,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -200,7 +196,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -227,7 +222,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -254,7 +248,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 133a5113101a..1810b5a035c1 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -76,7 +76,6 @@ public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 220c2ba3b1a1..8417192b7e2d 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -67,7 +67,6 @@ public void setUsername(String username) { this.username = username; } - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { this.singleRefType = singleRefType; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java index 686d838b0cb9..b6a44a024b77 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java @@ -49,7 +49,7 @@ public class Animal { protected String className; public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; + protected String color = "red"; public Animal() { } @@ -79,7 +79,6 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { this.color = color; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java index 085f248e13ca..b834e6c87617 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -82,7 +82,6 @@ public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -116,7 +115,6 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java index eace91d32b31..676127450797 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java @@ -82,7 +82,6 @@ public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; @@ -108,7 +107,6 @@ public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; @@ -134,7 +132,6 @@ public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; @@ -160,7 +157,6 @@ public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; @@ -186,7 +182,6 @@ public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java index 6276f76cbd37..f3c09fefafaa 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Category name(String name) { this.name = name; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java index f709cd80b8e1..c8d0006392b2 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -139,7 +139,6 @@ public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java index 716d2bca80f8..25f20bd693a0 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -243,7 +243,6 @@ public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; @@ -269,7 +268,6 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; @@ -295,7 +293,6 @@ public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; @@ -321,7 +318,6 @@ public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); @@ -355,7 +351,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = JsonNullable.of(outerEnum); } - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; @@ -381,7 +376,6 @@ public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; @@ -407,7 +401,6 @@ public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue this.outerEnumDefaultValue = outerEnumDefaultValue; } - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index a254b62d8726..cd92b0ebc594 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -70,7 +70,6 @@ public void setSomeId(BigDecimal someId) { this.someId = someId; } - public FakeBigDecimalMap200Response someMap(Map someMap) { this.someMap = someMap; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 94b9aa8c47b0..d76c116209c2 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -70,7 +70,6 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { this.files = files; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java index 8e813ac8d389..9e7ef21e437d 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -130,7 +130,6 @@ public void setInteger(Integer integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { this.int32 = int32; @@ -158,7 +157,6 @@ public void setInt32(Integer int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { this.int64 = int64; @@ -184,7 +182,6 @@ public void setInt64(Long int64) { this.int64 = int64; } - public FormatTest number(BigDecimal number) { this.number = number; @@ -212,7 +209,6 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { this._float = _float; @@ -240,7 +236,6 @@ public void setFloat(Float _float) { this._float = _float; } - public FormatTest _double(Double _double) { this._double = _double; @@ -268,7 +263,6 @@ public void setDouble(Double _double) { this._double = _double; } - public FormatTest decimal(BigDecimal decimal) { this.decimal = decimal; @@ -294,7 +288,6 @@ public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } - public FormatTest string(String string) { this.string = string; @@ -320,7 +313,6 @@ public void setString(String string) { this.string = string; } - public FormatTest _byte(byte[] _byte) { this._byte = _byte; @@ -346,7 +338,6 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(File binary) { this.binary = binary; @@ -372,7 +363,6 @@ public void setBinary(File binary) { this.binary = binary; } - public FormatTest date(LocalDate date) { this.date = date; @@ -398,7 +388,6 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -424,7 +413,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { this.uuid = uuid; @@ -450,7 +438,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public FormatTest password(String password) { this.password = password; @@ -476,7 +463,6 @@ public void setPassword(String password) { this.password = password; } - public FormatTest patternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; @@ -502,7 +488,6 @@ public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index c0d039bc95f1..df9817e994bf 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -41,7 +41,9 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public HasOnlyReadOnly( @JsonProperty(JSON_PROPERTY_BAR) String bar, @@ -66,7 +68,6 @@ public String getBar() { - /** * Get foo * @return foo diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java index ee19e5300f0a..f92f2dd78ca7 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java @@ -119,7 +119,6 @@ public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; @@ -153,7 +152,6 @@ public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { this.directMap = directMap; @@ -187,7 +185,6 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9590b79ddd30..2e7be2f757e2 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -75,7 +75,6 @@ public void setUuid(UUID uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; @@ -101,7 +100,6 @@ public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java index d03369c5dff5..ed6d620c7aa4 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java @@ -67,7 +67,6 @@ public void setName(Integer name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 9f704484bfd2..a50edcc17615 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -71,7 +71,6 @@ public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(String type) { this.type = type; @@ -97,7 +96,6 @@ public void setType(String type) { this.type = type; } - public ModelApiResponse message(String message) { this.message = message; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java index c496a00abb89..8b7d774a9f09 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java @@ -48,7 +48,9 @@ public class Name { public Name() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public Name( @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, @@ -84,7 +86,6 @@ public void setName(Integer name) { this.name = name; } - /** * Get snakeCase * @return snakeCase @@ -99,7 +100,6 @@ public Integer getSnakeCase() { - public Name property(String property) { this.property = property; @@ -125,7 +125,6 @@ public void setProperty(String property) { this.property = property; } - /** * Get _123number * @return _123number diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NullableClass.java index 1510a46024d4..6843952a25c6 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NullableClass.java @@ -127,7 +127,6 @@ public void setIntegerProp(Integer integerProp) { this.integerProp = JsonNullable.of(integerProp); } - public NullableClass numberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); @@ -161,7 +160,6 @@ public void setNumberProp(BigDecimal numberProp) { this.numberProp = JsonNullable.of(numberProp); } - public NullableClass booleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); @@ -195,7 +193,6 @@ public void setBooleanProp(Boolean booleanProp) { this.booleanProp = JsonNullable.of(booleanProp); } - public NullableClass stringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); @@ -229,7 +226,6 @@ public void setStringProp(String stringProp) { this.stringProp = JsonNullable.of(stringProp); } - public NullableClass dateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); @@ -263,7 +259,6 @@ public void setDateProp(LocalDate dateProp) { this.dateProp = JsonNullable.of(dateProp); } - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); @@ -297,7 +292,6 @@ public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = JsonNullable.of(datetimeProp); } - public NullableClass arrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); @@ -343,7 +337,6 @@ public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); } - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); @@ -389,7 +382,6 @@ public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); } - public NullableClass arrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; @@ -423,7 +415,6 @@ public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } - public NullableClass objectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); @@ -469,7 +460,6 @@ public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = JsonNullable.>of(objectNullableProp); } - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); @@ -515,7 +505,6 @@ public void setObjectAndItemsNullableProp(Map objectAndItemsNull this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); } - public NullableClass objectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 2dc51d40f65c..7417f56d15a0 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -79,7 +79,6 @@ public void setUuid(String uuid) { this.uuid = uuid; } - public ObjectWithDeprecatedFields id(BigDecimal id) { this.id = id; @@ -107,7 +106,6 @@ public void setId(BigDecimal id) { this.id = id; } - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -135,7 +133,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java index 39763d34d3a8..460999a479a4 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java @@ -120,7 +120,6 @@ public void setId(Long id) { this.id = id; } - public Order petId(Long petId) { this.petId = petId; @@ -146,7 +145,6 @@ public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Integer quantity) { this.quantity = quantity; @@ -172,7 +170,6 @@ public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; @@ -198,7 +195,6 @@ public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { this.status = status; @@ -224,7 +220,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - public Order complete(Boolean complete) { this.complete = complete; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java index 71a7e405ad91..9a4a6ca10d07 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -71,7 +71,6 @@ public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { this.myString = myString; @@ -97,7 +96,6 @@ public void setMyString(String myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 75ce8d2d540d..616e2c1b5374 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -85,7 +85,7 @@ public static TypeEnum fromValue(String value) { protected TypeEnum type; public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; - private JsonNullable nullableProperty = JsonNullable.undefined(); + protected JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { } @@ -115,7 +115,6 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { this.nullableProperty = JsonNullable.of(nullableProperty); diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java index 10720faacb43..6e61d54d8673 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java @@ -127,7 +127,6 @@ public void setId(Long id) { this.id = id; } - public Pet category(Category category) { this.category = category; @@ -153,7 +152,6 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { this.name = name; @@ -179,7 +177,6 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; @@ -214,7 +211,6 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { this.tags = tags; @@ -248,7 +244,6 @@ public void setTags(List tags) { this.tags = tags; } - public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index cd1a62e24e0e..630a96f5f512 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -40,7 +40,9 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - + /** + * Constructor with only readonly parameters + */ @JsonCreator public ReadOnlyFirst( @JsonProperty(JSON_PROPERTY_BAR) String bar @@ -63,7 +65,6 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { this.baz = baz; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java index 85abf11df318..9145e5deea22 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public void setId(Long id) { this.id = id; } - public Tag name(String name) { this.name = name; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java index c412c56bcc2d..0523f7495459 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java @@ -90,7 +90,6 @@ public void setId(Long id) { this.id = id; } - public User username(String username) { this.username = username; @@ -116,7 +115,6 @@ public void setUsername(String username) { this.username = username; } - public User firstName(String firstName) { this.firstName = firstName; @@ -142,7 +140,6 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(String lastName) { this.lastName = lastName; @@ -168,7 +165,6 @@ public void setLastName(String lastName) { this.lastName = lastName; } - public User email(String email) { this.email = email; @@ -194,7 +190,6 @@ public void setEmail(String email) { this.email = email; } - public User password(String password) { this.password = password; @@ -220,7 +215,6 @@ public void setPassword(String password) { this.password = password; } - public User phone(String phone) { this.phone = phone; @@ -246,7 +240,6 @@ public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { this.userStatus = userStatus; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES index ec822fdd8838..8d58dbc93e12 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES @@ -63,6 +63,7 @@ docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh phpunit.xml.dist +src/ApiException.php src/Api/AnotherFakeApi.php src/Api/DefaultApi.php src/Api/FakeApi.php @@ -70,7 +71,6 @@ src/Api/FakeClassnameTags123Api.php src/Api/PetApi.php src/Api/StoreApi.php src/Api/UserApi.php -src/ApiException.php src/Configuration.php src/HeaderSelector.php src/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/lib/ObjectSerializer.php index 55a2501c101a..e3e49406733f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/lib/ObjectSerializer.php @@ -396,7 +396,6 @@ public static function serializeCollection(array $collection, $style, $allowColl * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used * * @return object|array|null a single or an array of $class instances */ diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist index 1135449a8d9b..cba878f52707 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist @@ -2,8 +2,8 @@ - ./src/Api - ./src/Model + ./src\/Api + ./src\/Model diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php index 01ba2309ca5b..de473b59f448 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php @@ -386,7 +386,6 @@ public static function serializeCollection(array $collection, string $style, boo * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[]|null $httpHeaders HTTP headers - * @param string|null $discriminator discriminator if polymorphism is used * * @return mixed a single or an array of $class instances */ diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index 80ecc7a7237f..64737d51568c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -60,6 +60,7 @@ docs/Model/Tag.md docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh +lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -67,7 +68,6 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php -lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php lib/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index f806641452d8..050aa4959c0c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -396,7 +396,6 @@ public static function serializeCollection(array $collection, $style, $allowColl * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used * * @return object|array|null a single or an array of $class instances */ diff --git a/samples/client/petstore/php/psr-18/.openapi-generator/FILES b/samples/client/petstore/php/psr-18/.openapi-generator/FILES index 34aee01b39f6..c3884202a79d 100644 --- a/samples/client/petstore/php/psr-18/.openapi-generator/FILES +++ b/samples/client/petstore/php/psr-18/.openapi-generator/FILES @@ -60,6 +60,7 @@ docs/Model/Tag.md docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh +lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -67,7 +68,6 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php -lib/ApiException.php lib/Configuration.php lib/DebugPlugin.php lib/HeaderSelector.php diff --git a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php index f806641452d8..050aa4959c0c 100644 --- a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php @@ -396,7 +396,6 @@ public static function serializeCollection(array $collection, $style, $allowColl * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used * * @return object|array|null a single or an array of $class instances */ diff --git a/samples/client/petstore/typescript-node/npm/package.json b/samples/client/petstore/typescript-node/npm/package.json index ad36a8f82955..5f9c28d342d8 100644 --- a/samples/client/petstore/typescript-node/npm/package.json +++ b/samples/client/petstore/typescript-node/npm/package.json @@ -16,9 +16,8 @@ "author": "OpenAPI-Generator Contributors", "license": "Unlicense", "dependencies": { - "bluebird": "^3.5.0", - "request": "^2.81.0", - "rewire": "^3.0.2" + "bluebird": "^3.7.2", + "request": "^2.88.2" }, "devDependencies": { "@types/bluebird": "^3.5.33", diff --git a/samples/documentation/html2/.openapi-generator/VERSION b/samples/documentation/html2/.openapi-generator/VERSION index c9e125ba1880..08bfd0643b8c 100644 --- a/samples/documentation/html2/.openapi-generator/VERSION +++ b/samples/documentation/html2/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/samples/documentation/html2/index.html b/samples/documentation/html2/index.html index 110cc439a087..fb2e49b8649d 100644 --- a/samples/documentation/html2/index.html +++ b/samples/documentation/html2/index.html @@ -1530,41 +1530,58 @@

-
-
- -
- +
+
+
+ +

@@ -1587,6 +1604,46 @@

+
+
+ +
+ +
@@ -1968,6 +2025,46 @@

+
+
+ +
+ +
@@ -2319,41 +2416,64 @@

-
-
- -
- +
+
+
+ +

@@ -2376,6 +2496,46 @@

+
+
+ +
+ +
@@ -2727,41 +2887,64 @@

-
-
- -
- +
+
+
+ +

@@ -2784,6 +2967,46 @@

+
+
+ +
+ +
@@ -3147,41 +3370,58 @@

-
-
- -
- +
+
+
+ +

@@ -3204,6 +3444,46 @@

+
+
+ +
+ +

@@ -3226,6 +3506,46 @@

+
+
+ +
+ +
@@ -3640,41 +3960,58 @@

-
-
- -
- +
+
+
+ +

@@ -3697,6 +4034,46 @@

+
+
+ +
+ +

@@ -3719,6 +4096,46 @@

+
+
+ +
+ +

@@ -3741,6 +4158,46 @@

+
+
+ +
+ +
@@ -4157,6 +4614,46 @@

+
+
+ +
+ +
@@ -4591,41 +5088,53 @@

-
-
- -
- +
+
+
+ +
@@ -4934,6 +5443,46 @@

+
+
+ +
+ +

@@ -4956,6 +5505,46 @@

+
+
+ +
+ +
@@ -5275,41 +5864,57 @@

-
-
- -
- +
+
+
+ +
@@ -5633,41 +6238,58 @@

-
-
- -
- +
+
+
+ +

@@ -5690,6 +6312,46 @@

+
+
+ +
+ +

@@ -5712,6 +6374,46 @@

+
+
+ +
+ +
@@ -6058,41 +6760,58 @@

-
-
- -
- +
+
+
+ +

@@ -6115,6 +6834,46 @@

+
+
+ +
+ +
@@ -6491,6 +7250,46 @@

+
+
+ +
+ +
@@ -6867,6 +7666,46 @@

+
+
+ +
+ +
@@ -7243,6 +8082,46 @@

+
+
+ +
+ +
@@ -7588,6 +8467,46 @@

+
+
+ +
+ +

@@ -7610,6 +8529,46 @@

+
+
+ +
+ +
@@ -7930,41 +8889,58 @@

-
-
- -
- +
+
+
+ +

@@ -7987,6 +8963,46 @@

+
+
+ +
+ +

@@ -8009,6 +9025,46 @@

+
+
+ +
+ +
@@ -8366,41 +9422,87 @@

-
-
- -
- +
+
+
+ +
@@ -8410,7 +9512,7 @@

- + @@ -8451,6 +9553,46 @@

+
+
+ +
+ +
@@ -8755,6 +9897,46 @@

+
+
+ +
+ +
@@ -9169,6 +10351,46 @@

+
+
+ +
+ +

@@ -9191,6 +10413,46 @@

+
+
+ +
+ +
diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesAnyType.md b/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesAnyType.md index a47fbd732607..314cba3a614c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesAnyType.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesAnyType.md @@ -22,7 +22,7 @@ print(AdditionalPropertiesAnyType.to_json()) # convert the object into a dict additional_properties_any_type_dict = additional_properties_any_type_instance.to_dict() # create an instance of AdditionalPropertiesAnyType from a dict -additional_properties_any_type_form_dict = additional_properties_any_type.from_dict(additional_properties_any_type_dict) +additional_properties_any_type_from_dict = AdditionalPropertiesAnyType.from_dict(additional_properties_any_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesClass.md index a19d1b338e68..8d4c08707f55 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesClass.md @@ -23,7 +23,7 @@ print(AdditionalPropertiesClass.to_json()) # convert the object into a dict additional_properties_class_dict = additional_properties_class_instance.to_dict() # create an instance of AdditionalPropertiesClass from a dict -additional_properties_class_form_dict = additional_properties_class.from_dict(additional_properties_class_dict) +additional_properties_class_from_dict = AdditionalPropertiesClass.from_dict(additional_properties_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesObject.md b/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesObject.md index f9c516ee9b6b..d647ec64896f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesObject.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesObject.md @@ -22,7 +22,7 @@ print(AdditionalPropertiesObject.to_json()) # convert the object into a dict additional_properties_object_dict = additional_properties_object_instance.to_dict() # create an instance of AdditionalPropertiesObject from a dict -additional_properties_object_form_dict = additional_properties_object.from_dict(additional_properties_object_dict) +additional_properties_object_from_dict = AdditionalPropertiesObject.from_dict(additional_properties_object_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesWithDescriptionOnly.md b/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesWithDescriptionOnly.md index 3dbb9c6f3e9b..061f5524872b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesWithDescriptionOnly.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/AdditionalPropertiesWithDescriptionOnly.md @@ -22,7 +22,7 @@ print(AdditionalPropertiesWithDescriptionOnly.to_json()) # convert the object into a dict additional_properties_with_description_only_dict = additional_properties_with_description_only_instance.to_dict() # create an instance of AdditionalPropertiesWithDescriptionOnly from a dict -additional_properties_with_description_only_form_dict = additional_properties_with_description_only.from_dict(additional_properties_with_description_only_dict) +additional_properties_with_description_only_from_dict = AdditionalPropertiesWithDescriptionOnly.from_dict(additional_properties_with_description_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/AllOfSuperModel.md b/samples/openapi3/client/petstore/python-aiohttp/docs/AllOfSuperModel.md index 1262bd9dc51f..421a1527f1ef 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/AllOfSuperModel.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/AllOfSuperModel.md @@ -22,7 +22,7 @@ print(AllOfSuperModel.to_json()) # convert the object into a dict all_of_super_model_dict = all_of_super_model_instance.to_dict() # create an instance of AllOfSuperModel from a dict -all_of_super_model_form_dict = all_of_super_model.from_dict(all_of_super_model_dict) +all_of_super_model_from_dict = AllOfSuperModel.from_dict(all_of_super_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/python-aiohttp/docs/AllOfWithSingleRef.md index 6c2860c02f5f..203a4b5da3d5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/AllOfWithSingleRef.md @@ -23,7 +23,7 @@ print(AllOfWithSingleRef.to_json()) # convert the object into a dict all_of_with_single_ref_dict = all_of_with_single_ref_instance.to_dict() # create an instance of AllOfWithSingleRef from a dict -all_of_with_single_ref_form_dict = all_of_with_single_ref.from_dict(all_of_with_single_ref_dict) +all_of_with_single_ref_from_dict = AllOfWithSingleRef.from_dict(all_of_with_single_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Animal.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Animal.md index 4c693f09e5ff..381d27b66e44 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Animal.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Animal.md @@ -23,7 +23,7 @@ print(Animal.to_json()) # convert the object into a dict animal_dict = animal_instance.to_dict() # create an instance of Animal from a dict -animal_form_dict = animal.from_dict(animal_dict) +animal_from_dict = Animal.from_dict(animal_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/AnyOfColor.md b/samples/openapi3/client/petstore/python-aiohttp/docs/AnyOfColor.md index ccaf51ce9fe0..6ed75dd7b48a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/AnyOfColor.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/AnyOfColor.md @@ -22,7 +22,7 @@ print(AnyOfColor.to_json()) # convert the object into a dict any_of_color_dict = any_of_color_instance.to_dict() # create an instance of AnyOfColor from a dict -any_of_color_form_dict = any_of_color.from_dict(any_of_color_dict) +any_of_color_from_dict = AnyOfColor.from_dict(any_of_color_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/AnyOfPig.md b/samples/openapi3/client/petstore/python-aiohttp/docs/AnyOfPig.md index 52109d6670cd..9367e2261898 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/AnyOfPig.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/AnyOfPig.md @@ -24,7 +24,7 @@ print(AnyOfPig.to_json()) # convert the object into a dict any_of_pig_dict = any_of_pig_instance.to_dict() # create an instance of AnyOfPig from a dict -any_of_pig_form_dict = any_of_pig.from_dict(any_of_pig_dict) +any_of_pig_from_dict = AnyOfPig.from_dict(any_of_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfArrayOfModel.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfArrayOfModel.md index 1cd9c367b262..f866863d53f9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfArrayOfModel.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfArrayOfModel.md @@ -22,7 +22,7 @@ print(ArrayOfArrayOfModel.to_json()) # convert the object into a dict array_of_array_of_model_dict = array_of_array_of_model_instance.to_dict() # create an instance of ArrayOfArrayOfModel from a dict -array_of_array_of_model_form_dict = array_of_array_of_model.from_dict(array_of_array_of_model_dict) +array_of_array_of_model_from_dict = ArrayOfArrayOfModel.from_dict(array_of_array_of_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfArrayOfNumberOnly.md index 3ad18d346f6b..32bd2dfbf1e2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfArrayOfNumberOnly.md @@ -22,7 +22,7 @@ print(ArrayOfArrayOfNumberOnly.to_json()) # convert the object into a dict array_of_array_of_number_only_dict = array_of_array_of_number_only_instance.to_dict() # create an instance of ArrayOfArrayOfNumberOnly from a dict -array_of_array_of_number_only_form_dict = array_of_array_of_number_only.from_dict(array_of_array_of_number_only_dict) +array_of_array_of_number_only_from_dict = ArrayOfArrayOfNumberOnly.from_dict(array_of_array_of_number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfNumberOnly.md index a606e3a54bba..b814d7594942 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayOfNumberOnly.md @@ -22,7 +22,7 @@ print(ArrayOfNumberOnly.to_json()) # convert the object into a dict array_of_number_only_dict = array_of_number_only_instance.to_dict() # create an instance of ArrayOfNumberOnly from a dict -array_of_number_only_form_dict = array_of_number_only.from_dict(array_of_number_only_dict) +array_of_number_only_from_dict = ArrayOfNumberOnly.from_dict(array_of_number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md index a673e8a2893e..ed871fae662d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md @@ -25,7 +25,7 @@ print(ArrayTest.to_json()) # convert the object into a dict array_test_dict = array_test_instance.to_dict() # create an instance of ArrayTest from a dict -array_test_form_dict = array_test.from_dict(array_test_dict) +array_test_from_dict = ArrayTest.from_dict(array_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/BasquePig.md b/samples/openapi3/client/petstore/python-aiohttp/docs/BasquePig.md index aa3b3d28b3eb..ee28d628722f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/BasquePig.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/BasquePig.md @@ -23,7 +23,7 @@ print(BasquePig.to_json()) # convert the object into a dict basque_pig_dict = basque_pig_instance.to_dict() # create an instance of BasquePig from a dict -basque_pig_form_dict = basque_pig.from_dict(basque_pig_dict) +basque_pig_from_dict = BasquePig.from_dict(basque_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Bathing.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Bathing.md index bb8d40ac8ab5..6ad70e2f67cc 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Bathing.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Bathing.md @@ -24,7 +24,7 @@ print(Bathing.to_json()) # convert the object into a dict bathing_dict = bathing_instance.to_dict() # create an instance of Bathing from a dict -bathing_form_dict = bathing.from_dict(bathing_dict) +bathing_from_dict = Bathing.from_dict(bathing_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Capitalization.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Capitalization.md index 7f1a36413d56..6f564a8ed8c9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Capitalization.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Capitalization.md @@ -27,7 +27,7 @@ print(Capitalization.to_json()) # convert the object into a dict capitalization_dict = capitalization_instance.to_dict() # create an instance of Capitalization from a dict -capitalization_form_dict = capitalization.from_dict(capitalization_dict) +capitalization_from_dict = Capitalization.from_dict(capitalization_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Cat.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Cat.md index a2d4b88805f6..d0e39efdb33e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Cat.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Cat.md @@ -22,7 +22,7 @@ print(Cat.to_json()) # convert the object into a dict cat_dict = cat_instance.to_dict() # create an instance of Cat from a dict -cat_form_dict = cat.from_dict(cat_dict) +cat_from_dict = Cat.from_dict(cat_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Category.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Category.md index 24160009af4b..dbde14b7344c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Category.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Category.md @@ -23,7 +23,7 @@ print(Category.to_json()) # convert the object into a dict category_dict = category_instance.to_dict() # create an instance of Category from a dict -category_form_dict = category.from_dict(category_dict) +category_from_dict = Category.from_dict(category_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/CircularAllOfRef.md b/samples/openapi3/client/petstore/python-aiohttp/docs/CircularAllOfRef.md index a00be37d4d19..65b171177e58 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/CircularAllOfRef.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/CircularAllOfRef.md @@ -23,7 +23,7 @@ print(CircularAllOfRef.to_json()) # convert the object into a dict circular_all_of_ref_dict = circular_all_of_ref_instance.to_dict() # create an instance of CircularAllOfRef from a dict -circular_all_of_ref_form_dict = circular_all_of_ref.from_dict(circular_all_of_ref_dict) +circular_all_of_ref_from_dict = CircularAllOfRef.from_dict(circular_all_of_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/CircularReferenceModel.md b/samples/openapi3/client/petstore/python-aiohttp/docs/CircularReferenceModel.md index 6695d4a7613b..87216f7273ab 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/CircularReferenceModel.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/CircularReferenceModel.md @@ -23,7 +23,7 @@ print(CircularReferenceModel.to_json()) # convert the object into a dict circular_reference_model_dict = circular_reference_model_instance.to_dict() # create an instance of CircularReferenceModel from a dict -circular_reference_model_form_dict = circular_reference_model.from_dict(circular_reference_model_dict) +circular_reference_model_from_dict = CircularReferenceModel.from_dict(circular_reference_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ClassModel.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ClassModel.md index 25351614fa43..ea76a5c157bf 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ClassModel.md @@ -23,7 +23,7 @@ print(ClassModel.to_json()) # convert the object into a dict class_model_dict = class_model_instance.to_dict() # create an instance of ClassModel from a dict -class_model_form_dict = class_model.from_dict(class_model_dict) +class_model_from_dict = ClassModel.from_dict(class_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Client.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Client.md index b601737b02f1..22321c189150 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Client.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Client.md @@ -22,7 +22,7 @@ print(Client.to_json()) # convert the object into a dict client_dict = client_instance.to_dict() # create an instance of Client from a dict -client_form_dict = client.from_dict(client_dict) +client_from_dict = Client.from_dict(client_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Color.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Color.md index 9bd63f91d7c1..9ac3ab2e91f4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Color.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Color.md @@ -22,7 +22,7 @@ print(Color.to_json()) # convert the object into a dict color_dict = color_instance.to_dict() # create an instance of Color from a dict -color_form_dict = color.from_dict(color_dict) +color_from_dict = Color.from_dict(color_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Creature.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Creature.md index fa1ec65401bd..a4710214c198 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Creature.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Creature.md @@ -23,7 +23,7 @@ print(Creature.to_json()) # convert the object into a dict creature_dict = creature_instance.to_dict() # create an instance of Creature from a dict -creature_form_dict = creature.from_dict(creature_dict) +creature_from_dict = Creature.from_dict(creature_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/CreatureInfo.md b/samples/openapi3/client/petstore/python-aiohttp/docs/CreatureInfo.md index fe4ab81a8071..db3b82bb9ff5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/CreatureInfo.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/CreatureInfo.md @@ -22,7 +22,7 @@ print(CreatureInfo.to_json()) # convert the object into a dict creature_info_dict = creature_info_instance.to_dict() # create an instance of CreatureInfo from a dict -creature_info_form_dict = creature_info.from_dict(creature_info_dict) +creature_info_from_dict = CreatureInfo.from_dict(creature_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/DanishPig.md b/samples/openapi3/client/petstore/python-aiohttp/docs/DanishPig.md index 6aef777ffe06..16941388832a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/DanishPig.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/DanishPig.md @@ -23,7 +23,7 @@ print(DanishPig.to_json()) # convert the object into a dict danish_pig_dict = danish_pig_instance.to_dict() # create an instance of DanishPig from a dict -danish_pig_form_dict = danish_pig.from_dict(danish_pig_dict) +danish_pig_from_dict = DanishPig.from_dict(danish_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/DeprecatedObject.md b/samples/openapi3/client/petstore/python-aiohttp/docs/DeprecatedObject.md index 5de685050ffc..6b362f379ba4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/DeprecatedObject.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/DeprecatedObject.md @@ -22,7 +22,7 @@ print(DeprecatedObject.to_json()) # convert the object into a dict deprecated_object_dict = deprecated_object_instance.to_dict() # create an instance of DeprecatedObject from a dict -deprecated_object_form_dict = deprecated_object.from_dict(deprecated_object_dict) +deprecated_object_from_dict = DeprecatedObject.from_dict(deprecated_object_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/DiscriminatorAllOfSub.md b/samples/openapi3/client/petstore/python-aiohttp/docs/DiscriminatorAllOfSub.md index e7cd36010f5b..f72b6e8e68ca 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/DiscriminatorAllOfSub.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/DiscriminatorAllOfSub.md @@ -21,7 +21,7 @@ print(DiscriminatorAllOfSub.to_json()) # convert the object into a dict discriminator_all_of_sub_dict = discriminator_all_of_sub_instance.to_dict() # create an instance of DiscriminatorAllOfSub from a dict -discriminator_all_of_sub_form_dict = discriminator_all_of_sub.from_dict(discriminator_all_of_sub_dict) +discriminator_all_of_sub_from_dict = DiscriminatorAllOfSub.from_dict(discriminator_all_of_sub_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/DiscriminatorAllOfSuper.md b/samples/openapi3/client/petstore/python-aiohttp/docs/DiscriminatorAllOfSuper.md index 4859a9a6d40b..477c05bfc446 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/DiscriminatorAllOfSuper.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/DiscriminatorAllOfSuper.md @@ -22,7 +22,7 @@ print(DiscriminatorAllOfSuper.to_json()) # convert the object into a dict discriminator_all_of_super_dict = discriminator_all_of_super_instance.to_dict() # create an instance of DiscriminatorAllOfSuper from a dict -discriminator_all_of_super_form_dict = discriminator_all_of_super.from_dict(discriminator_all_of_super_dict) +discriminator_all_of_super_from_dict = DiscriminatorAllOfSuper.from_dict(discriminator_all_of_super_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Dog.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Dog.md index ecb205929573..ed23f613d01d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Dog.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Dog.md @@ -22,7 +22,7 @@ print(Dog.to_json()) # convert the object into a dict dog_dict = dog_instance.to_dict() # create an instance of Dog from a dict -dog_form_dict = dog.from_dict(dog_dict) +dog_from_dict = Dog.from_dict(dog_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/DummyModel.md b/samples/openapi3/client/petstore/python-aiohttp/docs/DummyModel.md index 21a59bef1bfd..01b675977f58 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/DummyModel.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/DummyModel.md @@ -23,7 +23,7 @@ print(DummyModel.to_json()) # convert the object into a dict dummy_model_dict = dummy_model_instance.to_dict() # create an instance of DummyModel from a dict -dummy_model_form_dict = dummy_model.from_dict(dummy_model_dict) +dummy_model_from_dict = DummyModel.from_dict(dummy_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/EnumArrays.md b/samples/openapi3/client/petstore/python-aiohttp/docs/EnumArrays.md index 6a5293dfcc69..f44617497bce 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/EnumArrays.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/EnumArrays.md @@ -23,7 +23,7 @@ print(EnumArrays.to_json()) # convert the object into a dict enum_arrays_dict = enum_arrays_instance.to_dict() # create an instance of EnumArrays from a dict -enum_arrays_form_dict = enum_arrays.from_dict(enum_arrays_dict) +enum_arrays_from_dict = EnumArrays.from_dict(enum_arrays_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/EnumTest.md b/samples/openapi3/client/petstore/python-aiohttp/docs/EnumTest.md index 494a4d054f06..d875c67604cf 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/EnumTest.md @@ -30,7 +30,7 @@ print(EnumTest.to_json()) # convert the object into a dict enum_test_dict = enum_test_instance.to_dict() # create an instance of EnumTest from a dict -enum_test_form_dict = enum_test.from_dict(enum_test_dict) +enum_test_from_dict = EnumTest.from_dict(enum_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md index 83d1c1d37d4c..a04e01c3df64 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md @@ -632,7 +632,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fake_property_enum_integer_serialize** -> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property) +> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param) @@ -643,6 +643,7 @@ Test serialization of enum (int) properties with examples ```python import petstore_api +from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.rest import ApiException from pprint import pprint @@ -659,9 +660,10 @@ async with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) outer_object_with_enum_property = petstore_api.OuterObjectWithEnumProperty() # OuterObjectWithEnumProperty | Input enum (int) as post body + param = [petstore_api.OuterEnumInteger()] # List[OuterEnumInteger] | (optional) try: - api_response = await api_instance.fake_property_enum_integer_serialize(outer_object_with_enum_property) + api_response = await api_instance.fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param) print("The response of FakeApi->fake_property_enum_integer_serialize:\n") pprint(api_response) except Exception as e: @@ -676,6 +678,7 @@ async with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **outer_object_with_enum_property** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **param** | [**List[OuterEnumInteger]**](OuterEnumInteger.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Feeding.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Feeding.md index 7d1e83627dde..9f92b5d964d3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Feeding.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Feeding.md @@ -24,7 +24,7 @@ print(Feeding.to_json()) # convert the object into a dict feeding_dict = feeding_instance.to_dict() # create an instance of Feeding from a dict -feeding_form_dict = feeding.from_dict(feeding_dict) +feeding_from_dict = Feeding.from_dict(feeding_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/File.md b/samples/openapi3/client/petstore/python-aiohttp/docs/File.md index 1b03d58761cb..23f0567411ce 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/File.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/File.md @@ -23,7 +23,7 @@ print(File.to_json()) # convert the object into a dict file_dict = file_instance.to_dict() # create an instance of File from a dict -file_form_dict = file.from_dict(file_dict) +file_from_dict = File.from_dict(file_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FileSchemaTestClass.md index 26a1758abfeb..e1118042a8ec 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/FileSchemaTestClass.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FileSchemaTestClass.md @@ -23,7 +23,7 @@ print(FileSchemaTestClass.to_json()) # convert the object into a dict file_schema_test_class_dict = file_schema_test_class_instance.to_dict() # create an instance of FileSchemaTestClass from a dict -file_schema_test_class_form_dict = file_schema_test_class.from_dict(file_schema_test_class_dict) +file_schema_test_class_from_dict = FileSchemaTestClass.from_dict(file_schema_test_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FirstRef.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FirstRef.md index 5092de432d39..94b8ddc5ac22 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/FirstRef.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FirstRef.md @@ -23,7 +23,7 @@ print(FirstRef.to_json()) # convert the object into a dict first_ref_dict = first_ref_instance.to_dict() # create an instance of FirstRef from a dict -first_ref_form_dict = first_ref.from_dict(first_ref_dict) +first_ref_from_dict = FirstRef.from_dict(first_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Foo.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Foo.md index 020b8d75b76a..f635b0daa6db 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Foo.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Foo.md @@ -22,7 +22,7 @@ print(Foo.to_json()) # convert the object into a dict foo_dict = foo_instance.to_dict() # create an instance of Foo from a dict -foo_form_dict = foo.from_dict(foo_dict) +foo_from_dict = Foo.from_dict(foo_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FooGetDefaultResponse.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FooGetDefaultResponse.md index 755c3232bbf2..8d84f795b00a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/FooGetDefaultResponse.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FooGetDefaultResponse.md @@ -22,7 +22,7 @@ print(FooGetDefaultResponse.to_json()) # convert the object into a dict foo_get_default_response_dict = foo_get_default_response_instance.to_dict() # create an instance of FooGetDefaultResponse from a dict -foo_get_default_response_form_dict = foo_get_default_response.from_dict(foo_get_default_response_dict) +foo_get_default_response_from_dict = FooGetDefaultResponse.from_dict(foo_get_default_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FormatTest.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FormatTest.md index 3b2f44457f18..6be7fc017577 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FormatTest.md @@ -38,7 +38,7 @@ print(FormatTest.to_json()) # convert the object into a dict format_test_dict = format_test_instance.to_dict() # create an instance of FormatTest from a dict -format_test_form_dict = format_test.from_dict(format_test_dict) +format_test_from_dict = FormatTest.from_dict(format_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python-aiohttp/docs/HasOnlyReadOnly.md index 00d2af2fd330..fdc48781b15a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/HasOnlyReadOnly.md @@ -23,7 +23,7 @@ print(HasOnlyReadOnly.to_json()) # convert the object into a dict has_only_read_only_dict = has_only_read_only_instance.to_dict() # create an instance of HasOnlyReadOnly from a dict -has_only_read_only_form_dict = has_only_read_only.from_dict(has_only_read_only_dict) +has_only_read_only_from_dict = HasOnlyReadOnly.from_dict(has_only_read_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/python-aiohttp/docs/HealthCheckResult.md index d32450f4c2ea..d4a2b187167f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/HealthCheckResult.md @@ -23,7 +23,7 @@ print(HealthCheckResult.to_json()) # convert the object into a dict health_check_result_dict = health_check_result_instance.to_dict() # create an instance of HealthCheckResult from a dict -health_check_result_form_dict = health_check_result.from_dict(health_check_result_dict) +health_check_result_from_dict = HealthCheckResult.from_dict(health_check_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/InnerDictWithProperty.md b/samples/openapi3/client/petstore/python-aiohttp/docs/InnerDictWithProperty.md index efd91b13f3a5..7b82ebb770b8 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/InnerDictWithProperty.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/InnerDictWithProperty.md @@ -22,7 +22,7 @@ print(InnerDictWithProperty.to_json()) # convert the object into a dict inner_dict_with_property_dict = inner_dict_with_property_instance.to_dict() # create an instance of InnerDictWithProperty from a dict -inner_dict_with_property_form_dict = inner_dict_with_property.from_dict(inner_dict_with_property_dict) +inner_dict_with_property_from_dict = InnerDictWithProperty.from_dict(inner_dict_with_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/InputAllOf.md b/samples/openapi3/client/petstore/python-aiohttp/docs/InputAllOf.md index 7d6404e3f27e..45298f5308fc 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/InputAllOf.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/InputAllOf.md @@ -22,7 +22,7 @@ print(InputAllOf.to_json()) # convert the object into a dict input_all_of_dict = input_all_of_instance.to_dict() # create an instance of InputAllOf from a dict -input_all_of_form_dict = input_all_of.from_dict(input_all_of_dict) +input_all_of_from_dict = InputAllOf.from_dict(input_all_of_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/IntOrString.md b/samples/openapi3/client/petstore/python-aiohttp/docs/IntOrString.md index c2f6fd5838ee..b4070b9a8c79 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/IntOrString.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/IntOrString.md @@ -21,7 +21,7 @@ print(IntOrString.to_json()) # convert the object into a dict int_or_string_dict = int_or_string_instance.to_dict() # create an instance of IntOrString from a dict -int_or_string_form_dict = int_or_string.from_dict(int_or_string_dict) +int_or_string_from_dict = IntOrString.from_dict(int_or_string_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ListClass.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ListClass.md index 3595f39de141..01068b7d22c3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ListClass.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ListClass.md @@ -22,7 +22,7 @@ print(ListClass.to_json()) # convert the object into a dict list_class_dict = list_class_instance.to_dict() # create an instance of ListClass from a dict -list_class_form_dict = list_class.from_dict(list_class_dict) +list_class_from_dict = ListClass.from_dict(list_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/MapOfArrayOfModel.md b/samples/openapi3/client/petstore/python-aiohttp/docs/MapOfArrayOfModel.md index 2220ab1f7c45..71a4ef66b682 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/MapOfArrayOfModel.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/MapOfArrayOfModel.md @@ -22,7 +22,7 @@ print(MapOfArrayOfModel.to_json()) # convert the object into a dict map_of_array_of_model_dict = map_of_array_of_model_instance.to_dict() # create an instance of MapOfArrayOfModel from a dict -map_of_array_of_model_form_dict = map_of_array_of_model.from_dict(map_of_array_of_model_dict) +map_of_array_of_model_from_dict = MapOfArrayOfModel.from_dict(map_of_array_of_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/MapTest.md b/samples/openapi3/client/petstore/python-aiohttp/docs/MapTest.md index bd62a851e92b..d04b82e9378c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/MapTest.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/MapTest.md @@ -25,7 +25,7 @@ print(MapTest.to_json()) # convert the object into a dict map_test_dict = map_test_instance.to_dict() # create an instance of MapTest from a dict -map_test_form_dict = map_test.from_dict(map_test_dict) +map_test_from_dict = MapTest.from_dict(map_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 7cab16af1738..0dc994275d1e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -24,7 +24,7 @@ print(MixedPropertiesAndAdditionalPropertiesClass.to_json()) # convert the object into a dict mixed_properties_and_additional_properties_class_dict = mixed_properties_and_additional_properties_class_instance.to_dict() # create an instance of MixedPropertiesAndAdditionalPropertiesClass from a dict -mixed_properties_and_additional_properties_class_form_dict = mixed_properties_and_additional_properties_class.from_dict(mixed_properties_and_additional_properties_class_dict) +mixed_properties_and_additional_properties_class_from_dict = MixedPropertiesAndAdditionalPropertiesClass.from_dict(mixed_properties_and_additional_properties_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Model200Response.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Model200Response.md index 454a4fcf30a0..7fdbdefc6cec 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Model200Response.md @@ -24,7 +24,7 @@ print(Model200Response.to_json()) # convert the object into a dict model200_response_dict = model200_response_instance.to_dict() # create an instance of Model200Response from a dict -model200_response_form_dict = model200_response.from_dict(model200_response_dict) +model200_response_from_dict = Model200Response.from_dict(model200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ModelApiResponse.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ModelApiResponse.md index 8e0a033bd648..5ddc0db2a0f3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ModelApiResponse.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ModelApiResponse.md @@ -24,7 +24,7 @@ print(ModelApiResponse.to_json()) # convert the object into a dict model_api_response_dict = model_api_response_instance.to_dict() # create an instance of ModelApiResponse from a dict -model_api_response_form_dict = model_api_response.from_dict(model_api_response_dict) +model_api_response_from_dict = ModelApiResponse.from_dict(model_api_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ModelField.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ModelField.md index f5f03fd82d29..9073b5dbdb00 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ModelField.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ModelField.md @@ -22,7 +22,7 @@ print(ModelField.to_json()) # convert the object into a dict model_field_dict = model_field_instance.to_dict() # create an instance of ModelField from a dict -model_field_form_dict = model_field.from_dict(model_field_dict) +model_field_from_dict = ModelField.from_dict(model_field_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ModelReturn.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ModelReturn.md index 6b660953e1d8..7d327053b0c3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ModelReturn.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ModelReturn.md @@ -23,7 +23,7 @@ print(ModelReturn.to_json()) # convert the object into a dict model_return_dict = model_return_instance.to_dict() # create an instance of ModelReturn from a dict -model_return_form_dict = model_return.from_dict(model_return_dict) +model_return_from_dict = ModelReturn.from_dict(model_return_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Name.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Name.md index 5c5986a76d0b..5a04ec1ada06 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Name.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Name.md @@ -26,7 +26,7 @@ print(Name.to_json()) # convert the object into a dict name_dict = name_instance.to_dict() # create an instance of Name from a dict -name_form_dict = name.from_dict(name_dict) +name_from_dict = Name.from_dict(name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md b/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md index 3657d21255c4..0387dcc2c67a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md @@ -34,7 +34,7 @@ print(NullableClass.to_json()) # convert the object into a dict nullable_class_dict = nullable_class_instance.to_dict() # create an instance of NullableClass from a dict -nullable_class_form_dict = nullable_class.from_dict(nullable_class_dict) +nullable_class_from_dict = NullableClass.from_dict(nullable_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/NullableProperty.md b/samples/openapi3/client/petstore/python-aiohttp/docs/NullableProperty.md index 27ce3192f847..30edaf4844b2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/NullableProperty.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/NullableProperty.md @@ -23,7 +23,7 @@ print(NullableProperty.to_json()) # convert the object into a dict nullable_property_dict = nullable_property_instance.to_dict() # create an instance of NullableProperty from a dict -nullable_property_form_dict = nullable_property.from_dict(nullable_property_dict) +nullable_property_from_dict = NullableProperty.from_dict(nullable_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/NumberOnly.md b/samples/openapi3/client/petstore/python-aiohttp/docs/NumberOnly.md index 72e0a4bfde0b..415dd25585d4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/NumberOnly.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/NumberOnly.md @@ -22,7 +22,7 @@ print(NumberOnly.to_json()) # convert the object into a dict number_only_dict = number_only_instance.to_dict() # create an instance of NumberOnly from a dict -number_only_form_dict = number_only.from_dict(number_only_dict) +number_only_from_dict = NumberOnly.from_dict(number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ObjectToTestAdditionalProperties.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ObjectToTestAdditionalProperties.md index 5d2c76c8958e..f6bc34c98e65 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ObjectToTestAdditionalProperties.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ObjectToTestAdditionalProperties.md @@ -23,7 +23,7 @@ print(ObjectToTestAdditionalProperties.to_json()) # convert the object into a dict object_to_test_additional_properties_dict = object_to_test_additional_properties_instance.to_dict() # create an instance of ObjectToTestAdditionalProperties from a dict -object_to_test_additional_properties_form_dict = object_to_test_additional_properties.from_dict(object_to_test_additional_properties_dict) +object_to_test_additional_properties_from_dict = ObjectToTestAdditionalProperties.from_dict(object_to_test_additional_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ObjectWithDeprecatedFields.md index b1077a60b954..6dbd2ace04f1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ObjectWithDeprecatedFields.md @@ -25,7 +25,7 @@ print(ObjectWithDeprecatedFields.to_json()) # convert the object into a dict object_with_deprecated_fields_dict = object_with_deprecated_fields_instance.to_dict() # create an instance of ObjectWithDeprecatedFields from a dict -object_with_deprecated_fields_form_dict = object_with_deprecated_fields.from_dict(object_with_deprecated_fields_dict) +object_with_deprecated_fields_from_dict = ObjectWithDeprecatedFields.from_dict(object_with_deprecated_fields_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/OneOfEnumString.md b/samples/openapi3/client/petstore/python-aiohttp/docs/OneOfEnumString.md index 25fc402280f0..1d385c092934 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/OneOfEnumString.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/OneOfEnumString.md @@ -22,7 +22,7 @@ print(OneOfEnumString.to_json()) # convert the object into a dict one_of_enum_string_dict = one_of_enum_string_instance.to_dict() # create an instance of OneOfEnumString from a dict -one_of_enum_string_form_dict = one_of_enum_string.from_dict(one_of_enum_string_dict) +one_of_enum_string_from_dict = OneOfEnumString.from_dict(one_of_enum_string_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Order.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Order.md index 08b602f1669b..00526b8d04b9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Order.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Order.md @@ -27,7 +27,7 @@ print(Order.to_json()) # convert the object into a dict order_dict = order_instance.to_dict() # create an instance of Order from a dict -order_form_dict = order.from_dict(order_dict) +order_from_dict = Order.from_dict(order_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/OuterComposite.md b/samples/openapi3/client/petstore/python-aiohttp/docs/OuterComposite.md index 9d4401d659b2..c8242c2d2653 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/OuterComposite.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/OuterComposite.md @@ -24,7 +24,7 @@ print(OuterComposite.to_json()) # convert the object into a dict outer_composite_dict = outer_composite_instance.to_dict() # create an instance of OuterComposite from a dict -outer_composite_form_dict = outer_composite.from_dict(outer_composite_dict) +outer_composite_from_dict = OuterComposite.from_dict(outer_composite_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/python-aiohttp/docs/OuterObjectWithEnumProperty.md index beffcbe25453..6137dbd98da6 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/OuterObjectWithEnumProperty.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/OuterObjectWithEnumProperty.md @@ -23,7 +23,7 @@ print(OuterObjectWithEnumProperty.to_json()) # convert the object into a dict outer_object_with_enum_property_dict = outer_object_with_enum_property_instance.to_dict() # create an instance of OuterObjectWithEnumProperty from a dict -outer_object_with_enum_property_form_dict = outer_object_with_enum_property.from_dict(outer_object_with_enum_property_dict) +outer_object_with_enum_property_from_dict = OuterObjectWithEnumProperty.from_dict(outer_object_with_enum_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Parent.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Parent.md index 3b71011330d5..7387f9250aad 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Parent.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Parent.md @@ -22,7 +22,7 @@ print(Parent.to_json()) # convert the object into a dict parent_dict = parent_instance.to_dict() # create an instance of Parent from a dict -parent_form_dict = parent.from_dict(parent_dict) +parent_from_dict = Parent.from_dict(parent_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ParentWithOptionalDict.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ParentWithOptionalDict.md index 23e11a6dd660..bfc8688ea26f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ParentWithOptionalDict.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ParentWithOptionalDict.md @@ -22,7 +22,7 @@ print(ParentWithOptionalDict.to_json()) # convert the object into a dict parent_with_optional_dict_dict = parent_with_optional_dict_instance.to_dict() # create an instance of ParentWithOptionalDict from a dict -parent_with_optional_dict_form_dict = parent_with_optional_dict.from_dict(parent_with_optional_dict_dict) +parent_with_optional_dict_from_dict = ParentWithOptionalDict.from_dict(parent_with_optional_dict_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Pet.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Pet.md index fa9dc7bf3081..5329cf2fb925 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Pet.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Pet.md @@ -27,7 +27,7 @@ print(Pet.to_json()) # convert the object into a dict pet_dict = pet_instance.to_dict() # create an instance of Pet from a dict -pet_form_dict = pet.from_dict(pet_dict) +pet_from_dict = Pet.from_dict(pet_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Pig.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Pig.md index 9ad7b7904941..625930676083 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Pig.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Pig.md @@ -24,7 +24,7 @@ print(Pig.to_json()) # convert the object into a dict pig_dict = pig_instance.to_dict() # create an instance of Pig from a dict -pig_form_dict = pig.from_dict(pig_dict) +pig_from_dict = Pig.from_dict(pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/PoopCleaning.md b/samples/openapi3/client/petstore/python-aiohttp/docs/PoopCleaning.md index d96a5db0d4cd..8f9c25e08316 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/PoopCleaning.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/PoopCleaning.md @@ -24,7 +24,7 @@ print(PoopCleaning.to_json()) # convert the object into a dict poop_cleaning_dict = poop_cleaning_instance.to_dict() # create an instance of PoopCleaning from a dict -poop_cleaning_form_dict = poop_cleaning.from_dict(poop_cleaning_dict) +poop_cleaning_from_dict = PoopCleaning.from_dict(poop_cleaning_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/PropertyMap.md b/samples/openapi3/client/petstore/python-aiohttp/docs/PropertyMap.md index 3b4c0a8cc03f..a55a0e5c6f01 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/PropertyMap.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/PropertyMap.md @@ -22,7 +22,7 @@ print(PropertyMap.to_json()) # convert the object into a dict property_map_dict = property_map_instance.to_dict() # create an instance of PropertyMap from a dict -property_map_form_dict = property_map.from_dict(property_map_dict) +property_map_from_dict = PropertyMap.from_dict(property_map_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/PropertyNameCollision.md b/samples/openapi3/client/petstore/python-aiohttp/docs/PropertyNameCollision.md index 1bd7ce5ee2b8..40c233670dd0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/PropertyNameCollision.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/PropertyNameCollision.md @@ -24,7 +24,7 @@ print(PropertyNameCollision.to_json()) # convert the object into a dict property_name_collision_dict = property_name_collision_instance.to_dict() # create an instance of PropertyNameCollision from a dict -property_name_collision_form_dict = property_name_collision.from_dict(property_name_collision_dict) +property_name_collision_from_dict = PropertyNameCollision.from_dict(property_name_collision_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ReadOnlyFirst.md index 4644f28f56a8..686ec5da41c9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ReadOnlyFirst.md @@ -23,7 +23,7 @@ print(ReadOnlyFirst.to_json()) # convert the object into a dict read_only_first_dict = read_only_first_instance.to_dict() # create an instance of ReadOnlyFirst from a dict -read_only_first_form_dict = read_only_first.from_dict(read_only_first_dict) +read_only_first_from_dict = ReadOnlyFirst.from_dict(read_only_first_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/SecondCircularAllOfRef.md b/samples/openapi3/client/petstore/python-aiohttp/docs/SecondCircularAllOfRef.md index eae28911ed2c..65ebdd4c7e1d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/SecondCircularAllOfRef.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/SecondCircularAllOfRef.md @@ -23,7 +23,7 @@ print(SecondCircularAllOfRef.to_json()) # convert the object into a dict second_circular_all_of_ref_dict = second_circular_all_of_ref_instance.to_dict() # create an instance of SecondCircularAllOfRef from a dict -second_circular_all_of_ref_form_dict = second_circular_all_of_ref.from_dict(second_circular_all_of_ref_dict) +second_circular_all_of_ref_from_dict = SecondCircularAllOfRef.from_dict(second_circular_all_of_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/SecondRef.md b/samples/openapi3/client/petstore/python-aiohttp/docs/SecondRef.md index 97c65b8ef79b..dfb1a0ac6db5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/SecondRef.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/SecondRef.md @@ -23,7 +23,7 @@ print(SecondRef.to_json()) # convert the object into a dict second_ref_dict = second_ref_instance.to_dict() # create an instance of SecondRef from a dict -second_ref_form_dict = second_ref.from_dict(second_ref_dict) +second_ref_from_dict = SecondRef.from_dict(second_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/SelfReferenceModel.md b/samples/openapi3/client/petstore/python-aiohttp/docs/SelfReferenceModel.md index 2ca21efd50cc..208cdac04b6f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/SelfReferenceModel.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/SelfReferenceModel.md @@ -23,7 +23,7 @@ print(SelfReferenceModel.to_json()) # convert the object into a dict self_reference_model_dict = self_reference_model_instance.to_dict() # create an instance of SelfReferenceModel from a dict -self_reference_model_form_dict = self_reference_model.from_dict(self_reference_model_dict) +self_reference_model_from_dict = SelfReferenceModel.from_dict(self_reference_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/SpecialModelName.md b/samples/openapi3/client/petstore/python-aiohttp/docs/SpecialModelName.md index ea1ef0008c81..35303f34efd2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/SpecialModelName.md @@ -22,7 +22,7 @@ print(SpecialModelName.to_json()) # convert the object into a dict special_model_name_dict = special_model_name_instance.to_dict() # create an instance of SpecialModelName from a dict -special_model_name_form_dict = special_model_name.from_dict(special_model_name_dict) +special_model_name_from_dict = SpecialModelName.from_dict(special_model_name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/SpecialName.md b/samples/openapi3/client/petstore/python-aiohttp/docs/SpecialName.md index c541b0b3d4b5..ccc550b16e33 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/SpecialName.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/SpecialName.md @@ -24,7 +24,7 @@ print(SpecialName.to_json()) # convert the object into a dict special_name_dict = special_name_instance.to_dict() # create an instance of SpecialName from a dict -special_name_form_dict = special_name.from_dict(special_name_dict) +special_name_from_dict = SpecialName.from_dict(special_name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Tag.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Tag.md index a8d1885a938a..4106d9cfe5db 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Tag.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Tag.md @@ -23,7 +23,7 @@ print(Tag.to_json()) # convert the object into a dict tag_dict = tag_instance.to_dict() # create an instance of Tag from a dict -tag_form_dict = tag.from_dict(tag_dict) +tag_from_dict = Tag.from_dict(tag_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Task.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Task.md index 905cc03b65d6..211ce76cdfeb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Task.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Task.md @@ -24,7 +24,7 @@ print(Task.to_json()) # convert the object into a dict task_dict = task_instance.to_dict() # create an instance of Task from a dict -task_form_dict = task.from_dict(task_dict) +task_from_dict = Task.from_dict(task_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/TaskActivity.md b/samples/openapi3/client/petstore/python-aiohttp/docs/TaskActivity.md index 36159e069b56..e905a477292d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/TaskActivity.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/TaskActivity.md @@ -24,7 +24,7 @@ print(TaskActivity.to_json()) # convert the object into a dict task_activity_dict = task_activity_instance.to_dict() # create an instance of TaskActivity from a dict -task_activity_form_dict = task_activity.from_dict(task_activity_dict) +task_activity_from_dict = TaskActivity.from_dict(task_activity_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel400Response.md b/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel400Response.md index 1ff12d238e00..be416bbad0f7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel400Response.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel400Response.md @@ -22,7 +22,7 @@ print(TestErrorResponsesWithModel400Response.to_json()) # convert the object into a dict test_error_responses_with_model400_response_dict = test_error_responses_with_model400_response_instance.to_dict() # create an instance of TestErrorResponsesWithModel400Response from a dict -test_error_responses_with_model400_response_form_dict = test_error_responses_with_model400_response.from_dict(test_error_responses_with_model400_response_dict) +test_error_responses_with_model400_response_from_dict = TestErrorResponsesWithModel400Response.from_dict(test_error_responses_with_model400_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel404Response.md b/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel404Response.md index a62725a99bb7..1c984f847bf1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel404Response.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel404Response.md @@ -22,7 +22,7 @@ print(TestErrorResponsesWithModel404Response.to_json()) # convert the object into a dict test_error_responses_with_model404_response_dict = test_error_responses_with_model404_response_instance.to_dict() # create an instance of TestErrorResponsesWithModel404Response from a dict -test_error_responses_with_model404_response_form_dict = test_error_responses_with_model404_response.from_dict(test_error_responses_with_model404_response_dict) +test_error_responses_with_model404_response_from_dict = TestErrorResponsesWithModel404Response.from_dict(test_error_responses_with_model404_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/python-aiohttp/docs/TestInlineFreeformAdditionalPropertiesRequest.md index d678aa823e18..511132d689be 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/TestInlineFreeformAdditionalPropertiesRequest.md @@ -22,7 +22,7 @@ print(TestInlineFreeformAdditionalPropertiesRequest.to_json()) # convert the object into a dict test_inline_freeform_additional_properties_request_dict = test_inline_freeform_additional_properties_request_instance.to_dict() # create an instance of TestInlineFreeformAdditionalPropertiesRequest from a dict -test_inline_freeform_additional_properties_request_form_dict = test_inline_freeform_additional_properties_request.from_dict(test_inline_freeform_additional_properties_request_dict) +test_inline_freeform_additional_properties_request_from_dict = TestInlineFreeformAdditionalPropertiesRequest.from_dict(test_inline_freeform_additional_properties_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/TestObjectForMultipartRequestsRequestMarker.md b/samples/openapi3/client/petstore/python-aiohttp/docs/TestObjectForMultipartRequestsRequestMarker.md index 75cd561ffae8..ff0ca9ee00ac 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/TestObjectForMultipartRequestsRequestMarker.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/TestObjectForMultipartRequestsRequestMarker.md @@ -22,7 +22,7 @@ print(TestObjectForMultipartRequestsRequestMarker.to_json()) # convert the object into a dict test_object_for_multipart_requests_request_marker_dict = test_object_for_multipart_requests_request_marker_instance.to_dict() # create an instance of TestObjectForMultipartRequestsRequestMarker from a dict -test_object_for_multipart_requests_request_marker_form_dict = test_object_for_multipart_requests_request_marker.from_dict(test_object_for_multipart_requests_request_marker_dict) +test_object_for_multipart_requests_request_marker_from_dict = TestObjectForMultipartRequestsRequestMarker.from_dict(test_object_for_multipart_requests_request_marker_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/Tiger.md b/samples/openapi3/client/petstore/python-aiohttp/docs/Tiger.md index f03552af0732..f1cf2133f0f7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/Tiger.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/Tiger.md @@ -22,7 +22,7 @@ print(Tiger.to_json()) # convert the object into a dict tiger_dict = tiger_instance.to_dict() # create an instance of Tiger from a dict -tiger_form_dict = tiger.from_dict(tiger_dict) +tiger_from_dict = Tiger.from_dict(tiger_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/UnnamedDictWithAdditionalModelListProperties.md b/samples/openapi3/client/petstore/python-aiohttp/docs/UnnamedDictWithAdditionalModelListProperties.md index 201a2d8d3e83..68cd00ab0a7a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/UnnamedDictWithAdditionalModelListProperties.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/UnnamedDictWithAdditionalModelListProperties.md @@ -22,7 +22,7 @@ print(UnnamedDictWithAdditionalModelListProperties.to_json()) # convert the object into a dict unnamed_dict_with_additional_model_list_properties_dict = unnamed_dict_with_additional_model_list_properties_instance.to_dict() # create an instance of UnnamedDictWithAdditionalModelListProperties from a dict -unnamed_dict_with_additional_model_list_properties_form_dict = unnamed_dict_with_additional_model_list_properties.from_dict(unnamed_dict_with_additional_model_list_properties_dict) +unnamed_dict_with_additional_model_list_properties_from_dict = UnnamedDictWithAdditionalModelListProperties.from_dict(unnamed_dict_with_additional_model_list_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/UnnamedDictWithAdditionalStringListProperties.md b/samples/openapi3/client/petstore/python-aiohttp/docs/UnnamedDictWithAdditionalStringListProperties.md index 534b6bec7978..045b0e22ad09 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/UnnamedDictWithAdditionalStringListProperties.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/UnnamedDictWithAdditionalStringListProperties.md @@ -22,7 +22,7 @@ print(UnnamedDictWithAdditionalStringListProperties.to_json()) # convert the object into a dict unnamed_dict_with_additional_string_list_properties_dict = unnamed_dict_with_additional_string_list_properties_instance.to_dict() # create an instance of UnnamedDictWithAdditionalStringListProperties from a dict -unnamed_dict_with_additional_string_list_properties_form_dict = unnamed_dict_with_additional_string_list_properties.from_dict(unnamed_dict_with_additional_string_list_properties_dict) +unnamed_dict_with_additional_string_list_properties_from_dict = UnnamedDictWithAdditionalStringListProperties.from_dict(unnamed_dict_with_additional_string_list_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/User.md b/samples/openapi3/client/petstore/python-aiohttp/docs/User.md index e9d5051b6462..c45d26d27043 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/User.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/User.md @@ -29,7 +29,7 @@ print(User.to_json()) # convert the object into a dict user_dict = user_instance.to_dict() # create an instance of User from a dict -user_form_dict = user.from_dict(user_dict) +user_from_dict = User.from_dict(user_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/WithNestedOneOf.md b/samples/openapi3/client/petstore/python-aiohttp/docs/WithNestedOneOf.md index 7fdc6cb3d215..e7bbbc28fc2d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/WithNestedOneOf.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/WithNestedOneOf.md @@ -24,7 +24,7 @@ print(WithNestedOneOf.to_json()) # convert the object into a dict with_nested_one_of_dict = with_nested_one_of_instance.to_dict() # create an instance of WithNestedOneOf from a dict -with_nested_one_of_form_dict = with_nested_one_of.from_dict(with_nested_one_of_dict) +with_nested_one_of_from_dict = WithNestedOneOf.from_dict(with_nested_one_of_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py index dc839324d4cb..078561dd4075 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py @@ -25,6 +25,7 @@ from petstore_api.models.file_schema_test_class import FileSchemaTestClass from petstore_api.models.health_check_result import HealthCheckResult from petstore_api.models.outer_composite import OuterComposite +from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.models.pet import Pet from petstore_api.models.tag import Tag @@ -2179,6 +2180,7 @@ def _fake_outer_string_serialize_serialize( async def fake_property_enum_integer_serialize( self, outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + param: Optional[List[OuterEnumInteger]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2198,6 +2200,8 @@ async def fake_property_enum_integer_serialize( :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2222,6 +2226,7 @@ async def fake_property_enum_integer_serialize( _param = self._fake_property_enum_integer_serialize_serialize( outer_object_with_enum_property=outer_object_with_enum_property, + param=param, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2246,6 +2251,7 @@ async def fake_property_enum_integer_serialize( async def fake_property_enum_integer_serialize_with_http_info( self, outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + param: Optional[List[OuterEnumInteger]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2265,6 +2271,8 @@ async def fake_property_enum_integer_serialize_with_http_info( :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2289,6 +2297,7 @@ async def fake_property_enum_integer_serialize_with_http_info( _param = self._fake_property_enum_integer_serialize_serialize( outer_object_with_enum_property=outer_object_with_enum_property, + param=param, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2313,6 +2322,7 @@ async def fake_property_enum_integer_serialize_with_http_info( async def fake_property_enum_integer_serialize_without_preload_content( self, outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + param: Optional[List[OuterEnumInteger]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2332,6 +2342,8 @@ async def fake_property_enum_integer_serialize_without_preload_content( :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2356,6 +2368,7 @@ async def fake_property_enum_integer_serialize_without_preload_content( _param = self._fake_property_enum_integer_serialize_serialize( outer_object_with_enum_property=outer_object_with_enum_property, + param=param, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2375,6 +2388,7 @@ async def fake_property_enum_integer_serialize_without_preload_content( def _fake_property_enum_integer_serialize_serialize( self, outer_object_with_enum_property, + param, _request_auth, _content_type, _headers, @@ -2384,6 +2398,7 @@ def _fake_property_enum_integer_serialize_serialize( _host = None _collection_formats: Dict[str, str] = { + 'param': 'multi', } _path_params: Dict[str, str] = {} @@ -2395,6 +2410,10 @@ def _fake_property_enum_integer_serialize_serialize( # process the path parameters # process the query parameters + if param is not None: + + _query_params.append(('param', param)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py index 0d941bcd0e48..991b0d96cc1d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py @@ -353,6 +353,8 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value elif isinstance(obj, SecretStr): return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesAnyType.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesAnyType.md index beedef76c051..79b75f9f010a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesAnyType.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesAnyType.md @@ -21,7 +21,7 @@ print AdditionalPropertiesAnyType.to_json() # convert the object into a dict additional_properties_any_type_dict = additional_properties_any_type_instance.to_dict() # create an instance of AdditionalPropertiesAnyType from a dict -additional_properties_any_type_form_dict = additional_properties_any_type.from_dict(additional_properties_any_type_dict) +additional_properties_any_type_from_dict = AdditionalPropertiesAnyType.from_dict(additional_properties_any_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesClass.md index 6abc3136b9ca..88b80a675ffd 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesClass.md @@ -22,7 +22,7 @@ print AdditionalPropertiesClass.to_json() # convert the object into a dict additional_properties_class_dict = additional_properties_class_instance.to_dict() # create an instance of AdditionalPropertiesClass from a dict -additional_properties_class_form_dict = additional_properties_class.from_dict(additional_properties_class_dict) +additional_properties_class_from_dict = AdditionalPropertiesClass.from_dict(additional_properties_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesObject.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesObject.md index 8b9259c687f6..a9d656a6caf1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesObject.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesObject.md @@ -21,7 +21,7 @@ print AdditionalPropertiesObject.to_json() # convert the object into a dict additional_properties_object_dict = additional_properties_object_instance.to_dict() # create an instance of AdditionalPropertiesObject from a dict -additional_properties_object_form_dict = additional_properties_object.from_dict(additional_properties_object_dict) +additional_properties_object_from_dict = AdditionalPropertiesObject.from_dict(additional_properties_object_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesWithDescriptionOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesWithDescriptionOnly.md index d66094f18e57..f86bb3f609c5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesWithDescriptionOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AdditionalPropertiesWithDescriptionOnly.md @@ -21,7 +21,7 @@ print AdditionalPropertiesWithDescriptionOnly.to_json() # convert the object into a dict additional_properties_with_description_only_dict = additional_properties_with_description_only_instance.to_dict() # create an instance of AdditionalPropertiesWithDescriptionOnly from a dict -additional_properties_with_description_only_form_dict = additional_properties_with_description_only.from_dict(additional_properties_with_description_only_dict) +additional_properties_with_description_only_from_dict = AdditionalPropertiesWithDescriptionOnly.from_dict(additional_properties_with_description_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AllOfSuperModel.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AllOfSuperModel.md index 0e8a9bacf0e1..e26106e3447f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AllOfSuperModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AllOfSuperModel.md @@ -21,7 +21,7 @@ print AllOfSuperModel.to_json() # convert the object into a dict all_of_super_model_dict = all_of_super_model_instance.to_dict() # create an instance of AllOfSuperModel from a dict -all_of_super_model_form_dict = all_of_super_model.from_dict(all_of_super_model_dict) +all_of_super_model_from_dict = AllOfSuperModel.from_dict(all_of_super_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AllOfWithSingleRef.md index 1a8b4df7ecc5..8ad1d9798b77 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AllOfWithSingleRef.md @@ -22,7 +22,7 @@ print AllOfWithSingleRef.to_json() # convert the object into a dict all_of_with_single_ref_dict = all_of_with_single_ref_instance.to_dict() # create an instance of AllOfWithSingleRef from a dict -all_of_with_single_ref_form_dict = all_of_with_single_ref.from_dict(all_of_with_single_ref_dict) +all_of_with_single_ref_from_dict = AllOfWithSingleRef.from_dict(all_of_with_single_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Animal.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Animal.md index b62f19690994..af4959f50c11 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Animal.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Animal.md @@ -22,7 +22,7 @@ print Animal.to_json() # convert the object into a dict animal_dict = animal_instance.to_dict() # create an instance of Animal from a dict -animal_form_dict = animal.from_dict(animal_dict) +animal_from_dict = Animal.from_dict(animal_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AnyOfColor.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AnyOfColor.md index 9b161ccba1c0..96290acbf9ac 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AnyOfColor.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AnyOfColor.md @@ -21,7 +21,7 @@ print AnyOfColor.to_json() # convert the object into a dict any_of_color_dict = any_of_color_instance.to_dict() # create an instance of AnyOfColor from a dict -any_of_color_form_dict = any_of_color.from_dict(any_of_color_dict) +any_of_color_from_dict = AnyOfColor.from_dict(any_of_color_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AnyOfPig.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AnyOfPig.md index 2da7ca6eefe7..7c39ea27e99c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AnyOfPig.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/AnyOfPig.md @@ -23,7 +23,7 @@ print AnyOfPig.to_json() # convert the object into a dict any_of_pig_dict = any_of_pig_instance.to_dict() # create an instance of AnyOfPig from a dict -any_of_pig_form_dict = any_of_pig.from_dict(any_of_pig_dict) +any_of_pig_from_dict = AnyOfPig.from_dict(any_of_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ApiResponse.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ApiResponse.md index ba35ea9e2f0e..6102313cb14e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ApiResponse.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ApiResponse.md @@ -23,7 +23,7 @@ print ApiResponse.to_json() # convert the object into a dict api_response_dict = api_response_instance.to_dict() # create an instance of ApiResponse from a dict -api_response_form_dict = api_response.from_dict(api_response_dict) +api_response_from_dict = ApiResponse.from_dict(api_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfArrayOfModel.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfArrayOfModel.md index 094061592613..0b93fb437aba 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfArrayOfModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfArrayOfModel.md @@ -21,7 +21,7 @@ print ArrayOfArrayOfModel.to_json() # convert the object into a dict array_of_array_of_model_dict = array_of_array_of_model_instance.to_dict() # create an instance of ArrayOfArrayOfModel from a dict -array_of_array_of_model_form_dict = array_of_array_of_model.from_dict(array_of_array_of_model_dict) +array_of_array_of_model_from_dict = ArrayOfArrayOfModel.from_dict(array_of_array_of_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfArrayOfNumberOnly.md index 3f0c127d4fa3..4bb70bf2786b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfArrayOfNumberOnly.md @@ -21,7 +21,7 @@ print ArrayOfArrayOfNumberOnly.to_json() # convert the object into a dict array_of_array_of_number_only_dict = array_of_array_of_number_only_instance.to_dict() # create an instance of ArrayOfArrayOfNumberOnly from a dict -array_of_array_of_number_only_form_dict = array_of_array_of_number_only.from_dict(array_of_array_of_number_only_dict) +array_of_array_of_number_only_from_dict = ArrayOfArrayOfNumberOnly.from_dict(array_of_array_of_number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfNumberOnly.md index c10191915a70..395ad7f9f8bb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayOfNumberOnly.md @@ -21,7 +21,7 @@ print ArrayOfNumberOnly.to_json() # convert the object into a dict array_of_number_only_dict = array_of_number_only_instance.to_dict() # create an instance of ArrayOfNumberOnly from a dict -array_of_number_only_form_dict = array_of_number_only.from_dict(array_of_number_only_dict) +array_of_number_only_from_dict = ArrayOfNumberOnly.from_dict(array_of_number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayTest.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayTest.md index d99d1a3c4aed..0b2fb30bff34 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ArrayTest.md @@ -24,7 +24,7 @@ print ArrayTest.to_json() # convert the object into a dict array_test_dict = array_test_instance.to_dict() # create an instance of ArrayTest from a dict -array_test_form_dict = array_test.from_dict(array_test_dict) +array_test_from_dict = ArrayTest.from_dict(array_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/BasquePig.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/BasquePig.md index 552b9390c7e5..4e3b5052dbcb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/BasquePig.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/BasquePig.md @@ -22,7 +22,7 @@ print BasquePig.to_json() # convert the object into a dict basque_pig_dict = basque_pig_instance.to_dict() # create an instance of BasquePig from a dict -basque_pig_form_dict = basque_pig.from_dict(basque_pig_dict) +basque_pig_from_dict = BasquePig.from_dict(basque_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Bathing.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Bathing.md index f7844f95d54d..0841a9898aba 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Bathing.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Bathing.md @@ -23,7 +23,7 @@ print Bathing.to_json() # convert the object into a dict bathing_dict = bathing_instance.to_dict() # create an instance of Bathing from a dict -bathing_form_dict = bathing.from_dict(bathing_dict) +bathing_from_dict = Bathing.from_dict(bathing_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Capitalization.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Capitalization.md index 99e6fae88fde..44024234da33 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Capitalization.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Capitalization.md @@ -26,7 +26,7 @@ print Capitalization.to_json() # convert the object into a dict capitalization_dict = capitalization_instance.to_dict() # create an instance of Capitalization from a dict -capitalization_form_dict = capitalization.from_dict(capitalization_dict) +capitalization_from_dict = Capitalization.from_dict(capitalization_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Cat.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Cat.md index 4b509dda7ea3..0880a52adec8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Cat.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Cat.md @@ -21,7 +21,7 @@ print Cat.to_json() # convert the object into a dict cat_dict = cat_instance.to_dict() # create an instance of Cat from a dict -cat_form_dict = cat.from_dict(cat_dict) +cat_from_dict = Cat.from_dict(cat_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Category.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Category.md index c49514ef8023..072bc446592c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Category.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Category.md @@ -22,7 +22,7 @@ print Category.to_json() # convert the object into a dict category_dict = category_instance.to_dict() # create an instance of Category from a dict -category_form_dict = category.from_dict(category_dict) +category_from_dict = Category.from_dict(category_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CircularAllOfRef.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CircularAllOfRef.md index d4c78e1f4029..3c6bc5fa6f7f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CircularAllOfRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CircularAllOfRef.md @@ -22,7 +22,7 @@ print CircularAllOfRef.to_json() # convert the object into a dict circular_all_of_ref_dict = circular_all_of_ref_instance.to_dict() # create an instance of CircularAllOfRef from a dict -circular_all_of_ref_form_dict = circular_all_of_ref.from_dict(circular_all_of_ref_dict) +circular_all_of_ref_from_dict = CircularAllOfRef.from_dict(circular_all_of_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CircularReferenceModel.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CircularReferenceModel.md index d5e97934d2be..f9cfab080e18 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CircularReferenceModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CircularReferenceModel.md @@ -22,7 +22,7 @@ print CircularReferenceModel.to_json() # convert the object into a dict circular_reference_model_dict = circular_reference_model_instance.to_dict() # create an instance of CircularReferenceModel from a dict -circular_reference_model_form_dict = circular_reference_model.from_dict(circular_reference_model_dict) +circular_reference_model_from_dict = CircularReferenceModel.from_dict(circular_reference_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ClassModel.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ClassModel.md index 1b6fb7cfc77d..c8c17439ce33 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ClassModel.md @@ -22,7 +22,7 @@ print ClassModel.to_json() # convert the object into a dict class_model_dict = class_model_instance.to_dict() # create an instance of ClassModel from a dict -class_model_form_dict = class_model.from_dict(class_model_dict) +class_model_from_dict = ClassModel.from_dict(class_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Client.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Client.md index b0ded10dd762..60d8102c5423 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Client.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Client.md @@ -21,7 +21,7 @@ print Client.to_json() # convert the object into a dict client_dict = client_instance.to_dict() # create an instance of Client from a dict -client_form_dict = client.from_dict(client_dict) +client_from_dict = Client.from_dict(client_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Color.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Color.md index 07fcd01991ac..b320dcf0e9a5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Color.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Color.md @@ -21,7 +21,7 @@ print Color.to_json() # convert the object into a dict color_dict = color_instance.to_dict() # create an instance of Color from a dict -color_form_dict = color.from_dict(color_dict) +color_from_dict = Color.from_dict(color_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Creature.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Creature.md index 54249d5871e0..4460f1a04c52 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Creature.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Creature.md @@ -22,7 +22,7 @@ print Creature.to_json() # convert the object into a dict creature_dict = creature_instance.to_dict() # create an instance of Creature from a dict -creature_form_dict = creature.from_dict(creature_dict) +creature_from_dict = Creature.from_dict(creature_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CreatureInfo.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CreatureInfo.md index 5a600b9f3374..1df6883a71b8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CreatureInfo.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/CreatureInfo.md @@ -21,7 +21,7 @@ print CreatureInfo.to_json() # convert the object into a dict creature_info_dict = creature_info_instance.to_dict() # create an instance of CreatureInfo from a dict -creature_info_form_dict = creature_info.from_dict(creature_info_dict) +creature_info_from_dict = CreatureInfo.from_dict(creature_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DanishPig.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DanishPig.md index 253616c2fc32..33faed741892 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DanishPig.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DanishPig.md @@ -22,7 +22,7 @@ print DanishPig.to_json() # convert the object into a dict danish_pig_dict = danish_pig_instance.to_dict() # create an instance of DanishPig from a dict -danish_pig_form_dict = danish_pig.from_dict(danish_pig_dict) +danish_pig_from_dict = DanishPig.from_dict(danish_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DeprecatedObject.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DeprecatedObject.md index e6cf57189634..a12d1cad419c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DeprecatedObject.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DeprecatedObject.md @@ -21,7 +21,7 @@ print DeprecatedObject.to_json() # convert the object into a dict deprecated_object_dict = deprecated_object_instance.to_dict() # create an instance of DeprecatedObject from a dict -deprecated_object_form_dict = deprecated_object.from_dict(deprecated_object_dict) +deprecated_object_from_dict = DeprecatedObject.from_dict(deprecated_object_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DiscriminatorAllOfSub.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DiscriminatorAllOfSub.md index b5dcd9919262..dc27629cd1fd 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DiscriminatorAllOfSub.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DiscriminatorAllOfSub.md @@ -20,7 +20,7 @@ print DiscriminatorAllOfSub.to_json() # convert the object into a dict discriminator_all_of_sub_dict = discriminator_all_of_sub_instance.to_dict() # create an instance of DiscriminatorAllOfSub from a dict -discriminator_all_of_sub_form_dict = discriminator_all_of_sub.from_dict(discriminator_all_of_sub_dict) +discriminator_all_of_sub_from_dict = DiscriminatorAllOfSub.from_dict(discriminator_all_of_sub_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DiscriminatorAllOfSuper.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DiscriminatorAllOfSuper.md index 9564ca75c80e..7506eb150b27 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DiscriminatorAllOfSuper.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DiscriminatorAllOfSuper.md @@ -21,7 +21,7 @@ print DiscriminatorAllOfSuper.to_json() # convert the object into a dict discriminator_all_of_super_dict = discriminator_all_of_super_instance.to_dict() # create an instance of DiscriminatorAllOfSuper from a dict -discriminator_all_of_super_form_dict = discriminator_all_of_super.from_dict(discriminator_all_of_super_dict) +discriminator_all_of_super_from_dict = DiscriminatorAllOfSuper.from_dict(discriminator_all_of_super_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Dog.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Dog.md index 3469be73a761..ebef27d81d6b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Dog.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Dog.md @@ -21,7 +21,7 @@ print Dog.to_json() # convert the object into a dict dog_dict = dog_instance.to_dict() # create an instance of Dog from a dict -dog_form_dict = dog.from_dict(dog_dict) +dog_from_dict = Dog.from_dict(dog_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DummyModel.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DummyModel.md index e690a8874f8c..52483957a5eb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DummyModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/DummyModel.md @@ -22,7 +22,7 @@ print DummyModel.to_json() # convert the object into a dict dummy_model_dict = dummy_model_instance.to_dict() # create an instance of DummyModel from a dict -dummy_model_form_dict = dummy_model.from_dict(dummy_model_dict) +dummy_model_from_dict = DummyModel.from_dict(dummy_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/EnumArrays.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/EnumArrays.md index d21f58a66087..4f4004c16724 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/EnumArrays.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/EnumArrays.md @@ -22,7 +22,7 @@ print EnumArrays.to_json() # convert the object into a dict enum_arrays_dict = enum_arrays_instance.to_dict() # create an instance of EnumArrays from a dict -enum_arrays_form_dict = enum_arrays.from_dict(enum_arrays_dict) +enum_arrays_from_dict = EnumArrays.from_dict(enum_arrays_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/EnumTest.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/EnumTest.md index 5bcb8e7027e3..6dee11438f2d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/EnumTest.md @@ -29,7 +29,7 @@ print EnumTest.to_json() # convert the object into a dict enum_test_dict = enum_test_instance.to_dict() # create an instance of EnumTest from a dict -enum_test_form_dict = enum_test.from_dict(enum_test_dict) +enum_test_from_dict = EnumTest.from_dict(enum_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md index 22c6daa82b19..e33215808a67 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md @@ -624,7 +624,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fake_property_enum_integer_serialize** -> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property) +> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param) @@ -636,6 +636,7 @@ Test serialization of enum (int) properties with examples import time import os import petstore_api +from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.rest import ApiException from pprint import pprint @@ -652,9 +653,10 @@ async with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) outer_object_with_enum_property = petstore_api.OuterObjectWithEnumProperty() # OuterObjectWithEnumProperty | Input enum (int) as post body + param = [petstore_api.OuterEnumInteger()] # List[OuterEnumInteger] | (optional) try: - api_response = await api_instance.fake_property_enum_integer_serialize(outer_object_with_enum_property) + api_response = await api_instance.fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param) print("The response of FakeApi->fake_property_enum_integer_serialize:\n") pprint(api_response) except Exception as e: @@ -668,6 +670,7 @@ async with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **outer_object_with_enum_property** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **param** | [**List[OuterEnumInteger]**](OuterEnumInteger.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Feeding.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Feeding.md index 30750a67a075..8bc540ad389f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Feeding.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Feeding.md @@ -23,7 +23,7 @@ print Feeding.to_json() # convert the object into a dict feeding_dict = feeding_instance.to_dict() # create an instance of Feeding from a dict -feeding_form_dict = feeding.from_dict(feeding_dict) +feeding_from_dict = Feeding.from_dict(feeding_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Field.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Field.md index 01abebbda172..0e45544dd0d4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Field.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Field.md @@ -21,7 +21,7 @@ print Field.to_json() # convert the object into a dict field_dict = field_instance.to_dict() # create an instance of Field from a dict -field_form_dict = field.from_dict(field_dict) +field_from_dict = Field.from_dict(field_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/File.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/File.md index 586da8e32559..019c02129a94 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/File.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/File.md @@ -22,7 +22,7 @@ print File.to_json() # convert the object into a dict file_dict = file_instance.to_dict() # create an instance of File from a dict -file_form_dict = file.from_dict(file_dict) +file_from_dict = File.from_dict(file_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FileSchemaTestClass.md index fb967a8d9924..16f4b7a29c20 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FileSchemaTestClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FileSchemaTestClass.md @@ -22,7 +22,7 @@ print FileSchemaTestClass.to_json() # convert the object into a dict file_schema_test_class_dict = file_schema_test_class_instance.to_dict() # create an instance of FileSchemaTestClass from a dict -file_schema_test_class_form_dict = file_schema_test_class.from_dict(file_schema_test_class_dict) +file_schema_test_class_from_dict = FileSchemaTestClass.from_dict(file_schema_test_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FirstRef.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FirstRef.md index b5e7ab766b45..7b4539dec25d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FirstRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FirstRef.md @@ -22,7 +22,7 @@ print FirstRef.to_json() # convert the object into a dict first_ref_dict = first_ref_instance.to_dict() # create an instance of FirstRef from a dict -first_ref_form_dict = first_ref.from_dict(first_ref_dict) +first_ref_from_dict = FirstRef.from_dict(first_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Foo.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Foo.md index 8062d08df1dd..c337d6f1a838 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Foo.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Foo.md @@ -21,7 +21,7 @@ print Foo.to_json() # convert the object into a dict foo_dict = foo_instance.to_dict() # create an instance of Foo from a dict -foo_form_dict = foo.from_dict(foo_dict) +foo_from_dict = Foo.from_dict(foo_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FooGetDefaultResponse.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FooGetDefaultResponse.md index 550fbe78fa17..311cb6d51b57 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FooGetDefaultResponse.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FooGetDefaultResponse.md @@ -21,7 +21,7 @@ print FooGetDefaultResponse.to_json() # convert the object into a dict foo_get_default_response_dict = foo_get_default_response_instance.to_dict() # create an instance of FooGetDefaultResponse from a dict -foo_get_default_response_form_dict = foo_get_default_response.from_dict(foo_get_default_response_dict) +foo_get_default_response_from_dict = FooGetDefaultResponse.from_dict(foo_get_default_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FormatTest.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FormatTest.md index aa81e585952f..08287433303f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FormatTest.md @@ -37,7 +37,7 @@ print FormatTest.to_json() # convert the object into a dict format_test_dict = format_test_instance.to_dict() # create an instance of FormatTest from a dict -format_test_form_dict = format_test.from_dict(format_test_dict) +format_test_from_dict = FormatTest.from_dict(format_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HasOnlyReadOnly.md index 99573bd28a2f..cbb1af037fd3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HasOnlyReadOnly.md @@ -22,7 +22,7 @@ print HasOnlyReadOnly.to_json() # convert the object into a dict has_only_read_only_dict = has_only_read_only_instance.to_dict() # create an instance of HasOnlyReadOnly from a dict -has_only_read_only_form_dict = has_only_read_only.from_dict(has_only_read_only_dict) +has_only_read_only_from_dict = HasOnlyReadOnly.from_dict(has_only_read_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HealthCheckResult.md index b8723e018aa1..7748c091cf4e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/HealthCheckResult.md @@ -22,7 +22,7 @@ print HealthCheckResult.to_json() # convert the object into a dict health_check_result_dict = health_check_result_instance.to_dict() # create an instance of HealthCheckResult from a dict -health_check_result_form_dict = health_check_result.from_dict(health_check_result_dict) +health_check_result_from_dict = HealthCheckResult.from_dict(health_check_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/InnerDictWithProperty.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/InnerDictWithProperty.md index 45d76ad458c4..4571e4dc1a42 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/InnerDictWithProperty.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/InnerDictWithProperty.md @@ -21,7 +21,7 @@ print InnerDictWithProperty.to_json() # convert the object into a dict inner_dict_with_property_dict = inner_dict_with_property_instance.to_dict() # create an instance of InnerDictWithProperty from a dict -inner_dict_with_property_form_dict = inner_dict_with_property.from_dict(inner_dict_with_property_dict) +inner_dict_with_property_from_dict = InnerDictWithProperty.from_dict(inner_dict_with_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/InputAllOf.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/InputAllOf.md index eddd22e48a4d..50e0f318e701 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/InputAllOf.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/InputAllOf.md @@ -21,7 +21,7 @@ print InputAllOf.to_json() # convert the object into a dict input_all_of_dict = input_all_of_instance.to_dict() # create an instance of InputAllOf from a dict -input_all_of_form_dict = input_all_of.from_dict(input_all_of_dict) +input_all_of_from_dict = InputAllOf.from_dict(input_all_of_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/IntOrString.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/IntOrString.md index 0a441f186dbc..5f234f7d20e2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/IntOrString.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/IntOrString.md @@ -20,7 +20,7 @@ print IntOrString.to_json() # convert the object into a dict int_or_string_dict = int_or_string_instance.to_dict() # create an instance of IntOrString from a dict -int_or_string_form_dict = int_or_string.from_dict(int_or_string_dict) +int_or_string_from_dict = IntOrString.from_dict(int_or_string_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ListClass.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ListClass.md index ceb1f50705bd..6d84bff6a837 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ListClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ListClass.md @@ -21,7 +21,7 @@ print ListClass.to_json() # convert the object into a dict list_class_dict = list_class_instance.to_dict() # create an instance of ListClass from a dict -list_class_form_dict = list_class.from_dict(list_class_dict) +list_class_from_dict = ListClass.from_dict(list_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MapOfArrayOfModel.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MapOfArrayOfModel.md index b97ace0f42c8..912a72c77431 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MapOfArrayOfModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MapOfArrayOfModel.md @@ -21,7 +21,7 @@ print MapOfArrayOfModel.to_json() # convert the object into a dict map_of_array_of_model_dict = map_of_array_of_model_instance.to_dict() # create an instance of MapOfArrayOfModel from a dict -map_of_array_of_model_form_dict = map_of_array_of_model.from_dict(map_of_array_of_model_dict) +map_of_array_of_model_from_dict = MapOfArrayOfModel.from_dict(map_of_array_of_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MapTest.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MapTest.md index ba87758a5220..37d65a59c8af 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MapTest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MapTest.md @@ -24,7 +24,7 @@ print MapTest.to_json() # convert the object into a dict map_test_dict = map_test_instance.to_dict() # create an instance of MapTest from a dict -map_test_form_dict = map_test.from_dict(map_test_dict) +map_test_from_dict = MapTest.from_dict(map_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8f628d133abf..53d7988588b0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -23,7 +23,7 @@ print MixedPropertiesAndAdditionalPropertiesClass.to_json() # convert the object into a dict mixed_properties_and_additional_properties_class_dict = mixed_properties_and_additional_properties_class_instance.to_dict() # create an instance of MixedPropertiesAndAdditionalPropertiesClass from a dict -mixed_properties_and_additional_properties_class_form_dict = mixed_properties_and_additional_properties_class.from_dict(mixed_properties_and_additional_properties_class_dict) +mixed_properties_and_additional_properties_class_from_dict = MixedPropertiesAndAdditionalPropertiesClass.from_dict(mixed_properties_and_additional_properties_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Model200Response.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Model200Response.md index 6a20cefe99cb..bd6b6ce21aab 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Model200Response.md @@ -23,7 +23,7 @@ print Model200Response.to_json() # convert the object into a dict model200_response_dict = model200_response_instance.to_dict() # create an instance of Model200Response from a dict -model200_response_form_dict = model200_response.from_dict(model200_response_dict) +model200_response_from_dict = Model200Response.from_dict(model200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ModelReturn.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ModelReturn.md index a5b47f423c81..a69b543d4616 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ModelReturn.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ModelReturn.md @@ -22,7 +22,7 @@ print ModelReturn.to_json() # convert the object into a dict model_return_dict = model_return_instance.to_dict() # create an instance of ModelReturn from a dict -model_return_form_dict = model_return.from_dict(model_return_dict) +model_return_from_dict = ModelReturn.from_dict(model_return_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Name.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Name.md index 4ccd0ce09aa2..b2cf3013a47c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Name.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Name.md @@ -25,7 +25,7 @@ print Name.to_json() # convert the object into a dict name_dict = name_instance.to_dict() # create an instance of Name from a dict -name_form_dict = name.from_dict(name_dict) +name_from_dict = Name.from_dict(name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NullableClass.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NullableClass.md index 1658756b50e4..d6ca700c8877 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NullableClass.md @@ -33,7 +33,7 @@ print NullableClass.to_json() # convert the object into a dict nullable_class_dict = nullable_class_instance.to_dict() # create an instance of NullableClass from a dict -nullable_class_form_dict = nullable_class.from_dict(nullable_class_dict) +nullable_class_from_dict = NullableClass.from_dict(nullable_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NullableProperty.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NullableProperty.md index fd9cbbc51aaa..3771860aafb3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NullableProperty.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NullableProperty.md @@ -22,7 +22,7 @@ print NullableProperty.to_json() # convert the object into a dict nullable_property_dict = nullable_property_instance.to_dict() # create an instance of NullableProperty from a dict -nullable_property_form_dict = nullable_property.from_dict(nullable_property_dict) +nullable_property_from_dict = NullableProperty.from_dict(nullable_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NumberOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NumberOnly.md index f49216ddaa4e..eb51449dc207 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NumberOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/NumberOnly.md @@ -21,7 +21,7 @@ print NumberOnly.to_json() # convert the object into a dict number_only_dict = number_only_instance.to_dict() # create an instance of NumberOnly from a dict -number_only_form_dict = number_only.from_dict(number_only_dict) +number_only_from_dict = NumberOnly.from_dict(number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ObjectToTestAdditionalProperties.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ObjectToTestAdditionalProperties.md index c4ba9a958503..52d741dcd51f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ObjectToTestAdditionalProperties.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ObjectToTestAdditionalProperties.md @@ -22,7 +22,7 @@ print ObjectToTestAdditionalProperties.to_json() # convert the object into a dict object_to_test_additional_properties_dict = object_to_test_additional_properties_instance.to_dict() # create an instance of ObjectToTestAdditionalProperties from a dict -object_to_test_additional_properties_form_dict = object_to_test_additional_properties.from_dict(object_to_test_additional_properties_dict) +object_to_test_additional_properties_from_dict = ObjectToTestAdditionalProperties.from_dict(object_to_test_additional_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ObjectWithDeprecatedFields.md index 8daa55a39161..324130af8dd4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ObjectWithDeprecatedFields.md @@ -24,7 +24,7 @@ print ObjectWithDeprecatedFields.to_json() # convert the object into a dict object_with_deprecated_fields_dict = object_with_deprecated_fields_instance.to_dict() # create an instance of ObjectWithDeprecatedFields from a dict -object_with_deprecated_fields_form_dict = object_with_deprecated_fields.from_dict(object_with_deprecated_fields_dict) +object_with_deprecated_fields_from_dict = ObjectWithDeprecatedFields.from_dict(object_with_deprecated_fields_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OneOfEnumString.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OneOfEnumString.md index c7c28bc29440..981fae92dee3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OneOfEnumString.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OneOfEnumString.md @@ -21,7 +21,7 @@ print OneOfEnumString.to_json() # convert the object into a dict one_of_enum_string_dict = one_of_enum_string_instance.to_dict() # create an instance of OneOfEnumString from a dict -one_of_enum_string_form_dict = one_of_enum_string.from_dict(one_of_enum_string_dict) +one_of_enum_string_from_dict = OneOfEnumString.from_dict(one_of_enum_string_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Order.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Order.md index e71e955a11dd..2eaed8c9278e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Order.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Order.md @@ -26,7 +26,7 @@ print Order.to_json() # convert the object into a dict order_dict = order_instance.to_dict() # create an instance of Order from a dict -order_form_dict = order.from_dict(order_dict) +order_from_dict = Order.from_dict(order_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterComposite.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterComposite.md index 504e266f9a14..f9dc458046be 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterComposite.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterComposite.md @@ -23,7 +23,7 @@ print OuterComposite.to_json() # convert the object into a dict outer_composite_dict = outer_composite_instance.to_dict() # create an instance of OuterComposite from a dict -outer_composite_form_dict = outer_composite.from_dict(outer_composite_dict) +outer_composite_from_dict = OuterComposite.from_dict(outer_composite_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterObjectWithEnumProperty.md index c6a1cdcbc193..f7ea908c9241 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterObjectWithEnumProperty.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterObjectWithEnumProperty.md @@ -22,7 +22,7 @@ print OuterObjectWithEnumProperty.to_json() # convert the object into a dict outer_object_with_enum_property_dict = outer_object_with_enum_property_instance.to_dict() # create an instance of OuterObjectWithEnumProperty from a dict -outer_object_with_enum_property_form_dict = outer_object_with_enum_property.from_dict(outer_object_with_enum_property_dict) +outer_object_with_enum_property_from_dict = OuterObjectWithEnumProperty.from_dict(outer_object_with_enum_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Parent.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Parent.md index 9a963a6b722d..de6fb2bf47a9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Parent.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Parent.md @@ -21,7 +21,7 @@ print Parent.to_json() # convert the object into a dict parent_dict = parent_instance.to_dict() # create an instance of Parent from a dict -parent_form_dict = parent.from_dict(parent_dict) +parent_from_dict = Parent.from_dict(parent_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ParentWithOptionalDict.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ParentWithOptionalDict.md index 04bf94942019..817faeed32f4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ParentWithOptionalDict.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ParentWithOptionalDict.md @@ -21,7 +21,7 @@ print ParentWithOptionalDict.to_json() # convert the object into a dict parent_with_optional_dict_dict = parent_with_optional_dict_instance.to_dict() # create an instance of ParentWithOptionalDict from a dict -parent_with_optional_dict_form_dict = parent_with_optional_dict.from_dict(parent_with_optional_dict_dict) +parent_with_optional_dict_from_dict = ParentWithOptionalDict.from_dict(parent_with_optional_dict_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Pet.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Pet.md index 05a466f880a3..4eedd9366ac6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Pet.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Pet.md @@ -26,7 +26,7 @@ print Pet.to_json() # convert the object into a dict pet_dict = pet_instance.to_dict() # create an instance of Pet from a dict -pet_form_dict = pet.from_dict(pet_dict) +pet_from_dict = Pet.from_dict(pet_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Pig.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Pig.md index 398d6c6c6e38..e729adee35e7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Pig.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Pig.md @@ -23,7 +23,7 @@ print Pig.to_json() # convert the object into a dict pig_dict = pig_instance.to_dict() # create an instance of Pig from a dict -pig_form_dict = pig.from_dict(pig_dict) +pig_from_dict = Pig.from_dict(pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PoopCleaning.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PoopCleaning.md index bbc93c0203c0..2f0ff6470bc9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PoopCleaning.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PoopCleaning.md @@ -23,7 +23,7 @@ print PoopCleaning.to_json() # convert the object into a dict poop_cleaning_dict = poop_cleaning_instance.to_dict() # create an instance of PoopCleaning from a dict -poop_cleaning_form_dict = poop_cleaning.from_dict(poop_cleaning_dict) +poop_cleaning_from_dict = PoopCleaning.from_dict(poop_cleaning_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PropertyMap.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PropertyMap.md index f7cf4ba89338..2b727c644096 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PropertyMap.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PropertyMap.md @@ -21,7 +21,7 @@ print PropertyMap.to_json() # convert the object into a dict property_map_dict = property_map_instance.to_dict() # create an instance of PropertyMap from a dict -property_map_form_dict = property_map.from_dict(property_map_dict) +property_map_from_dict = PropertyMap.from_dict(property_map_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PropertyNameCollision.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PropertyNameCollision.md index 2cc1898be69b..62fac72a7d0d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PropertyNameCollision.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/PropertyNameCollision.md @@ -23,7 +23,7 @@ print PropertyNameCollision.to_json() # convert the object into a dict property_name_collision_dict = property_name_collision_instance.to_dict() # create an instance of PropertyNameCollision from a dict -property_name_collision_form_dict = property_name_collision.from_dict(property_name_collision_dict) +property_name_collision_from_dict = PropertyNameCollision.from_dict(property_name_collision_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ReadOnlyFirst.md index 22b5acca70c7..a67f2705bd10 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/ReadOnlyFirst.md @@ -22,7 +22,7 @@ print ReadOnlyFirst.to_json() # convert the object into a dict read_only_first_dict = read_only_first_instance.to_dict() # create an instance of ReadOnlyFirst from a dict -read_only_first_form_dict = read_only_first.from_dict(read_only_first_dict) +read_only_first_from_dict = ReadOnlyFirst.from_dict(read_only_first_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SecondCircularAllOfRef.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SecondCircularAllOfRef.md index 4460634382a2..bcb8b5fe4539 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SecondCircularAllOfRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SecondCircularAllOfRef.md @@ -22,7 +22,7 @@ print SecondCircularAllOfRef.to_json() # convert the object into a dict second_circular_all_of_ref_dict = second_circular_all_of_ref_instance.to_dict() # create an instance of SecondCircularAllOfRef from a dict -second_circular_all_of_ref_form_dict = second_circular_all_of_ref.from_dict(second_circular_all_of_ref_dict) +second_circular_all_of_ref_from_dict = SecondCircularAllOfRef.from_dict(second_circular_all_of_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SecondRef.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SecondRef.md index e6fb1e2d4f7c..a75a54047b79 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SecondRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SecondRef.md @@ -22,7 +22,7 @@ print SecondRef.to_json() # convert the object into a dict second_ref_dict = second_ref_instance.to_dict() # create an instance of SecondRef from a dict -second_ref_form_dict = second_ref.from_dict(second_ref_dict) +second_ref_from_dict = SecondRef.from_dict(second_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SelfReferenceModel.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SelfReferenceModel.md index dbf9589d576b..1761dbbf3718 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SelfReferenceModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SelfReferenceModel.md @@ -22,7 +22,7 @@ print SelfReferenceModel.to_json() # convert the object into a dict self_reference_model_dict = self_reference_model_instance.to_dict() # create an instance of SelfReferenceModel from a dict -self_reference_model_form_dict = self_reference_model.from_dict(self_reference_model_dict) +self_reference_model_from_dict = SelfReferenceModel.from_dict(self_reference_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SpecialModelName.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SpecialModelName.md index 3d27640abb04..04341261b0b6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SpecialModelName.md @@ -21,7 +21,7 @@ print SpecialModelName.to_json() # convert the object into a dict special_model_name_dict = special_model_name_instance.to_dict() # create an instance of SpecialModelName from a dict -special_model_name_form_dict = special_model_name.from_dict(special_model_name_dict) +special_model_name_from_dict = SpecialModelName.from_dict(special_model_name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SpecialName.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SpecialName.md index 0b4129525978..ffd2b6b69ba4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SpecialName.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/SpecialName.md @@ -23,7 +23,7 @@ print SpecialName.to_json() # convert the object into a dict special_name_dict = special_name_instance.to_dict() # create an instance of SpecialName from a dict -special_name_form_dict = special_name.from_dict(special_name_dict) +special_name_from_dict = SpecialName.from_dict(special_name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Tag.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Tag.md index e680c68bedd8..008d363a3b8d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Tag.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Tag.md @@ -22,7 +22,7 @@ print Tag.to_json() # convert the object into a dict tag_dict = tag_instance.to_dict() # create an instance of Tag from a dict -tag_form_dict = tag.from_dict(tag_dict) +tag_from_dict = Tag.from_dict(tag_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Task.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Task.md index aefe66e7638b..42d4dfd17a16 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Task.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Task.md @@ -23,7 +23,7 @@ print Task.to_json() # convert the object into a dict task_dict = task_instance.to_dict() # create an instance of Task from a dict -task_form_dict = task.from_dict(task_dict) +task_from_dict = Task.from_dict(task_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TaskActivity.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TaskActivity.md index eb2549061563..381e58581e68 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TaskActivity.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TaskActivity.md @@ -23,7 +23,7 @@ print TaskActivity.to_json() # convert the object into a dict task_activity_dict = task_activity_instance.to_dict() # create an instance of TaskActivity from a dict -task_activity_form_dict = task_activity.from_dict(task_activity_dict) +task_activity_from_dict = TaskActivity.from_dict(task_activity_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel400Response.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel400Response.md index 1ef43ce4cadc..98d3e7fe8933 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel400Response.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel400Response.md @@ -21,7 +21,7 @@ print TestErrorResponsesWithModel400Response.to_json() # convert the object into a dict test_error_responses_with_model400_response_dict = test_error_responses_with_model400_response_instance.to_dict() # create an instance of TestErrorResponsesWithModel400Response from a dict -test_error_responses_with_model400_response_form_dict = test_error_responses_with_model400_response.from_dict(test_error_responses_with_model400_response_dict) +test_error_responses_with_model400_response_from_dict = TestErrorResponsesWithModel400Response.from_dict(test_error_responses_with_model400_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel404Response.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel404Response.md index 9fda95537846..e36e255b21ee 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel404Response.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel404Response.md @@ -21,7 +21,7 @@ print TestErrorResponsesWithModel404Response.to_json() # convert the object into a dict test_error_responses_with_model404_response_dict = test_error_responses_with_model404_response_instance.to_dict() # create an instance of TestErrorResponsesWithModel404Response from a dict -test_error_responses_with_model404_response_form_dict = test_error_responses_with_model404_response.from_dict(test_error_responses_with_model404_response_dict) +test_error_responses_with_model404_response_from_dict = TestErrorResponsesWithModel404Response.from_dict(test_error_responses_with_model404_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestInlineFreeformAdditionalPropertiesRequest.md index 7cf86c5244e3..7f0046907533 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestInlineFreeformAdditionalPropertiesRequest.md @@ -21,7 +21,7 @@ print TestInlineFreeformAdditionalPropertiesRequest.to_json() # convert the object into a dict test_inline_freeform_additional_properties_request_dict = test_inline_freeform_additional_properties_request_instance.to_dict() # create an instance of TestInlineFreeformAdditionalPropertiesRequest from a dict -test_inline_freeform_additional_properties_request_form_dict = test_inline_freeform_additional_properties_request.from_dict(test_inline_freeform_additional_properties_request_dict) +test_inline_freeform_additional_properties_request_from_dict = TestInlineFreeformAdditionalPropertiesRequest.from_dict(test_inline_freeform_additional_properties_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestObjectForMultipartRequestsRequestMarker.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestObjectForMultipartRequestsRequestMarker.md index 25613918e920..c85a2648872a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestObjectForMultipartRequestsRequestMarker.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestObjectForMultipartRequestsRequestMarker.md @@ -21,7 +21,7 @@ print TestObjectForMultipartRequestsRequestMarker.to_json() # convert the object into a dict test_object_for_multipart_requests_request_marker_dict = test_object_for_multipart_requests_request_marker_instance.to_dict() # create an instance of TestObjectForMultipartRequestsRequestMarker from a dict -test_object_for_multipart_requests_request_marker_form_dict = test_object_for_multipart_requests_request_marker.from_dict(test_object_for_multipart_requests_request_marker_dict) +test_object_for_multipart_requests_request_marker_from_dict = TestObjectForMultipartRequestsRequestMarker.from_dict(test_object_for_multipart_requests_request_marker_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Tiger.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Tiger.md index 6ce50a31f5ae..48dd71e9c83e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Tiger.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/Tiger.md @@ -21,7 +21,7 @@ print Tiger.to_json() # convert the object into a dict tiger_dict = tiger_instance.to_dict() # create an instance of Tiger from a dict -tiger_form_dict = tiger.from_dict(tiger_dict) +tiger_from_dict = Tiger.from_dict(tiger_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/UnnamedDictWithAdditionalModelListProperties.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/UnnamedDictWithAdditionalModelListProperties.md index c102bb86bebf..784b34c29659 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/UnnamedDictWithAdditionalModelListProperties.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/UnnamedDictWithAdditionalModelListProperties.md @@ -21,7 +21,7 @@ print UnnamedDictWithAdditionalModelListProperties.to_json() # convert the object into a dict unnamed_dict_with_additional_model_list_properties_dict = unnamed_dict_with_additional_model_list_properties_instance.to_dict() # create an instance of UnnamedDictWithAdditionalModelListProperties from a dict -unnamed_dict_with_additional_model_list_properties_form_dict = unnamed_dict_with_additional_model_list_properties.from_dict(unnamed_dict_with_additional_model_list_properties_dict) +unnamed_dict_with_additional_model_list_properties_from_dict = UnnamedDictWithAdditionalModelListProperties.from_dict(unnamed_dict_with_additional_model_list_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/UnnamedDictWithAdditionalStringListProperties.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/UnnamedDictWithAdditionalStringListProperties.md index 926404ccd6ee..904c007e2072 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/UnnamedDictWithAdditionalStringListProperties.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/UnnamedDictWithAdditionalStringListProperties.md @@ -21,7 +21,7 @@ print UnnamedDictWithAdditionalStringListProperties.to_json() # convert the object into a dict unnamed_dict_with_additional_string_list_properties_dict = unnamed_dict_with_additional_string_list_properties_instance.to_dict() # create an instance of UnnamedDictWithAdditionalStringListProperties from a dict -unnamed_dict_with_additional_string_list_properties_form_dict = unnamed_dict_with_additional_string_list_properties.from_dict(unnamed_dict_with_additional_string_list_properties_dict) +unnamed_dict_with_additional_string_list_properties_from_dict = UnnamedDictWithAdditionalStringListProperties.from_dict(unnamed_dict_with_additional_string_list_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/User.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/User.md index 6d7c357ea865..ff5b1d6f1731 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/User.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/User.md @@ -28,7 +28,7 @@ print User.to_json() # convert the object into a dict user_dict = user_instance.to_dict() # create an instance of User from a dict -user_form_dict = user.from_dict(user_dict) +user_from_dict = User.from_dict(user_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/WithNestedOneOf.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/WithNestedOneOf.md index 247afcab99da..f08130c28392 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/WithNestedOneOf.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/WithNestedOneOf.md @@ -23,7 +23,7 @@ print WithNestedOneOf.to_json() # convert the object into a dict with_nested_one_of_dict = with_nested_one_of_instance.to_dict() # create an instance of WithNestedOneOf from a dict -with_nested_one_of_form_dict = with_nested_one_of.from_dict(with_nested_one_of_dict) +with_nested_one_of_from_dict = WithNestedOneOf.from_dict(with_nested_one_of_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py index da27c4cd9545..ab7bdb1b0d60 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py @@ -31,6 +31,7 @@ from petstore_api.models.file_schema_test_class import FileSchemaTestClass from petstore_api.models.health_check_result import HealthCheckResult from petstore_api.models.outer_composite import OuterComposite +from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.models.pet import Pet from petstore_api.models.tag import Tag @@ -1075,13 +1076,15 @@ async def fake_outer_string_serialize_with_http_info(self, body : Annotated[Opti _request_auth=_params.get('_request_auth')) @validate_arguments - async def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 + async def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], param : Optional[conlist(OuterEnumInteger)] = None, **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1095,16 +1098,18 @@ async def fake_property_enum_integer_serialize(self, outer_object_with_enum_prop if '_preload_content' in kwargs: message = "Error! Please call the fake_property_enum_integer_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, **kwargs) # noqa: E501 + return await self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, param, **kwargs) # noqa: E501 @validate_arguments - async def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], **kwargs) -> ApiResponse: # noqa: E501 + async def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], param : Optional[conlist(OuterEnumInteger)] = None, **kwargs) -> ApiResponse: # noqa: E501 """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1131,7 +1136,8 @@ async def fake_property_enum_integer_serialize_with_http_info(self, outer_object _params = locals() _all_params = [ - 'outer_object_with_enum_property' + 'outer_object_with_enum_property', + 'param' ] _all_params.extend( [ @@ -1161,6 +1167,10 @@ async def fake_property_enum_integer_serialize_with_http_info(self, outer_object # process the query parameters _query_params = [] + if _params.get('param') is not None: # noqa: E501 + _query_params.append(('param', _params['param'])) + _collection_formats['param'] = 'multi' + # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesAnyType.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesAnyType.md index beedef76c051..79b75f9f010a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesAnyType.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesAnyType.md @@ -21,7 +21,7 @@ print AdditionalPropertiesAnyType.to_json() # convert the object into a dict additional_properties_any_type_dict = additional_properties_any_type_instance.to_dict() # create an instance of AdditionalPropertiesAnyType from a dict -additional_properties_any_type_form_dict = additional_properties_any_type.from_dict(additional_properties_any_type_dict) +additional_properties_any_type_from_dict = AdditionalPropertiesAnyType.from_dict(additional_properties_any_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesClass.md index 6abc3136b9ca..88b80a675ffd 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesClass.md @@ -22,7 +22,7 @@ print AdditionalPropertiesClass.to_json() # convert the object into a dict additional_properties_class_dict = additional_properties_class_instance.to_dict() # create an instance of AdditionalPropertiesClass from a dict -additional_properties_class_form_dict = additional_properties_class.from_dict(additional_properties_class_dict) +additional_properties_class_from_dict = AdditionalPropertiesClass.from_dict(additional_properties_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesObject.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesObject.md index 8b9259c687f6..a9d656a6caf1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesObject.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesObject.md @@ -21,7 +21,7 @@ print AdditionalPropertiesObject.to_json() # convert the object into a dict additional_properties_object_dict = additional_properties_object_instance.to_dict() # create an instance of AdditionalPropertiesObject from a dict -additional_properties_object_form_dict = additional_properties_object.from_dict(additional_properties_object_dict) +additional_properties_object_from_dict = AdditionalPropertiesObject.from_dict(additional_properties_object_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesWithDescriptionOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesWithDescriptionOnly.md index d66094f18e57..f86bb3f609c5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesWithDescriptionOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AdditionalPropertiesWithDescriptionOnly.md @@ -21,7 +21,7 @@ print AdditionalPropertiesWithDescriptionOnly.to_json() # convert the object into a dict additional_properties_with_description_only_dict = additional_properties_with_description_only_instance.to_dict() # create an instance of AdditionalPropertiesWithDescriptionOnly from a dict -additional_properties_with_description_only_form_dict = additional_properties_with_description_only.from_dict(additional_properties_with_description_only_dict) +additional_properties_with_description_only_from_dict = AdditionalPropertiesWithDescriptionOnly.from_dict(additional_properties_with_description_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AllOfSuperModel.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AllOfSuperModel.md index 0e8a9bacf0e1..e26106e3447f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AllOfSuperModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AllOfSuperModel.md @@ -21,7 +21,7 @@ print AllOfSuperModel.to_json() # convert the object into a dict all_of_super_model_dict = all_of_super_model_instance.to_dict() # create an instance of AllOfSuperModel from a dict -all_of_super_model_form_dict = all_of_super_model.from_dict(all_of_super_model_dict) +all_of_super_model_from_dict = AllOfSuperModel.from_dict(all_of_super_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AllOfWithSingleRef.md index 1a8b4df7ecc5..8ad1d9798b77 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AllOfWithSingleRef.md @@ -22,7 +22,7 @@ print AllOfWithSingleRef.to_json() # convert the object into a dict all_of_with_single_ref_dict = all_of_with_single_ref_instance.to_dict() # create an instance of AllOfWithSingleRef from a dict -all_of_with_single_ref_form_dict = all_of_with_single_ref.from_dict(all_of_with_single_ref_dict) +all_of_with_single_ref_from_dict = AllOfWithSingleRef.from_dict(all_of_with_single_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Animal.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Animal.md index b62f19690994..af4959f50c11 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Animal.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Animal.md @@ -22,7 +22,7 @@ print Animal.to_json() # convert the object into a dict animal_dict = animal_instance.to_dict() # create an instance of Animal from a dict -animal_form_dict = animal.from_dict(animal_dict) +animal_from_dict = Animal.from_dict(animal_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AnyOfColor.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AnyOfColor.md index 9b161ccba1c0..96290acbf9ac 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AnyOfColor.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AnyOfColor.md @@ -21,7 +21,7 @@ print AnyOfColor.to_json() # convert the object into a dict any_of_color_dict = any_of_color_instance.to_dict() # create an instance of AnyOfColor from a dict -any_of_color_form_dict = any_of_color.from_dict(any_of_color_dict) +any_of_color_from_dict = AnyOfColor.from_dict(any_of_color_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AnyOfPig.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AnyOfPig.md index 2da7ca6eefe7..7c39ea27e99c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/AnyOfPig.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/AnyOfPig.md @@ -23,7 +23,7 @@ print AnyOfPig.to_json() # convert the object into a dict any_of_pig_dict = any_of_pig_instance.to_dict() # create an instance of AnyOfPig from a dict -any_of_pig_form_dict = any_of_pig.from_dict(any_of_pig_dict) +any_of_pig_from_dict = AnyOfPig.from_dict(any_of_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ApiResponse.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ApiResponse.md index ba35ea9e2f0e..6102313cb14e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ApiResponse.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ApiResponse.md @@ -23,7 +23,7 @@ print ApiResponse.to_json() # convert the object into a dict api_response_dict = api_response_instance.to_dict() # create an instance of ApiResponse from a dict -api_response_form_dict = api_response.from_dict(api_response_dict) +api_response_from_dict = ApiResponse.from_dict(api_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfArrayOfModel.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfArrayOfModel.md index 094061592613..0b93fb437aba 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfArrayOfModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfArrayOfModel.md @@ -21,7 +21,7 @@ print ArrayOfArrayOfModel.to_json() # convert the object into a dict array_of_array_of_model_dict = array_of_array_of_model_instance.to_dict() # create an instance of ArrayOfArrayOfModel from a dict -array_of_array_of_model_form_dict = array_of_array_of_model.from_dict(array_of_array_of_model_dict) +array_of_array_of_model_from_dict = ArrayOfArrayOfModel.from_dict(array_of_array_of_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfArrayOfNumberOnly.md index 3f0c127d4fa3..4bb70bf2786b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfArrayOfNumberOnly.md @@ -21,7 +21,7 @@ print ArrayOfArrayOfNumberOnly.to_json() # convert the object into a dict array_of_array_of_number_only_dict = array_of_array_of_number_only_instance.to_dict() # create an instance of ArrayOfArrayOfNumberOnly from a dict -array_of_array_of_number_only_form_dict = array_of_array_of_number_only.from_dict(array_of_array_of_number_only_dict) +array_of_array_of_number_only_from_dict = ArrayOfArrayOfNumberOnly.from_dict(array_of_array_of_number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfNumberOnly.md index c10191915a70..395ad7f9f8bb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayOfNumberOnly.md @@ -21,7 +21,7 @@ print ArrayOfNumberOnly.to_json() # convert the object into a dict array_of_number_only_dict = array_of_number_only_instance.to_dict() # create an instance of ArrayOfNumberOnly from a dict -array_of_number_only_form_dict = array_of_number_only.from_dict(array_of_number_only_dict) +array_of_number_only_from_dict = ArrayOfNumberOnly.from_dict(array_of_number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayTest.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayTest.md index d99d1a3c4aed..0b2fb30bff34 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ArrayTest.md @@ -24,7 +24,7 @@ print ArrayTest.to_json() # convert the object into a dict array_test_dict = array_test_instance.to_dict() # create an instance of ArrayTest from a dict -array_test_form_dict = array_test.from_dict(array_test_dict) +array_test_from_dict = ArrayTest.from_dict(array_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/BasquePig.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/BasquePig.md index 552b9390c7e5..4e3b5052dbcb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/BasquePig.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/BasquePig.md @@ -22,7 +22,7 @@ print BasquePig.to_json() # convert the object into a dict basque_pig_dict = basque_pig_instance.to_dict() # create an instance of BasquePig from a dict -basque_pig_form_dict = basque_pig.from_dict(basque_pig_dict) +basque_pig_from_dict = BasquePig.from_dict(basque_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Bathing.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Bathing.md index f7844f95d54d..0841a9898aba 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Bathing.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Bathing.md @@ -23,7 +23,7 @@ print Bathing.to_json() # convert the object into a dict bathing_dict = bathing_instance.to_dict() # create an instance of Bathing from a dict -bathing_form_dict = bathing.from_dict(bathing_dict) +bathing_from_dict = Bathing.from_dict(bathing_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Capitalization.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Capitalization.md index 99e6fae88fde..44024234da33 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Capitalization.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Capitalization.md @@ -26,7 +26,7 @@ print Capitalization.to_json() # convert the object into a dict capitalization_dict = capitalization_instance.to_dict() # create an instance of Capitalization from a dict -capitalization_form_dict = capitalization.from_dict(capitalization_dict) +capitalization_from_dict = Capitalization.from_dict(capitalization_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Cat.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Cat.md index 4b509dda7ea3..0880a52adec8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Cat.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Cat.md @@ -21,7 +21,7 @@ print Cat.to_json() # convert the object into a dict cat_dict = cat_instance.to_dict() # create an instance of Cat from a dict -cat_form_dict = cat.from_dict(cat_dict) +cat_from_dict = Cat.from_dict(cat_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Category.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Category.md index c49514ef8023..072bc446592c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Category.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Category.md @@ -22,7 +22,7 @@ print Category.to_json() # convert the object into a dict category_dict = category_instance.to_dict() # create an instance of Category from a dict -category_form_dict = category.from_dict(category_dict) +category_from_dict = Category.from_dict(category_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/CircularAllOfRef.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/CircularAllOfRef.md index d4c78e1f4029..3c6bc5fa6f7f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/CircularAllOfRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/CircularAllOfRef.md @@ -22,7 +22,7 @@ print CircularAllOfRef.to_json() # convert the object into a dict circular_all_of_ref_dict = circular_all_of_ref_instance.to_dict() # create an instance of CircularAllOfRef from a dict -circular_all_of_ref_form_dict = circular_all_of_ref.from_dict(circular_all_of_ref_dict) +circular_all_of_ref_from_dict = CircularAllOfRef.from_dict(circular_all_of_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/CircularReferenceModel.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/CircularReferenceModel.md index d5e97934d2be..f9cfab080e18 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/CircularReferenceModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/CircularReferenceModel.md @@ -22,7 +22,7 @@ print CircularReferenceModel.to_json() # convert the object into a dict circular_reference_model_dict = circular_reference_model_instance.to_dict() # create an instance of CircularReferenceModel from a dict -circular_reference_model_form_dict = circular_reference_model.from_dict(circular_reference_model_dict) +circular_reference_model_from_dict = CircularReferenceModel.from_dict(circular_reference_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ClassModel.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ClassModel.md index 1b6fb7cfc77d..c8c17439ce33 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ClassModel.md @@ -22,7 +22,7 @@ print ClassModel.to_json() # convert the object into a dict class_model_dict = class_model_instance.to_dict() # create an instance of ClassModel from a dict -class_model_form_dict = class_model.from_dict(class_model_dict) +class_model_from_dict = ClassModel.from_dict(class_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Client.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Client.md index b0ded10dd762..60d8102c5423 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Client.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Client.md @@ -21,7 +21,7 @@ print Client.to_json() # convert the object into a dict client_dict = client_instance.to_dict() # create an instance of Client from a dict -client_form_dict = client.from_dict(client_dict) +client_from_dict = Client.from_dict(client_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Color.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Color.md index 07fcd01991ac..b320dcf0e9a5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Color.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Color.md @@ -21,7 +21,7 @@ print Color.to_json() # convert the object into a dict color_dict = color_instance.to_dict() # create an instance of Color from a dict -color_form_dict = color.from_dict(color_dict) +color_from_dict = Color.from_dict(color_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Creature.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Creature.md index 54249d5871e0..4460f1a04c52 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Creature.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Creature.md @@ -22,7 +22,7 @@ print Creature.to_json() # convert the object into a dict creature_dict = creature_instance.to_dict() # create an instance of Creature from a dict -creature_form_dict = creature.from_dict(creature_dict) +creature_from_dict = Creature.from_dict(creature_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/CreatureInfo.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/CreatureInfo.md index 5a600b9f3374..1df6883a71b8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/CreatureInfo.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/CreatureInfo.md @@ -21,7 +21,7 @@ print CreatureInfo.to_json() # convert the object into a dict creature_info_dict = creature_info_instance.to_dict() # create an instance of CreatureInfo from a dict -creature_info_form_dict = creature_info.from_dict(creature_info_dict) +creature_info_from_dict = CreatureInfo.from_dict(creature_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DanishPig.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DanishPig.md index 253616c2fc32..33faed741892 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DanishPig.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DanishPig.md @@ -22,7 +22,7 @@ print DanishPig.to_json() # convert the object into a dict danish_pig_dict = danish_pig_instance.to_dict() # create an instance of DanishPig from a dict -danish_pig_form_dict = danish_pig.from_dict(danish_pig_dict) +danish_pig_from_dict = DanishPig.from_dict(danish_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DeprecatedObject.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DeprecatedObject.md index e6cf57189634..a12d1cad419c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DeprecatedObject.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DeprecatedObject.md @@ -21,7 +21,7 @@ print DeprecatedObject.to_json() # convert the object into a dict deprecated_object_dict = deprecated_object_instance.to_dict() # create an instance of DeprecatedObject from a dict -deprecated_object_form_dict = deprecated_object.from_dict(deprecated_object_dict) +deprecated_object_from_dict = DeprecatedObject.from_dict(deprecated_object_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DiscriminatorAllOfSub.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DiscriminatorAllOfSub.md index b5dcd9919262..dc27629cd1fd 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DiscriminatorAllOfSub.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DiscriminatorAllOfSub.md @@ -20,7 +20,7 @@ print DiscriminatorAllOfSub.to_json() # convert the object into a dict discriminator_all_of_sub_dict = discriminator_all_of_sub_instance.to_dict() # create an instance of DiscriminatorAllOfSub from a dict -discriminator_all_of_sub_form_dict = discriminator_all_of_sub.from_dict(discriminator_all_of_sub_dict) +discriminator_all_of_sub_from_dict = DiscriminatorAllOfSub.from_dict(discriminator_all_of_sub_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DiscriminatorAllOfSuper.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DiscriminatorAllOfSuper.md index 9564ca75c80e..7506eb150b27 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DiscriminatorAllOfSuper.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DiscriminatorAllOfSuper.md @@ -21,7 +21,7 @@ print DiscriminatorAllOfSuper.to_json() # convert the object into a dict discriminator_all_of_super_dict = discriminator_all_of_super_instance.to_dict() # create an instance of DiscriminatorAllOfSuper from a dict -discriminator_all_of_super_form_dict = discriminator_all_of_super.from_dict(discriminator_all_of_super_dict) +discriminator_all_of_super_from_dict = DiscriminatorAllOfSuper.from_dict(discriminator_all_of_super_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Dog.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Dog.md index 3469be73a761..ebef27d81d6b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Dog.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Dog.md @@ -21,7 +21,7 @@ print Dog.to_json() # convert the object into a dict dog_dict = dog_instance.to_dict() # create an instance of Dog from a dict -dog_form_dict = dog.from_dict(dog_dict) +dog_from_dict = Dog.from_dict(dog_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DummyModel.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DummyModel.md index e690a8874f8c..52483957a5eb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/DummyModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/DummyModel.md @@ -22,7 +22,7 @@ print DummyModel.to_json() # convert the object into a dict dummy_model_dict = dummy_model_instance.to_dict() # create an instance of DummyModel from a dict -dummy_model_form_dict = dummy_model.from_dict(dummy_model_dict) +dummy_model_from_dict = DummyModel.from_dict(dummy_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/EnumArrays.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/EnumArrays.md index d21f58a66087..4f4004c16724 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/EnumArrays.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/EnumArrays.md @@ -22,7 +22,7 @@ print EnumArrays.to_json() # convert the object into a dict enum_arrays_dict = enum_arrays_instance.to_dict() # create an instance of EnumArrays from a dict -enum_arrays_form_dict = enum_arrays.from_dict(enum_arrays_dict) +enum_arrays_from_dict = EnumArrays.from_dict(enum_arrays_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/EnumTest.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/EnumTest.md index 5bcb8e7027e3..6dee11438f2d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/EnumTest.md @@ -29,7 +29,7 @@ print EnumTest.to_json() # convert the object into a dict enum_test_dict = enum_test_instance.to_dict() # create an instance of EnumTest from a dict -enum_test_form_dict = enum_test.from_dict(enum_test_dict) +enum_test_from_dict = EnumTest.from_dict(enum_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md index a4f0f72b5bd5..59d600df9879 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md @@ -624,7 +624,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fake_property_enum_integer_serialize** -> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property) +> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param) @@ -636,6 +636,7 @@ Test serialization of enum (int) properties with examples import time import os import petstore_api +from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.rest import ApiException from pprint import pprint @@ -652,9 +653,10 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) outer_object_with_enum_property = petstore_api.OuterObjectWithEnumProperty() # OuterObjectWithEnumProperty | Input enum (int) as post body + param = [petstore_api.OuterEnumInteger()] # List[OuterEnumInteger] | (optional) try: - api_response = api_instance.fake_property_enum_integer_serialize(outer_object_with_enum_property) + api_response = api_instance.fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param) print("The response of FakeApi->fake_property_enum_integer_serialize:\n") pprint(api_response) except Exception as e: @@ -668,6 +670,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **outer_object_with_enum_property** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **param** | [**List[OuterEnumInteger]**](OuterEnumInteger.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Feeding.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Feeding.md index 30750a67a075..8bc540ad389f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Feeding.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Feeding.md @@ -23,7 +23,7 @@ print Feeding.to_json() # convert the object into a dict feeding_dict = feeding_instance.to_dict() # create an instance of Feeding from a dict -feeding_form_dict = feeding.from_dict(feeding_dict) +feeding_from_dict = Feeding.from_dict(feeding_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Field.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Field.md index 01abebbda172..0e45544dd0d4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Field.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Field.md @@ -21,7 +21,7 @@ print Field.to_json() # convert the object into a dict field_dict = field_instance.to_dict() # create an instance of Field from a dict -field_form_dict = field.from_dict(field_dict) +field_from_dict = Field.from_dict(field_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/File.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/File.md index 586da8e32559..019c02129a94 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/File.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/File.md @@ -22,7 +22,7 @@ print File.to_json() # convert the object into a dict file_dict = file_instance.to_dict() # create an instance of File from a dict -file_form_dict = file.from_dict(file_dict) +file_from_dict = File.from_dict(file_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FileSchemaTestClass.md index fb967a8d9924..16f4b7a29c20 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FileSchemaTestClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FileSchemaTestClass.md @@ -22,7 +22,7 @@ print FileSchemaTestClass.to_json() # convert the object into a dict file_schema_test_class_dict = file_schema_test_class_instance.to_dict() # create an instance of FileSchemaTestClass from a dict -file_schema_test_class_form_dict = file_schema_test_class.from_dict(file_schema_test_class_dict) +file_schema_test_class_from_dict = FileSchemaTestClass.from_dict(file_schema_test_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FirstRef.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FirstRef.md index b5e7ab766b45..7b4539dec25d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FirstRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FirstRef.md @@ -22,7 +22,7 @@ print FirstRef.to_json() # convert the object into a dict first_ref_dict = first_ref_instance.to_dict() # create an instance of FirstRef from a dict -first_ref_form_dict = first_ref.from_dict(first_ref_dict) +first_ref_from_dict = FirstRef.from_dict(first_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Foo.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Foo.md index 8062d08df1dd..c337d6f1a838 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Foo.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Foo.md @@ -21,7 +21,7 @@ print Foo.to_json() # convert the object into a dict foo_dict = foo_instance.to_dict() # create an instance of Foo from a dict -foo_form_dict = foo.from_dict(foo_dict) +foo_from_dict = Foo.from_dict(foo_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FooGetDefaultResponse.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FooGetDefaultResponse.md index 550fbe78fa17..311cb6d51b57 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FooGetDefaultResponse.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FooGetDefaultResponse.md @@ -21,7 +21,7 @@ print FooGetDefaultResponse.to_json() # convert the object into a dict foo_get_default_response_dict = foo_get_default_response_instance.to_dict() # create an instance of FooGetDefaultResponse from a dict -foo_get_default_response_form_dict = foo_get_default_response.from_dict(foo_get_default_response_dict) +foo_get_default_response_from_dict = FooGetDefaultResponse.from_dict(foo_get_default_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FormatTest.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FormatTest.md index aa81e585952f..08287433303f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FormatTest.md @@ -37,7 +37,7 @@ print FormatTest.to_json() # convert the object into a dict format_test_dict = format_test_instance.to_dict() # create an instance of FormatTest from a dict -format_test_form_dict = format_test.from_dict(format_test_dict) +format_test_from_dict = FormatTest.from_dict(format_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/HasOnlyReadOnly.md index 99573bd28a2f..cbb1af037fd3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/HasOnlyReadOnly.md @@ -22,7 +22,7 @@ print HasOnlyReadOnly.to_json() # convert the object into a dict has_only_read_only_dict = has_only_read_only_instance.to_dict() # create an instance of HasOnlyReadOnly from a dict -has_only_read_only_form_dict = has_only_read_only.from_dict(has_only_read_only_dict) +has_only_read_only_from_dict = HasOnlyReadOnly.from_dict(has_only_read_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/HealthCheckResult.md index b8723e018aa1..7748c091cf4e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/HealthCheckResult.md @@ -22,7 +22,7 @@ print HealthCheckResult.to_json() # convert the object into a dict health_check_result_dict = health_check_result_instance.to_dict() # create an instance of HealthCheckResult from a dict -health_check_result_form_dict = health_check_result.from_dict(health_check_result_dict) +health_check_result_from_dict = HealthCheckResult.from_dict(health_check_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/InnerDictWithProperty.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/InnerDictWithProperty.md index 45d76ad458c4..4571e4dc1a42 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/InnerDictWithProperty.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/InnerDictWithProperty.md @@ -21,7 +21,7 @@ print InnerDictWithProperty.to_json() # convert the object into a dict inner_dict_with_property_dict = inner_dict_with_property_instance.to_dict() # create an instance of InnerDictWithProperty from a dict -inner_dict_with_property_form_dict = inner_dict_with_property.from_dict(inner_dict_with_property_dict) +inner_dict_with_property_from_dict = InnerDictWithProperty.from_dict(inner_dict_with_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/InputAllOf.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/InputAllOf.md index eddd22e48a4d..50e0f318e701 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/InputAllOf.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/InputAllOf.md @@ -21,7 +21,7 @@ print InputAllOf.to_json() # convert the object into a dict input_all_of_dict = input_all_of_instance.to_dict() # create an instance of InputAllOf from a dict -input_all_of_form_dict = input_all_of.from_dict(input_all_of_dict) +input_all_of_from_dict = InputAllOf.from_dict(input_all_of_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/IntOrString.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/IntOrString.md index 0a441f186dbc..5f234f7d20e2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/IntOrString.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/IntOrString.md @@ -20,7 +20,7 @@ print IntOrString.to_json() # convert the object into a dict int_or_string_dict = int_or_string_instance.to_dict() # create an instance of IntOrString from a dict -int_or_string_form_dict = int_or_string.from_dict(int_or_string_dict) +int_or_string_from_dict = IntOrString.from_dict(int_or_string_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ListClass.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ListClass.md index ceb1f50705bd..6d84bff6a837 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ListClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ListClass.md @@ -21,7 +21,7 @@ print ListClass.to_json() # convert the object into a dict list_class_dict = list_class_instance.to_dict() # create an instance of ListClass from a dict -list_class_form_dict = list_class.from_dict(list_class_dict) +list_class_from_dict = ListClass.from_dict(list_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/MapOfArrayOfModel.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/MapOfArrayOfModel.md index b97ace0f42c8..912a72c77431 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/MapOfArrayOfModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/MapOfArrayOfModel.md @@ -21,7 +21,7 @@ print MapOfArrayOfModel.to_json() # convert the object into a dict map_of_array_of_model_dict = map_of_array_of_model_instance.to_dict() # create an instance of MapOfArrayOfModel from a dict -map_of_array_of_model_form_dict = map_of_array_of_model.from_dict(map_of_array_of_model_dict) +map_of_array_of_model_from_dict = MapOfArrayOfModel.from_dict(map_of_array_of_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/MapTest.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/MapTest.md index ba87758a5220..37d65a59c8af 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/MapTest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/MapTest.md @@ -24,7 +24,7 @@ print MapTest.to_json() # convert the object into a dict map_test_dict = map_test_instance.to_dict() # create an instance of MapTest from a dict -map_test_form_dict = map_test.from_dict(map_test_dict) +map_test_from_dict = MapTest.from_dict(map_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 8f628d133abf..53d7988588b0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -23,7 +23,7 @@ print MixedPropertiesAndAdditionalPropertiesClass.to_json() # convert the object into a dict mixed_properties_and_additional_properties_class_dict = mixed_properties_and_additional_properties_class_instance.to_dict() # create an instance of MixedPropertiesAndAdditionalPropertiesClass from a dict -mixed_properties_and_additional_properties_class_form_dict = mixed_properties_and_additional_properties_class.from_dict(mixed_properties_and_additional_properties_class_dict) +mixed_properties_and_additional_properties_class_from_dict = MixedPropertiesAndAdditionalPropertiesClass.from_dict(mixed_properties_and_additional_properties_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Model200Response.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Model200Response.md index 6a20cefe99cb..bd6b6ce21aab 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Model200Response.md @@ -23,7 +23,7 @@ print Model200Response.to_json() # convert the object into a dict model200_response_dict = model200_response_instance.to_dict() # create an instance of Model200Response from a dict -model200_response_form_dict = model200_response.from_dict(model200_response_dict) +model200_response_from_dict = Model200Response.from_dict(model200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ModelReturn.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ModelReturn.md index a5b47f423c81..a69b543d4616 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ModelReturn.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ModelReturn.md @@ -22,7 +22,7 @@ print ModelReturn.to_json() # convert the object into a dict model_return_dict = model_return_instance.to_dict() # create an instance of ModelReturn from a dict -model_return_form_dict = model_return.from_dict(model_return_dict) +model_return_from_dict = ModelReturn.from_dict(model_return_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Name.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Name.md index 4ccd0ce09aa2..b2cf3013a47c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Name.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Name.md @@ -25,7 +25,7 @@ print Name.to_json() # convert the object into a dict name_dict = name_instance.to_dict() # create an instance of Name from a dict -name_form_dict = name.from_dict(name_dict) +name_from_dict = Name.from_dict(name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/NullableClass.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/NullableClass.md index 1658756b50e4..d6ca700c8877 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/NullableClass.md @@ -33,7 +33,7 @@ print NullableClass.to_json() # convert the object into a dict nullable_class_dict = nullable_class_instance.to_dict() # create an instance of NullableClass from a dict -nullable_class_form_dict = nullable_class.from_dict(nullable_class_dict) +nullable_class_from_dict = NullableClass.from_dict(nullable_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/NullableProperty.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/NullableProperty.md index fd9cbbc51aaa..3771860aafb3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/NullableProperty.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/NullableProperty.md @@ -22,7 +22,7 @@ print NullableProperty.to_json() # convert the object into a dict nullable_property_dict = nullable_property_instance.to_dict() # create an instance of NullableProperty from a dict -nullable_property_form_dict = nullable_property.from_dict(nullable_property_dict) +nullable_property_from_dict = NullableProperty.from_dict(nullable_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/NumberOnly.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/NumberOnly.md index f49216ddaa4e..eb51449dc207 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/NumberOnly.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/NumberOnly.md @@ -21,7 +21,7 @@ print NumberOnly.to_json() # convert the object into a dict number_only_dict = number_only_instance.to_dict() # create an instance of NumberOnly from a dict -number_only_form_dict = number_only.from_dict(number_only_dict) +number_only_from_dict = NumberOnly.from_dict(number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ObjectToTestAdditionalProperties.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ObjectToTestAdditionalProperties.md index c4ba9a958503..52d741dcd51f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ObjectToTestAdditionalProperties.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ObjectToTestAdditionalProperties.md @@ -22,7 +22,7 @@ print ObjectToTestAdditionalProperties.to_json() # convert the object into a dict object_to_test_additional_properties_dict = object_to_test_additional_properties_instance.to_dict() # create an instance of ObjectToTestAdditionalProperties from a dict -object_to_test_additional_properties_form_dict = object_to_test_additional_properties.from_dict(object_to_test_additional_properties_dict) +object_to_test_additional_properties_from_dict = ObjectToTestAdditionalProperties.from_dict(object_to_test_additional_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ObjectWithDeprecatedFields.md index 8daa55a39161..324130af8dd4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ObjectWithDeprecatedFields.md @@ -24,7 +24,7 @@ print ObjectWithDeprecatedFields.to_json() # convert the object into a dict object_with_deprecated_fields_dict = object_with_deprecated_fields_instance.to_dict() # create an instance of ObjectWithDeprecatedFields from a dict -object_with_deprecated_fields_form_dict = object_with_deprecated_fields.from_dict(object_with_deprecated_fields_dict) +object_with_deprecated_fields_from_dict = ObjectWithDeprecatedFields.from_dict(object_with_deprecated_fields_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OneOfEnumString.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OneOfEnumString.md index c7c28bc29440..981fae92dee3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OneOfEnumString.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OneOfEnumString.md @@ -21,7 +21,7 @@ print OneOfEnumString.to_json() # convert the object into a dict one_of_enum_string_dict = one_of_enum_string_instance.to_dict() # create an instance of OneOfEnumString from a dict -one_of_enum_string_form_dict = one_of_enum_string.from_dict(one_of_enum_string_dict) +one_of_enum_string_from_dict = OneOfEnumString.from_dict(one_of_enum_string_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Order.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Order.md index e71e955a11dd..2eaed8c9278e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Order.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Order.md @@ -26,7 +26,7 @@ print Order.to_json() # convert the object into a dict order_dict = order_instance.to_dict() # create an instance of Order from a dict -order_form_dict = order.from_dict(order_dict) +order_from_dict = Order.from_dict(order_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterComposite.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterComposite.md index 504e266f9a14..f9dc458046be 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterComposite.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterComposite.md @@ -23,7 +23,7 @@ print OuterComposite.to_json() # convert the object into a dict outer_composite_dict = outer_composite_instance.to_dict() # create an instance of OuterComposite from a dict -outer_composite_form_dict = outer_composite.from_dict(outer_composite_dict) +outer_composite_from_dict = OuterComposite.from_dict(outer_composite_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterObjectWithEnumProperty.md index c6a1cdcbc193..f7ea908c9241 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterObjectWithEnumProperty.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterObjectWithEnumProperty.md @@ -22,7 +22,7 @@ print OuterObjectWithEnumProperty.to_json() # convert the object into a dict outer_object_with_enum_property_dict = outer_object_with_enum_property_instance.to_dict() # create an instance of OuterObjectWithEnumProperty from a dict -outer_object_with_enum_property_form_dict = outer_object_with_enum_property.from_dict(outer_object_with_enum_property_dict) +outer_object_with_enum_property_from_dict = OuterObjectWithEnumProperty.from_dict(outer_object_with_enum_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Parent.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Parent.md index 9a963a6b722d..de6fb2bf47a9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Parent.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Parent.md @@ -21,7 +21,7 @@ print Parent.to_json() # convert the object into a dict parent_dict = parent_instance.to_dict() # create an instance of Parent from a dict -parent_form_dict = parent.from_dict(parent_dict) +parent_from_dict = Parent.from_dict(parent_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ParentWithOptionalDict.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ParentWithOptionalDict.md index 04bf94942019..817faeed32f4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ParentWithOptionalDict.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ParentWithOptionalDict.md @@ -21,7 +21,7 @@ print ParentWithOptionalDict.to_json() # convert the object into a dict parent_with_optional_dict_dict = parent_with_optional_dict_instance.to_dict() # create an instance of ParentWithOptionalDict from a dict -parent_with_optional_dict_form_dict = parent_with_optional_dict.from_dict(parent_with_optional_dict_dict) +parent_with_optional_dict_from_dict = ParentWithOptionalDict.from_dict(parent_with_optional_dict_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Pet.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Pet.md index 05a466f880a3..4eedd9366ac6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Pet.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Pet.md @@ -26,7 +26,7 @@ print Pet.to_json() # convert the object into a dict pet_dict = pet_instance.to_dict() # create an instance of Pet from a dict -pet_form_dict = pet.from_dict(pet_dict) +pet_from_dict = Pet.from_dict(pet_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Pig.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Pig.md index 398d6c6c6e38..e729adee35e7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Pig.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Pig.md @@ -23,7 +23,7 @@ print Pig.to_json() # convert the object into a dict pig_dict = pig_instance.to_dict() # create an instance of Pig from a dict -pig_form_dict = pig.from_dict(pig_dict) +pig_from_dict = Pig.from_dict(pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/PoopCleaning.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/PoopCleaning.md index bbc93c0203c0..2f0ff6470bc9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/PoopCleaning.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/PoopCleaning.md @@ -23,7 +23,7 @@ print PoopCleaning.to_json() # convert the object into a dict poop_cleaning_dict = poop_cleaning_instance.to_dict() # create an instance of PoopCleaning from a dict -poop_cleaning_form_dict = poop_cleaning.from_dict(poop_cleaning_dict) +poop_cleaning_from_dict = PoopCleaning.from_dict(poop_cleaning_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/PropertyMap.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/PropertyMap.md index f7cf4ba89338..2b727c644096 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/PropertyMap.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/PropertyMap.md @@ -21,7 +21,7 @@ print PropertyMap.to_json() # convert the object into a dict property_map_dict = property_map_instance.to_dict() # create an instance of PropertyMap from a dict -property_map_form_dict = property_map.from_dict(property_map_dict) +property_map_from_dict = PropertyMap.from_dict(property_map_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/PropertyNameCollision.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/PropertyNameCollision.md index 1a9303701b0a..b3394adb08bb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/PropertyNameCollision.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/PropertyNameCollision.md @@ -23,7 +23,7 @@ print PropertyNameCollision.to_json() # convert the object into a dict property_name_collision_dict = property_name_collision_instance.to_dict() # create an instance of PropertyNameCollision from a dict -property_name_collision_form_dict = property_name_collision.from_dict(property_name_collision_dict) +property_name_collision_from_dict = PropertyNameCollision.from_dict(property_name_collision_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ReadOnlyFirst.md index 22b5acca70c7..a67f2705bd10 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/ReadOnlyFirst.md @@ -22,7 +22,7 @@ print ReadOnlyFirst.to_json() # convert the object into a dict read_only_first_dict = read_only_first_instance.to_dict() # create an instance of ReadOnlyFirst from a dict -read_only_first_form_dict = read_only_first.from_dict(read_only_first_dict) +read_only_first_from_dict = ReadOnlyFirst.from_dict(read_only_first_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SecondCircularAllOfRef.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SecondCircularAllOfRef.md index 4460634382a2..bcb8b5fe4539 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SecondCircularAllOfRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SecondCircularAllOfRef.md @@ -22,7 +22,7 @@ print SecondCircularAllOfRef.to_json() # convert the object into a dict second_circular_all_of_ref_dict = second_circular_all_of_ref_instance.to_dict() # create an instance of SecondCircularAllOfRef from a dict -second_circular_all_of_ref_form_dict = second_circular_all_of_ref.from_dict(second_circular_all_of_ref_dict) +second_circular_all_of_ref_from_dict = SecondCircularAllOfRef.from_dict(second_circular_all_of_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SecondRef.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SecondRef.md index e6fb1e2d4f7c..a75a54047b79 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SecondRef.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SecondRef.md @@ -22,7 +22,7 @@ print SecondRef.to_json() # convert the object into a dict second_ref_dict = second_ref_instance.to_dict() # create an instance of SecondRef from a dict -second_ref_form_dict = second_ref.from_dict(second_ref_dict) +second_ref_from_dict = SecondRef.from_dict(second_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SelfReferenceModel.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SelfReferenceModel.md index dbf9589d576b..1761dbbf3718 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SelfReferenceModel.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SelfReferenceModel.md @@ -22,7 +22,7 @@ print SelfReferenceModel.to_json() # convert the object into a dict self_reference_model_dict = self_reference_model_instance.to_dict() # create an instance of SelfReferenceModel from a dict -self_reference_model_form_dict = self_reference_model.from_dict(self_reference_model_dict) +self_reference_model_from_dict = SelfReferenceModel.from_dict(self_reference_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SpecialModelName.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SpecialModelName.md index 3d27640abb04..04341261b0b6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SpecialModelName.md @@ -21,7 +21,7 @@ print SpecialModelName.to_json() # convert the object into a dict special_model_name_dict = special_model_name_instance.to_dict() # create an instance of SpecialModelName from a dict -special_model_name_form_dict = special_model_name.from_dict(special_model_name_dict) +special_model_name_from_dict = SpecialModelName.from_dict(special_model_name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SpecialName.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SpecialName.md index 0b4129525978..ffd2b6b69ba4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/SpecialName.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/SpecialName.md @@ -23,7 +23,7 @@ print SpecialName.to_json() # convert the object into a dict special_name_dict = special_name_instance.to_dict() # create an instance of SpecialName from a dict -special_name_form_dict = special_name.from_dict(special_name_dict) +special_name_from_dict = SpecialName.from_dict(special_name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Tag.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Tag.md index e680c68bedd8..008d363a3b8d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Tag.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Tag.md @@ -22,7 +22,7 @@ print Tag.to_json() # convert the object into a dict tag_dict = tag_instance.to_dict() # create an instance of Tag from a dict -tag_form_dict = tag.from_dict(tag_dict) +tag_from_dict = Tag.from_dict(tag_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Task.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Task.md index aefe66e7638b..42d4dfd17a16 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Task.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Task.md @@ -23,7 +23,7 @@ print Task.to_json() # convert the object into a dict task_dict = task_instance.to_dict() # create an instance of Task from a dict -task_form_dict = task.from_dict(task_dict) +task_from_dict = Task.from_dict(task_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TaskActivity.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TaskActivity.md index eb2549061563..381e58581e68 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TaskActivity.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TaskActivity.md @@ -23,7 +23,7 @@ print TaskActivity.to_json() # convert the object into a dict task_activity_dict = task_activity_instance.to_dict() # create an instance of TaskActivity from a dict -task_activity_form_dict = task_activity.from_dict(task_activity_dict) +task_activity_from_dict = TaskActivity.from_dict(task_activity_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel400Response.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel400Response.md index 1ef43ce4cadc..98d3e7fe8933 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel400Response.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel400Response.md @@ -21,7 +21,7 @@ print TestErrorResponsesWithModel400Response.to_json() # convert the object into a dict test_error_responses_with_model400_response_dict = test_error_responses_with_model400_response_instance.to_dict() # create an instance of TestErrorResponsesWithModel400Response from a dict -test_error_responses_with_model400_response_form_dict = test_error_responses_with_model400_response.from_dict(test_error_responses_with_model400_response_dict) +test_error_responses_with_model400_response_from_dict = TestErrorResponsesWithModel400Response.from_dict(test_error_responses_with_model400_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel404Response.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel404Response.md index 9fda95537846..e36e255b21ee 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel404Response.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel404Response.md @@ -21,7 +21,7 @@ print TestErrorResponsesWithModel404Response.to_json() # convert the object into a dict test_error_responses_with_model404_response_dict = test_error_responses_with_model404_response_instance.to_dict() # create an instance of TestErrorResponsesWithModel404Response from a dict -test_error_responses_with_model404_response_form_dict = test_error_responses_with_model404_response.from_dict(test_error_responses_with_model404_response_dict) +test_error_responses_with_model404_response_from_dict = TestErrorResponsesWithModel404Response.from_dict(test_error_responses_with_model404_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestInlineFreeformAdditionalPropertiesRequest.md index 7cf86c5244e3..7f0046907533 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestInlineFreeformAdditionalPropertiesRequest.md @@ -21,7 +21,7 @@ print TestInlineFreeformAdditionalPropertiesRequest.to_json() # convert the object into a dict test_inline_freeform_additional_properties_request_dict = test_inline_freeform_additional_properties_request_instance.to_dict() # create an instance of TestInlineFreeformAdditionalPropertiesRequest from a dict -test_inline_freeform_additional_properties_request_form_dict = test_inline_freeform_additional_properties_request.from_dict(test_inline_freeform_additional_properties_request_dict) +test_inline_freeform_additional_properties_request_from_dict = TestInlineFreeformAdditionalPropertiesRequest.from_dict(test_inline_freeform_additional_properties_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestObjectForMultipartRequestsRequestMarker.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestObjectForMultipartRequestsRequestMarker.md index 25613918e920..c85a2648872a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestObjectForMultipartRequestsRequestMarker.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestObjectForMultipartRequestsRequestMarker.md @@ -21,7 +21,7 @@ print TestObjectForMultipartRequestsRequestMarker.to_json() # convert the object into a dict test_object_for_multipart_requests_request_marker_dict = test_object_for_multipart_requests_request_marker_instance.to_dict() # create an instance of TestObjectForMultipartRequestsRequestMarker from a dict -test_object_for_multipart_requests_request_marker_form_dict = test_object_for_multipart_requests_request_marker.from_dict(test_object_for_multipart_requests_request_marker_dict) +test_object_for_multipart_requests_request_marker_from_dict = TestObjectForMultipartRequestsRequestMarker.from_dict(test_object_for_multipart_requests_request_marker_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Tiger.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Tiger.md index 6ce50a31f5ae..48dd71e9c83e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/Tiger.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/Tiger.md @@ -21,7 +21,7 @@ print Tiger.to_json() # convert the object into a dict tiger_dict = tiger_instance.to_dict() # create an instance of Tiger from a dict -tiger_form_dict = tiger.from_dict(tiger_dict) +tiger_from_dict = Tiger.from_dict(tiger_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/UnnamedDictWithAdditionalModelListProperties.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/UnnamedDictWithAdditionalModelListProperties.md index c102bb86bebf..784b34c29659 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/UnnamedDictWithAdditionalModelListProperties.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/UnnamedDictWithAdditionalModelListProperties.md @@ -21,7 +21,7 @@ print UnnamedDictWithAdditionalModelListProperties.to_json() # convert the object into a dict unnamed_dict_with_additional_model_list_properties_dict = unnamed_dict_with_additional_model_list_properties_instance.to_dict() # create an instance of UnnamedDictWithAdditionalModelListProperties from a dict -unnamed_dict_with_additional_model_list_properties_form_dict = unnamed_dict_with_additional_model_list_properties.from_dict(unnamed_dict_with_additional_model_list_properties_dict) +unnamed_dict_with_additional_model_list_properties_from_dict = UnnamedDictWithAdditionalModelListProperties.from_dict(unnamed_dict_with_additional_model_list_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/UnnamedDictWithAdditionalStringListProperties.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/UnnamedDictWithAdditionalStringListProperties.md index 926404ccd6ee..904c007e2072 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/UnnamedDictWithAdditionalStringListProperties.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/UnnamedDictWithAdditionalStringListProperties.md @@ -21,7 +21,7 @@ print UnnamedDictWithAdditionalStringListProperties.to_json() # convert the object into a dict unnamed_dict_with_additional_string_list_properties_dict = unnamed_dict_with_additional_string_list_properties_instance.to_dict() # create an instance of UnnamedDictWithAdditionalStringListProperties from a dict -unnamed_dict_with_additional_string_list_properties_form_dict = unnamed_dict_with_additional_string_list_properties.from_dict(unnamed_dict_with_additional_string_list_properties_dict) +unnamed_dict_with_additional_string_list_properties_from_dict = UnnamedDictWithAdditionalStringListProperties.from_dict(unnamed_dict_with_additional_string_list_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/User.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/User.md index 6d7c357ea865..ff5b1d6f1731 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/User.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/User.md @@ -28,7 +28,7 @@ print User.to_json() # convert the object into a dict user_dict = user_instance.to_dict() # create an instance of User from a dict -user_form_dict = user.from_dict(user_dict) +user_from_dict = User.from_dict(user_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/WithNestedOneOf.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/WithNestedOneOf.md index 247afcab99da..f08130c28392 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/WithNestedOneOf.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/WithNestedOneOf.md @@ -23,7 +23,7 @@ print WithNestedOneOf.to_json() # convert the object into a dict with_nested_one_of_dict = with_nested_one_of_instance.to_dict() # create an instance of WithNestedOneOf from a dict -with_nested_one_of_form_dict = with_nested_one_of.from_dict(with_nested_one_of_dict) +with_nested_one_of_from_dict = WithNestedOneOf.from_dict(with_nested_one_of_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py index cc35197590a2..88992b423cc3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py @@ -30,6 +30,7 @@ from petstore_api.models.file_schema_test_class import FileSchemaTestClass from petstore_api.models.health_check_result import HealthCheckResult from petstore_api.models.outer_composite import OuterComposite +from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.models.pet import Pet from petstore_api.models.tag import Tag @@ -1202,18 +1203,20 @@ def fake_outer_string_serialize_with_http_info(self, body : Annotated[Optional[S _request_auth=_params.get('_request_auth')) @validate_arguments - def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 + def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], param : Optional[conlist(OuterEnumInteger)] = None, **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.fake_property_enum_integer_serialize(outer_object_with_enum_property, async_req=True) + >>> thread = api.fake_property_enum_integer_serialize(outer_object_with_enum_property, param, async_req=True) >>> result = thread.get() :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _request_timeout: timeout setting for this request. @@ -1229,21 +1232,23 @@ def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : if '_preload_content' in kwargs: message = "Error! Please call the fake_property_enum_integer_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, **kwargs) # noqa: E501 + return self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, param, **kwargs) # noqa: E501 @validate_arguments - def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], **kwargs) -> ApiResponse: # noqa: E501 + def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], param : Optional[conlist(OuterEnumInteger)] = None, **kwargs) -> ApiResponse: # noqa: E501 """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, async_req=True) + >>> thread = api.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, param, async_req=True) >>> result = thread.get() :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will @@ -1272,7 +1277,8 @@ def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_ _params = locals() _all_params = [ - 'outer_object_with_enum_property' + 'outer_object_with_enum_property', + 'param' ] _all_params.extend( [ @@ -1303,6 +1309,10 @@ def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_ # process the query parameters _query_params = [] + if _params.get('param') is not None: # noqa: E501 + _query_params.append(('param', _params['param'])) + _collection_formats['param'] = 'multi' + # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters diff --git a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesAnyType.md b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesAnyType.md index a47fbd732607..314cba3a614c 100644 --- a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesAnyType.md +++ b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesAnyType.md @@ -22,7 +22,7 @@ print(AdditionalPropertiesAnyType.to_json()) # convert the object into a dict additional_properties_any_type_dict = additional_properties_any_type_instance.to_dict() # create an instance of AdditionalPropertiesAnyType from a dict -additional_properties_any_type_form_dict = additional_properties_any_type.from_dict(additional_properties_any_type_dict) +additional_properties_any_type_from_dict = AdditionalPropertiesAnyType.from_dict(additional_properties_any_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md index a19d1b338e68..8d4c08707f55 100644 --- a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md @@ -23,7 +23,7 @@ print(AdditionalPropertiesClass.to_json()) # convert the object into a dict additional_properties_class_dict = additional_properties_class_instance.to_dict() # create an instance of AdditionalPropertiesClass from a dict -additional_properties_class_form_dict = additional_properties_class.from_dict(additional_properties_class_dict) +additional_properties_class_from_dict = AdditionalPropertiesClass.from_dict(additional_properties_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesObject.md b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesObject.md index f9c516ee9b6b..d647ec64896f 100644 --- a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesObject.md +++ b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesObject.md @@ -22,7 +22,7 @@ print(AdditionalPropertiesObject.to_json()) # convert the object into a dict additional_properties_object_dict = additional_properties_object_instance.to_dict() # create an instance of AdditionalPropertiesObject from a dict -additional_properties_object_form_dict = additional_properties_object.from_dict(additional_properties_object_dict) +additional_properties_object_from_dict = AdditionalPropertiesObject.from_dict(additional_properties_object_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesWithDescriptionOnly.md b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesWithDescriptionOnly.md index 3dbb9c6f3e9b..061f5524872b 100644 --- a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesWithDescriptionOnly.md +++ b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesWithDescriptionOnly.md @@ -22,7 +22,7 @@ print(AdditionalPropertiesWithDescriptionOnly.to_json()) # convert the object into a dict additional_properties_with_description_only_dict = additional_properties_with_description_only_instance.to_dict() # create an instance of AdditionalPropertiesWithDescriptionOnly from a dict -additional_properties_with_description_only_form_dict = additional_properties_with_description_only.from_dict(additional_properties_with_description_only_dict) +additional_properties_with_description_only_from_dict = AdditionalPropertiesWithDescriptionOnly.from_dict(additional_properties_with_description_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/AllOfSuperModel.md b/samples/openapi3/client/petstore/python/docs/AllOfSuperModel.md index 1262bd9dc51f..421a1527f1ef 100644 --- a/samples/openapi3/client/petstore/python/docs/AllOfSuperModel.md +++ b/samples/openapi3/client/petstore/python/docs/AllOfSuperModel.md @@ -22,7 +22,7 @@ print(AllOfSuperModel.to_json()) # convert the object into a dict all_of_super_model_dict = all_of_super_model_instance.to_dict() # create an instance of AllOfSuperModel from a dict -all_of_super_model_form_dict = all_of_super_model.from_dict(all_of_super_model_dict) +all_of_super_model_from_dict = AllOfSuperModel.from_dict(all_of_super_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/python/docs/AllOfWithSingleRef.md index 6c2860c02f5f..203a4b5da3d5 100644 --- a/samples/openapi3/client/petstore/python/docs/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/python/docs/AllOfWithSingleRef.md @@ -23,7 +23,7 @@ print(AllOfWithSingleRef.to_json()) # convert the object into a dict all_of_with_single_ref_dict = all_of_with_single_ref_instance.to_dict() # create an instance of AllOfWithSingleRef from a dict -all_of_with_single_ref_form_dict = all_of_with_single_ref.from_dict(all_of_with_single_ref_dict) +all_of_with_single_ref_from_dict = AllOfWithSingleRef.from_dict(all_of_with_single_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Animal.md b/samples/openapi3/client/petstore/python/docs/Animal.md index 4c693f09e5ff..381d27b66e44 100644 --- a/samples/openapi3/client/petstore/python/docs/Animal.md +++ b/samples/openapi3/client/petstore/python/docs/Animal.md @@ -23,7 +23,7 @@ print(Animal.to_json()) # convert the object into a dict animal_dict = animal_instance.to_dict() # create an instance of Animal from a dict -animal_form_dict = animal.from_dict(animal_dict) +animal_from_dict = Animal.from_dict(animal_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/AnyOfColor.md b/samples/openapi3/client/petstore/python/docs/AnyOfColor.md index ccaf51ce9fe0..6ed75dd7b48a 100644 --- a/samples/openapi3/client/petstore/python/docs/AnyOfColor.md +++ b/samples/openapi3/client/petstore/python/docs/AnyOfColor.md @@ -22,7 +22,7 @@ print(AnyOfColor.to_json()) # convert the object into a dict any_of_color_dict = any_of_color_instance.to_dict() # create an instance of AnyOfColor from a dict -any_of_color_form_dict = any_of_color.from_dict(any_of_color_dict) +any_of_color_from_dict = AnyOfColor.from_dict(any_of_color_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/AnyOfPig.md b/samples/openapi3/client/petstore/python/docs/AnyOfPig.md index 52109d6670cd..9367e2261898 100644 --- a/samples/openapi3/client/petstore/python/docs/AnyOfPig.md +++ b/samples/openapi3/client/petstore/python/docs/AnyOfPig.md @@ -24,7 +24,7 @@ print(AnyOfPig.to_json()) # convert the object into a dict any_of_pig_dict = any_of_pig_instance.to_dict() # create an instance of AnyOfPig from a dict -any_of_pig_form_dict = any_of_pig.from_dict(any_of_pig_dict) +any_of_pig_from_dict = AnyOfPig.from_dict(any_of_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfModel.md b/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfModel.md index 1cd9c367b262..f866863d53f9 100644 --- a/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfModel.md +++ b/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfModel.md @@ -22,7 +22,7 @@ print(ArrayOfArrayOfModel.to_json()) # convert the object into a dict array_of_array_of_model_dict = array_of_array_of_model_instance.to_dict() # create an instance of ArrayOfArrayOfModel from a dict -array_of_array_of_model_form_dict = array_of_array_of_model.from_dict(array_of_array_of_model_dict) +array_of_array_of_model_from_dict = ArrayOfArrayOfModel.from_dict(array_of_array_of_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md index 3ad18d346f6b..32bd2dfbf1e2 100644 --- a/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md @@ -22,7 +22,7 @@ print(ArrayOfArrayOfNumberOnly.to_json()) # convert the object into a dict array_of_array_of_number_only_dict = array_of_array_of_number_only_instance.to_dict() # create an instance of ArrayOfArrayOfNumberOnly from a dict -array_of_array_of_number_only_form_dict = array_of_array_of_number_only.from_dict(array_of_array_of_number_only_dict) +array_of_array_of_number_only_from_dict = ArrayOfArrayOfNumberOnly.from_dict(array_of_array_of_number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md index a606e3a54bba..b814d7594942 100644 --- a/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md @@ -22,7 +22,7 @@ print(ArrayOfNumberOnly.to_json()) # convert the object into a dict array_of_number_only_dict = array_of_number_only_instance.to_dict() # create an instance of ArrayOfNumberOnly from a dict -array_of_number_only_form_dict = array_of_number_only.from_dict(array_of_number_only_dict) +array_of_number_only_from_dict = ArrayOfNumberOnly.from_dict(array_of_number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ArrayTest.md b/samples/openapi3/client/petstore/python/docs/ArrayTest.md index a673e8a2893e..ed871fae662d 100644 --- a/samples/openapi3/client/petstore/python/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/python/docs/ArrayTest.md @@ -25,7 +25,7 @@ print(ArrayTest.to_json()) # convert the object into a dict array_test_dict = array_test_instance.to_dict() # create an instance of ArrayTest from a dict -array_test_form_dict = array_test.from_dict(array_test_dict) +array_test_from_dict = ArrayTest.from_dict(array_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/BasquePig.md b/samples/openapi3/client/petstore/python/docs/BasquePig.md index aa3b3d28b3eb..ee28d628722f 100644 --- a/samples/openapi3/client/petstore/python/docs/BasquePig.md +++ b/samples/openapi3/client/petstore/python/docs/BasquePig.md @@ -23,7 +23,7 @@ print(BasquePig.to_json()) # convert the object into a dict basque_pig_dict = basque_pig_instance.to_dict() # create an instance of BasquePig from a dict -basque_pig_form_dict = basque_pig.from_dict(basque_pig_dict) +basque_pig_from_dict = BasquePig.from_dict(basque_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Bathing.md b/samples/openapi3/client/petstore/python/docs/Bathing.md index bb8d40ac8ab5..6ad70e2f67cc 100644 --- a/samples/openapi3/client/petstore/python/docs/Bathing.md +++ b/samples/openapi3/client/petstore/python/docs/Bathing.md @@ -24,7 +24,7 @@ print(Bathing.to_json()) # convert the object into a dict bathing_dict = bathing_instance.to_dict() # create an instance of Bathing from a dict -bathing_form_dict = bathing.from_dict(bathing_dict) +bathing_from_dict = Bathing.from_dict(bathing_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Capitalization.md b/samples/openapi3/client/petstore/python/docs/Capitalization.md index 7f1a36413d56..6f564a8ed8c9 100644 --- a/samples/openapi3/client/petstore/python/docs/Capitalization.md +++ b/samples/openapi3/client/petstore/python/docs/Capitalization.md @@ -27,7 +27,7 @@ print(Capitalization.to_json()) # convert the object into a dict capitalization_dict = capitalization_instance.to_dict() # create an instance of Capitalization from a dict -capitalization_form_dict = capitalization.from_dict(capitalization_dict) +capitalization_from_dict = Capitalization.from_dict(capitalization_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Cat.md b/samples/openapi3/client/petstore/python/docs/Cat.md index a2d4b88805f6..d0e39efdb33e 100644 --- a/samples/openapi3/client/petstore/python/docs/Cat.md +++ b/samples/openapi3/client/petstore/python/docs/Cat.md @@ -22,7 +22,7 @@ print(Cat.to_json()) # convert the object into a dict cat_dict = cat_instance.to_dict() # create an instance of Cat from a dict -cat_form_dict = cat.from_dict(cat_dict) +cat_from_dict = Cat.from_dict(cat_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Category.md b/samples/openapi3/client/petstore/python/docs/Category.md index 24160009af4b..dbde14b7344c 100644 --- a/samples/openapi3/client/petstore/python/docs/Category.md +++ b/samples/openapi3/client/petstore/python/docs/Category.md @@ -23,7 +23,7 @@ print(Category.to_json()) # convert the object into a dict category_dict = category_instance.to_dict() # create an instance of Category from a dict -category_form_dict = category.from_dict(category_dict) +category_from_dict = Category.from_dict(category_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/CircularAllOfRef.md b/samples/openapi3/client/petstore/python/docs/CircularAllOfRef.md index a00be37d4d19..65b171177e58 100644 --- a/samples/openapi3/client/petstore/python/docs/CircularAllOfRef.md +++ b/samples/openapi3/client/petstore/python/docs/CircularAllOfRef.md @@ -23,7 +23,7 @@ print(CircularAllOfRef.to_json()) # convert the object into a dict circular_all_of_ref_dict = circular_all_of_ref_instance.to_dict() # create an instance of CircularAllOfRef from a dict -circular_all_of_ref_form_dict = circular_all_of_ref.from_dict(circular_all_of_ref_dict) +circular_all_of_ref_from_dict = CircularAllOfRef.from_dict(circular_all_of_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/CircularReferenceModel.md b/samples/openapi3/client/petstore/python/docs/CircularReferenceModel.md index 6695d4a7613b..87216f7273ab 100644 --- a/samples/openapi3/client/petstore/python/docs/CircularReferenceModel.md +++ b/samples/openapi3/client/petstore/python/docs/CircularReferenceModel.md @@ -23,7 +23,7 @@ print(CircularReferenceModel.to_json()) # convert the object into a dict circular_reference_model_dict = circular_reference_model_instance.to_dict() # create an instance of CircularReferenceModel from a dict -circular_reference_model_form_dict = circular_reference_model.from_dict(circular_reference_model_dict) +circular_reference_model_from_dict = CircularReferenceModel.from_dict(circular_reference_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ClassModel.md b/samples/openapi3/client/petstore/python/docs/ClassModel.md index 25351614fa43..ea76a5c157bf 100644 --- a/samples/openapi3/client/petstore/python/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/python/docs/ClassModel.md @@ -23,7 +23,7 @@ print(ClassModel.to_json()) # convert the object into a dict class_model_dict = class_model_instance.to_dict() # create an instance of ClassModel from a dict -class_model_form_dict = class_model.from_dict(class_model_dict) +class_model_from_dict = ClassModel.from_dict(class_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Client.md b/samples/openapi3/client/petstore/python/docs/Client.md index b601737b02f1..22321c189150 100644 --- a/samples/openapi3/client/petstore/python/docs/Client.md +++ b/samples/openapi3/client/petstore/python/docs/Client.md @@ -22,7 +22,7 @@ print(Client.to_json()) # convert the object into a dict client_dict = client_instance.to_dict() # create an instance of Client from a dict -client_form_dict = client.from_dict(client_dict) +client_from_dict = Client.from_dict(client_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Color.md b/samples/openapi3/client/petstore/python/docs/Color.md index 9bd63f91d7c1..9ac3ab2e91f4 100644 --- a/samples/openapi3/client/petstore/python/docs/Color.md +++ b/samples/openapi3/client/petstore/python/docs/Color.md @@ -22,7 +22,7 @@ print(Color.to_json()) # convert the object into a dict color_dict = color_instance.to_dict() # create an instance of Color from a dict -color_form_dict = color.from_dict(color_dict) +color_from_dict = Color.from_dict(color_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Creature.md b/samples/openapi3/client/petstore/python/docs/Creature.md index fa1ec65401bd..a4710214c198 100644 --- a/samples/openapi3/client/petstore/python/docs/Creature.md +++ b/samples/openapi3/client/petstore/python/docs/Creature.md @@ -23,7 +23,7 @@ print(Creature.to_json()) # convert the object into a dict creature_dict = creature_instance.to_dict() # create an instance of Creature from a dict -creature_form_dict = creature.from_dict(creature_dict) +creature_from_dict = Creature.from_dict(creature_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/CreatureInfo.md b/samples/openapi3/client/petstore/python/docs/CreatureInfo.md index fe4ab81a8071..db3b82bb9ff5 100644 --- a/samples/openapi3/client/petstore/python/docs/CreatureInfo.md +++ b/samples/openapi3/client/petstore/python/docs/CreatureInfo.md @@ -22,7 +22,7 @@ print(CreatureInfo.to_json()) # convert the object into a dict creature_info_dict = creature_info_instance.to_dict() # create an instance of CreatureInfo from a dict -creature_info_form_dict = creature_info.from_dict(creature_info_dict) +creature_info_from_dict = CreatureInfo.from_dict(creature_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/DanishPig.md b/samples/openapi3/client/petstore/python/docs/DanishPig.md index 6aef777ffe06..16941388832a 100644 --- a/samples/openapi3/client/petstore/python/docs/DanishPig.md +++ b/samples/openapi3/client/petstore/python/docs/DanishPig.md @@ -23,7 +23,7 @@ print(DanishPig.to_json()) # convert the object into a dict danish_pig_dict = danish_pig_instance.to_dict() # create an instance of DanishPig from a dict -danish_pig_form_dict = danish_pig.from_dict(danish_pig_dict) +danish_pig_from_dict = DanishPig.from_dict(danish_pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/DeprecatedObject.md b/samples/openapi3/client/petstore/python/docs/DeprecatedObject.md index 5de685050ffc..6b362f379ba4 100644 --- a/samples/openapi3/client/petstore/python/docs/DeprecatedObject.md +++ b/samples/openapi3/client/petstore/python/docs/DeprecatedObject.md @@ -22,7 +22,7 @@ print(DeprecatedObject.to_json()) # convert the object into a dict deprecated_object_dict = deprecated_object_instance.to_dict() # create an instance of DeprecatedObject from a dict -deprecated_object_form_dict = deprecated_object.from_dict(deprecated_object_dict) +deprecated_object_from_dict = DeprecatedObject.from_dict(deprecated_object_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/DiscriminatorAllOfSub.md b/samples/openapi3/client/petstore/python/docs/DiscriminatorAllOfSub.md index e7cd36010f5b..f72b6e8e68ca 100644 --- a/samples/openapi3/client/petstore/python/docs/DiscriminatorAllOfSub.md +++ b/samples/openapi3/client/petstore/python/docs/DiscriminatorAllOfSub.md @@ -21,7 +21,7 @@ print(DiscriminatorAllOfSub.to_json()) # convert the object into a dict discriminator_all_of_sub_dict = discriminator_all_of_sub_instance.to_dict() # create an instance of DiscriminatorAllOfSub from a dict -discriminator_all_of_sub_form_dict = discriminator_all_of_sub.from_dict(discriminator_all_of_sub_dict) +discriminator_all_of_sub_from_dict = DiscriminatorAllOfSub.from_dict(discriminator_all_of_sub_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/DiscriminatorAllOfSuper.md b/samples/openapi3/client/petstore/python/docs/DiscriminatorAllOfSuper.md index 4859a9a6d40b..477c05bfc446 100644 --- a/samples/openapi3/client/petstore/python/docs/DiscriminatorAllOfSuper.md +++ b/samples/openapi3/client/petstore/python/docs/DiscriminatorAllOfSuper.md @@ -22,7 +22,7 @@ print(DiscriminatorAllOfSuper.to_json()) # convert the object into a dict discriminator_all_of_super_dict = discriminator_all_of_super_instance.to_dict() # create an instance of DiscriminatorAllOfSuper from a dict -discriminator_all_of_super_form_dict = discriminator_all_of_super.from_dict(discriminator_all_of_super_dict) +discriminator_all_of_super_from_dict = DiscriminatorAllOfSuper.from_dict(discriminator_all_of_super_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Dog.md b/samples/openapi3/client/petstore/python/docs/Dog.md index ecb205929573..ed23f613d01d 100644 --- a/samples/openapi3/client/petstore/python/docs/Dog.md +++ b/samples/openapi3/client/petstore/python/docs/Dog.md @@ -22,7 +22,7 @@ print(Dog.to_json()) # convert the object into a dict dog_dict = dog_instance.to_dict() # create an instance of Dog from a dict -dog_form_dict = dog.from_dict(dog_dict) +dog_from_dict = Dog.from_dict(dog_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/DummyModel.md b/samples/openapi3/client/petstore/python/docs/DummyModel.md index 21a59bef1bfd..01b675977f58 100644 --- a/samples/openapi3/client/petstore/python/docs/DummyModel.md +++ b/samples/openapi3/client/petstore/python/docs/DummyModel.md @@ -23,7 +23,7 @@ print(DummyModel.to_json()) # convert the object into a dict dummy_model_dict = dummy_model_instance.to_dict() # create an instance of DummyModel from a dict -dummy_model_form_dict = dummy_model.from_dict(dummy_model_dict) +dummy_model_from_dict = DummyModel.from_dict(dummy_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/EnumArrays.md b/samples/openapi3/client/petstore/python/docs/EnumArrays.md index 6a5293dfcc69..f44617497bce 100644 --- a/samples/openapi3/client/petstore/python/docs/EnumArrays.md +++ b/samples/openapi3/client/petstore/python/docs/EnumArrays.md @@ -23,7 +23,7 @@ print(EnumArrays.to_json()) # convert the object into a dict enum_arrays_dict = enum_arrays_instance.to_dict() # create an instance of EnumArrays from a dict -enum_arrays_form_dict = enum_arrays.from_dict(enum_arrays_dict) +enum_arrays_from_dict = EnumArrays.from_dict(enum_arrays_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/EnumSerialization.md b/samples/openapi3/client/petstore/python/docs/EnumSerialization.md new file mode 100644 index 000000000000..68d6e8e23fde --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/EnumSerialization.md @@ -0,0 +1,11 @@ +# EnumSerialization + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/python/docs/EnumTest.md b/samples/openapi3/client/petstore/python/docs/EnumTest.md index 494a4d054f06..d875c67604cf 100644 --- a/samples/openapi3/client/petstore/python/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/python/docs/EnumTest.md @@ -30,7 +30,7 @@ print(EnumTest.to_json()) # convert the object into a dict enum_test_dict = enum_test_instance.to_dict() # create an instance of EnumTest from a dict -enum_test_form_dict = enum_test.from_dict(enum_test_dict) +enum_test_from_dict = EnumTest.from_dict(enum_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index 354a3ce7191f..b5183d1123a8 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -632,7 +632,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fake_property_enum_integer_serialize** -> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property) +> OuterObjectWithEnumProperty fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param) @@ -643,6 +643,7 @@ Test serialization of enum (int) properties with examples ```python import petstore_api +from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.rest import ApiException from pprint import pprint @@ -659,9 +660,10 @@ with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) outer_object_with_enum_property = petstore_api.OuterObjectWithEnumProperty() # OuterObjectWithEnumProperty | Input enum (int) as post body + param = [petstore_api.OuterEnumInteger()] # List[OuterEnumInteger] | (optional) try: - api_response = api_instance.fake_property_enum_integer_serialize(outer_object_with_enum_property) + api_response = api_instance.fake_property_enum_integer_serialize(outer_object_with_enum_property, param=param) print("The response of FakeApi->fake_property_enum_integer_serialize:\n") pprint(api_response) except Exception as e: @@ -676,6 +678,7 @@ with petstore_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **outer_object_with_enum_property** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **param** | [**List[OuterEnumInteger]**](OuterEnumInteger.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/python/docs/Feeding.md b/samples/openapi3/client/petstore/python/docs/Feeding.md index 7d1e83627dde..9f92b5d964d3 100644 --- a/samples/openapi3/client/petstore/python/docs/Feeding.md +++ b/samples/openapi3/client/petstore/python/docs/Feeding.md @@ -24,7 +24,7 @@ print(Feeding.to_json()) # convert the object into a dict feeding_dict = feeding_instance.to_dict() # create an instance of Feeding from a dict -feeding_form_dict = feeding.from_dict(feeding_dict) +feeding_from_dict = Feeding.from_dict(feeding_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/File.md b/samples/openapi3/client/petstore/python/docs/File.md index 1b03d58761cb..23f0567411ce 100644 --- a/samples/openapi3/client/petstore/python/docs/File.md +++ b/samples/openapi3/client/petstore/python/docs/File.md @@ -23,7 +23,7 @@ print(File.to_json()) # convert the object into a dict file_dict = file_instance.to_dict() # create an instance of File from a dict -file_form_dict = file.from_dict(file_dict) +file_from_dict = File.from_dict(file_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md index 26a1758abfeb..e1118042a8ec 100644 --- a/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md +++ b/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md @@ -23,7 +23,7 @@ print(FileSchemaTestClass.to_json()) # convert the object into a dict file_schema_test_class_dict = file_schema_test_class_instance.to_dict() # create an instance of FileSchemaTestClass from a dict -file_schema_test_class_form_dict = file_schema_test_class.from_dict(file_schema_test_class_dict) +file_schema_test_class_from_dict = FileSchemaTestClass.from_dict(file_schema_test_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/FirstRef.md b/samples/openapi3/client/petstore/python/docs/FirstRef.md index 5092de432d39..94b8ddc5ac22 100644 --- a/samples/openapi3/client/petstore/python/docs/FirstRef.md +++ b/samples/openapi3/client/petstore/python/docs/FirstRef.md @@ -23,7 +23,7 @@ print(FirstRef.to_json()) # convert the object into a dict first_ref_dict = first_ref_instance.to_dict() # create an instance of FirstRef from a dict -first_ref_form_dict = first_ref.from_dict(first_ref_dict) +first_ref_from_dict = FirstRef.from_dict(first_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Foo.md b/samples/openapi3/client/petstore/python/docs/Foo.md index 020b8d75b76a..f635b0daa6db 100644 --- a/samples/openapi3/client/petstore/python/docs/Foo.md +++ b/samples/openapi3/client/petstore/python/docs/Foo.md @@ -22,7 +22,7 @@ print(Foo.to_json()) # convert the object into a dict foo_dict = foo_instance.to_dict() # create an instance of Foo from a dict -foo_form_dict = foo.from_dict(foo_dict) +foo_from_dict = Foo.from_dict(foo_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/FooGetDefaultResponse.md b/samples/openapi3/client/petstore/python/docs/FooGetDefaultResponse.md index 755c3232bbf2..8d84f795b00a 100644 --- a/samples/openapi3/client/petstore/python/docs/FooGetDefaultResponse.md +++ b/samples/openapi3/client/petstore/python/docs/FooGetDefaultResponse.md @@ -22,7 +22,7 @@ print(FooGetDefaultResponse.to_json()) # convert the object into a dict foo_get_default_response_dict = foo_get_default_response_instance.to_dict() # create an instance of FooGetDefaultResponse from a dict -foo_get_default_response_form_dict = foo_get_default_response.from_dict(foo_get_default_response_dict) +foo_get_default_response_from_dict = FooGetDefaultResponse.from_dict(foo_get_default_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/FormatTest.md b/samples/openapi3/client/petstore/python/docs/FormatTest.md index 3b2f44457f18..6be7fc017577 100644 --- a/samples/openapi3/client/petstore/python/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/python/docs/FormatTest.md @@ -38,7 +38,7 @@ print(FormatTest.to_json()) # convert the object into a dict format_test_dict = format_test_instance.to_dict() # create an instance of FormatTest from a dict -format_test_form_dict = format_test.from_dict(format_test_dict) +format_test_from_dict = FormatTest.from_dict(format_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md index 00d2af2fd330..fdc48781b15a 100644 --- a/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md @@ -23,7 +23,7 @@ print(HasOnlyReadOnly.to_json()) # convert the object into a dict has_only_read_only_dict = has_only_read_only_instance.to_dict() # create an instance of HasOnlyReadOnly from a dict -has_only_read_only_form_dict = has_only_read_only.from_dict(has_only_read_only_dict) +has_only_read_only_from_dict = HasOnlyReadOnly.from_dict(has_only_read_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md index d32450f4c2ea..d4a2b187167f 100644 --- a/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md @@ -23,7 +23,7 @@ print(HealthCheckResult.to_json()) # convert the object into a dict health_check_result_dict = health_check_result_instance.to_dict() # create an instance of HealthCheckResult from a dict -health_check_result_form_dict = health_check_result.from_dict(health_check_result_dict) +health_check_result_from_dict = HealthCheckResult.from_dict(health_check_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/InnerDictWithProperty.md b/samples/openapi3/client/petstore/python/docs/InnerDictWithProperty.md index efd91b13f3a5..7b82ebb770b8 100644 --- a/samples/openapi3/client/petstore/python/docs/InnerDictWithProperty.md +++ b/samples/openapi3/client/petstore/python/docs/InnerDictWithProperty.md @@ -22,7 +22,7 @@ print(InnerDictWithProperty.to_json()) # convert the object into a dict inner_dict_with_property_dict = inner_dict_with_property_instance.to_dict() # create an instance of InnerDictWithProperty from a dict -inner_dict_with_property_form_dict = inner_dict_with_property.from_dict(inner_dict_with_property_dict) +inner_dict_with_property_from_dict = InnerDictWithProperty.from_dict(inner_dict_with_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/InputAllOf.md b/samples/openapi3/client/petstore/python/docs/InputAllOf.md index 7d6404e3f27e..45298f5308fc 100644 --- a/samples/openapi3/client/petstore/python/docs/InputAllOf.md +++ b/samples/openapi3/client/petstore/python/docs/InputAllOf.md @@ -22,7 +22,7 @@ print(InputAllOf.to_json()) # convert the object into a dict input_all_of_dict = input_all_of_instance.to_dict() # create an instance of InputAllOf from a dict -input_all_of_form_dict = input_all_of.from_dict(input_all_of_dict) +input_all_of_from_dict = InputAllOf.from_dict(input_all_of_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/IntOrString.md b/samples/openapi3/client/petstore/python/docs/IntOrString.md index c2f6fd5838ee..b4070b9a8c79 100644 --- a/samples/openapi3/client/petstore/python/docs/IntOrString.md +++ b/samples/openapi3/client/petstore/python/docs/IntOrString.md @@ -21,7 +21,7 @@ print(IntOrString.to_json()) # convert the object into a dict int_or_string_dict = int_or_string_instance.to_dict() # create an instance of IntOrString from a dict -int_or_string_form_dict = int_or_string.from_dict(int_or_string_dict) +int_or_string_from_dict = IntOrString.from_dict(int_or_string_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ListClass.md b/samples/openapi3/client/petstore/python/docs/ListClass.md index 3595f39de141..01068b7d22c3 100644 --- a/samples/openapi3/client/petstore/python/docs/ListClass.md +++ b/samples/openapi3/client/petstore/python/docs/ListClass.md @@ -22,7 +22,7 @@ print(ListClass.to_json()) # convert the object into a dict list_class_dict = list_class_instance.to_dict() # create an instance of ListClass from a dict -list_class_form_dict = list_class.from_dict(list_class_dict) +list_class_from_dict = ListClass.from_dict(list_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/MapOfArrayOfModel.md b/samples/openapi3/client/petstore/python/docs/MapOfArrayOfModel.md index 2220ab1f7c45..71a4ef66b682 100644 --- a/samples/openapi3/client/petstore/python/docs/MapOfArrayOfModel.md +++ b/samples/openapi3/client/petstore/python/docs/MapOfArrayOfModel.md @@ -22,7 +22,7 @@ print(MapOfArrayOfModel.to_json()) # convert the object into a dict map_of_array_of_model_dict = map_of_array_of_model_instance.to_dict() # create an instance of MapOfArrayOfModel from a dict -map_of_array_of_model_form_dict = map_of_array_of_model.from_dict(map_of_array_of_model_dict) +map_of_array_of_model_from_dict = MapOfArrayOfModel.from_dict(map_of_array_of_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/MapTest.md b/samples/openapi3/client/petstore/python/docs/MapTest.md index bd62a851e92b..d04b82e9378c 100644 --- a/samples/openapi3/client/petstore/python/docs/MapTest.md +++ b/samples/openapi3/client/petstore/python/docs/MapTest.md @@ -25,7 +25,7 @@ print(MapTest.to_json()) # convert the object into a dict map_test_dict = map_test_instance.to_dict() # create an instance of MapTest from a dict -map_test_form_dict = map_test.from_dict(map_test_dict) +map_test_from_dict = MapTest.from_dict(map_test_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 7cab16af1738..0dc994275d1e 100644 --- a/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -24,7 +24,7 @@ print(MixedPropertiesAndAdditionalPropertiesClass.to_json()) # convert the object into a dict mixed_properties_and_additional_properties_class_dict = mixed_properties_and_additional_properties_class_instance.to_dict() # create an instance of MixedPropertiesAndAdditionalPropertiesClass from a dict -mixed_properties_and_additional_properties_class_form_dict = mixed_properties_and_additional_properties_class.from_dict(mixed_properties_and_additional_properties_class_dict) +mixed_properties_and_additional_properties_class_from_dict = MixedPropertiesAndAdditionalPropertiesClass.from_dict(mixed_properties_and_additional_properties_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Model200Response.md b/samples/openapi3/client/petstore/python/docs/Model200Response.md index 454a4fcf30a0..7fdbdefc6cec 100644 --- a/samples/openapi3/client/petstore/python/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/python/docs/Model200Response.md @@ -24,7 +24,7 @@ print(Model200Response.to_json()) # convert the object into a dict model200_response_dict = model200_response_instance.to_dict() # create an instance of Model200Response from a dict -model200_response_form_dict = model200_response.from_dict(model200_response_dict) +model200_response_from_dict = Model200Response.from_dict(model200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ModelApiResponse.md b/samples/openapi3/client/petstore/python/docs/ModelApiResponse.md index 8e0a033bd648..5ddc0db2a0f3 100644 --- a/samples/openapi3/client/petstore/python/docs/ModelApiResponse.md +++ b/samples/openapi3/client/petstore/python/docs/ModelApiResponse.md @@ -24,7 +24,7 @@ print(ModelApiResponse.to_json()) # convert the object into a dict model_api_response_dict = model_api_response_instance.to_dict() # create an instance of ModelApiResponse from a dict -model_api_response_form_dict = model_api_response.from_dict(model_api_response_dict) +model_api_response_from_dict = ModelApiResponse.from_dict(model_api_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ModelField.md b/samples/openapi3/client/petstore/python/docs/ModelField.md index f5f03fd82d29..9073b5dbdb00 100644 --- a/samples/openapi3/client/petstore/python/docs/ModelField.md +++ b/samples/openapi3/client/petstore/python/docs/ModelField.md @@ -22,7 +22,7 @@ print(ModelField.to_json()) # convert the object into a dict model_field_dict = model_field_instance.to_dict() # create an instance of ModelField from a dict -model_field_form_dict = model_field.from_dict(model_field_dict) +model_field_from_dict = ModelField.from_dict(model_field_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ModelReturn.md b/samples/openapi3/client/petstore/python/docs/ModelReturn.md index 6b660953e1d8..7d327053b0c3 100644 --- a/samples/openapi3/client/petstore/python/docs/ModelReturn.md +++ b/samples/openapi3/client/petstore/python/docs/ModelReturn.md @@ -23,7 +23,7 @@ print(ModelReturn.to_json()) # convert the object into a dict model_return_dict = model_return_instance.to_dict() # create an instance of ModelReturn from a dict -model_return_form_dict = model_return.from_dict(model_return_dict) +model_return_from_dict = ModelReturn.from_dict(model_return_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Name.md b/samples/openapi3/client/petstore/python/docs/Name.md index 5c5986a76d0b..5a04ec1ada06 100644 --- a/samples/openapi3/client/petstore/python/docs/Name.md +++ b/samples/openapi3/client/petstore/python/docs/Name.md @@ -26,7 +26,7 @@ print(Name.to_json()) # convert the object into a dict name_dict = name_instance.to_dict() # create an instance of Name from a dict -name_form_dict = name.from_dict(name_dict) +name_from_dict = Name.from_dict(name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/NullableClass.md b/samples/openapi3/client/petstore/python/docs/NullableClass.md index 3657d21255c4..0387dcc2c67a 100644 --- a/samples/openapi3/client/petstore/python/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python/docs/NullableClass.md @@ -34,7 +34,7 @@ print(NullableClass.to_json()) # convert the object into a dict nullable_class_dict = nullable_class_instance.to_dict() # create an instance of NullableClass from a dict -nullable_class_form_dict = nullable_class.from_dict(nullable_class_dict) +nullable_class_from_dict = NullableClass.from_dict(nullable_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/NullableProperty.md b/samples/openapi3/client/petstore/python/docs/NullableProperty.md index 27ce3192f847..30edaf4844b2 100644 --- a/samples/openapi3/client/petstore/python/docs/NullableProperty.md +++ b/samples/openapi3/client/petstore/python/docs/NullableProperty.md @@ -23,7 +23,7 @@ print(NullableProperty.to_json()) # convert the object into a dict nullable_property_dict = nullable_property_instance.to_dict() # create an instance of NullableProperty from a dict -nullable_property_form_dict = nullable_property.from_dict(nullable_property_dict) +nullable_property_from_dict = NullableProperty.from_dict(nullable_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/NumberOnly.md b/samples/openapi3/client/petstore/python/docs/NumberOnly.md index 72e0a4bfde0b..415dd25585d4 100644 --- a/samples/openapi3/client/petstore/python/docs/NumberOnly.md +++ b/samples/openapi3/client/petstore/python/docs/NumberOnly.md @@ -22,7 +22,7 @@ print(NumberOnly.to_json()) # convert the object into a dict number_only_dict = number_only_instance.to_dict() # create an instance of NumberOnly from a dict -number_only_form_dict = number_only.from_dict(number_only_dict) +number_only_from_dict = NumberOnly.from_dict(number_only_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ObjectToTestAdditionalProperties.md b/samples/openapi3/client/petstore/python/docs/ObjectToTestAdditionalProperties.md index 5d2c76c8958e..f6bc34c98e65 100644 --- a/samples/openapi3/client/petstore/python/docs/ObjectToTestAdditionalProperties.md +++ b/samples/openapi3/client/petstore/python/docs/ObjectToTestAdditionalProperties.md @@ -23,7 +23,7 @@ print(ObjectToTestAdditionalProperties.to_json()) # convert the object into a dict object_to_test_additional_properties_dict = object_to_test_additional_properties_instance.to_dict() # create an instance of ObjectToTestAdditionalProperties from a dict -object_to_test_additional_properties_form_dict = object_to_test_additional_properties.from_dict(object_to_test_additional_properties_dict) +object_to_test_additional_properties_from_dict = ObjectToTestAdditionalProperties.from_dict(object_to_test_additional_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/python/docs/ObjectWithDeprecatedFields.md index b1077a60b954..6dbd2ace04f1 100644 --- a/samples/openapi3/client/petstore/python/docs/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/python/docs/ObjectWithDeprecatedFields.md @@ -25,7 +25,7 @@ print(ObjectWithDeprecatedFields.to_json()) # convert the object into a dict object_with_deprecated_fields_dict = object_with_deprecated_fields_instance.to_dict() # create an instance of ObjectWithDeprecatedFields from a dict -object_with_deprecated_fields_form_dict = object_with_deprecated_fields.from_dict(object_with_deprecated_fields_dict) +object_with_deprecated_fields_from_dict = ObjectWithDeprecatedFields.from_dict(object_with_deprecated_fields_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/OneOfEnumString.md b/samples/openapi3/client/petstore/python/docs/OneOfEnumString.md index 25fc402280f0..1d385c092934 100644 --- a/samples/openapi3/client/petstore/python/docs/OneOfEnumString.md +++ b/samples/openapi3/client/petstore/python/docs/OneOfEnumString.md @@ -22,7 +22,7 @@ print(OneOfEnumString.to_json()) # convert the object into a dict one_of_enum_string_dict = one_of_enum_string_instance.to_dict() # create an instance of OneOfEnumString from a dict -one_of_enum_string_form_dict = one_of_enum_string.from_dict(one_of_enum_string_dict) +one_of_enum_string_from_dict = OneOfEnumString.from_dict(one_of_enum_string_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Order.md b/samples/openapi3/client/petstore/python/docs/Order.md index 08b602f1669b..00526b8d04b9 100644 --- a/samples/openapi3/client/petstore/python/docs/Order.md +++ b/samples/openapi3/client/petstore/python/docs/Order.md @@ -27,7 +27,7 @@ print(Order.to_json()) # convert the object into a dict order_dict = order_instance.to_dict() # create an instance of Order from a dict -order_form_dict = order.from_dict(order_dict) +order_from_dict = Order.from_dict(order_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/OuterComposite.md b/samples/openapi3/client/petstore/python/docs/OuterComposite.md index 9d4401d659b2..c8242c2d2653 100644 --- a/samples/openapi3/client/petstore/python/docs/OuterComposite.md +++ b/samples/openapi3/client/petstore/python/docs/OuterComposite.md @@ -24,7 +24,7 @@ print(OuterComposite.to_json()) # convert the object into a dict outer_composite_dict = outer_composite_instance.to_dict() # create an instance of OuterComposite from a dict -outer_composite_form_dict = outer_composite.from_dict(outer_composite_dict) +outer_composite_from_dict = OuterComposite.from_dict(outer_composite_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/python/docs/OuterObjectWithEnumProperty.md index beffcbe25453..6137dbd98da6 100644 --- a/samples/openapi3/client/petstore/python/docs/OuterObjectWithEnumProperty.md +++ b/samples/openapi3/client/petstore/python/docs/OuterObjectWithEnumProperty.md @@ -23,7 +23,7 @@ print(OuterObjectWithEnumProperty.to_json()) # convert the object into a dict outer_object_with_enum_property_dict = outer_object_with_enum_property_instance.to_dict() # create an instance of OuterObjectWithEnumProperty from a dict -outer_object_with_enum_property_form_dict = outer_object_with_enum_property.from_dict(outer_object_with_enum_property_dict) +outer_object_with_enum_property_from_dict = OuterObjectWithEnumProperty.from_dict(outer_object_with_enum_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Parent.md b/samples/openapi3/client/petstore/python/docs/Parent.md index 3b71011330d5..7387f9250aad 100644 --- a/samples/openapi3/client/petstore/python/docs/Parent.md +++ b/samples/openapi3/client/petstore/python/docs/Parent.md @@ -22,7 +22,7 @@ print(Parent.to_json()) # convert the object into a dict parent_dict = parent_instance.to_dict() # create an instance of Parent from a dict -parent_form_dict = parent.from_dict(parent_dict) +parent_from_dict = Parent.from_dict(parent_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ParentWithOptionalDict.md b/samples/openapi3/client/petstore/python/docs/ParentWithOptionalDict.md index 23e11a6dd660..bfc8688ea26f 100644 --- a/samples/openapi3/client/petstore/python/docs/ParentWithOptionalDict.md +++ b/samples/openapi3/client/petstore/python/docs/ParentWithOptionalDict.md @@ -22,7 +22,7 @@ print(ParentWithOptionalDict.to_json()) # convert the object into a dict parent_with_optional_dict_dict = parent_with_optional_dict_instance.to_dict() # create an instance of ParentWithOptionalDict from a dict -parent_with_optional_dict_form_dict = parent_with_optional_dict.from_dict(parent_with_optional_dict_dict) +parent_with_optional_dict_from_dict = ParentWithOptionalDict.from_dict(parent_with_optional_dict_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Pet.md b/samples/openapi3/client/petstore/python/docs/Pet.md index fa9dc7bf3081..5329cf2fb925 100644 --- a/samples/openapi3/client/petstore/python/docs/Pet.md +++ b/samples/openapi3/client/petstore/python/docs/Pet.md @@ -27,7 +27,7 @@ print(Pet.to_json()) # convert the object into a dict pet_dict = pet_instance.to_dict() # create an instance of Pet from a dict -pet_form_dict = pet.from_dict(pet_dict) +pet_from_dict = Pet.from_dict(pet_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Pig.md b/samples/openapi3/client/petstore/python/docs/Pig.md index 9ad7b7904941..625930676083 100644 --- a/samples/openapi3/client/petstore/python/docs/Pig.md +++ b/samples/openapi3/client/petstore/python/docs/Pig.md @@ -24,7 +24,7 @@ print(Pig.to_json()) # convert the object into a dict pig_dict = pig_instance.to_dict() # create an instance of Pig from a dict -pig_form_dict = pig.from_dict(pig_dict) +pig_from_dict = Pig.from_dict(pig_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/PoopCleaning.md b/samples/openapi3/client/petstore/python/docs/PoopCleaning.md index d96a5db0d4cd..8f9c25e08316 100644 --- a/samples/openapi3/client/petstore/python/docs/PoopCleaning.md +++ b/samples/openapi3/client/petstore/python/docs/PoopCleaning.md @@ -24,7 +24,7 @@ print(PoopCleaning.to_json()) # convert the object into a dict poop_cleaning_dict = poop_cleaning_instance.to_dict() # create an instance of PoopCleaning from a dict -poop_cleaning_form_dict = poop_cleaning.from_dict(poop_cleaning_dict) +poop_cleaning_from_dict = PoopCleaning.from_dict(poop_cleaning_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/PropertyMap.md b/samples/openapi3/client/petstore/python/docs/PropertyMap.md index 3b4c0a8cc03f..a55a0e5c6f01 100644 --- a/samples/openapi3/client/petstore/python/docs/PropertyMap.md +++ b/samples/openapi3/client/petstore/python/docs/PropertyMap.md @@ -22,7 +22,7 @@ print(PropertyMap.to_json()) # convert the object into a dict property_map_dict = property_map_instance.to_dict() # create an instance of PropertyMap from a dict -property_map_form_dict = property_map.from_dict(property_map_dict) +property_map_from_dict = PropertyMap.from_dict(property_map_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/PropertyNameCollision.md b/samples/openapi3/client/petstore/python/docs/PropertyNameCollision.md index 1bd7ce5ee2b8..40c233670dd0 100644 --- a/samples/openapi3/client/petstore/python/docs/PropertyNameCollision.md +++ b/samples/openapi3/client/petstore/python/docs/PropertyNameCollision.md @@ -24,7 +24,7 @@ print(PropertyNameCollision.to_json()) # convert the object into a dict property_name_collision_dict = property_name_collision_instance.to_dict() # create an instance of PropertyNameCollision from a dict -property_name_collision_form_dict = property_name_collision.from_dict(property_name_collision_dict) +property_name_collision_from_dict = PropertyNameCollision.from_dict(property_name_collision_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md index 4644f28f56a8..686ec5da41c9 100644 --- a/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md @@ -23,7 +23,7 @@ print(ReadOnlyFirst.to_json()) # convert the object into a dict read_only_first_dict = read_only_first_instance.to_dict() # create an instance of ReadOnlyFirst from a dict -read_only_first_form_dict = read_only_first.from_dict(read_only_first_dict) +read_only_first_from_dict = ReadOnlyFirst.from_dict(read_only_first_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/SecondCircularAllOfRef.md b/samples/openapi3/client/petstore/python/docs/SecondCircularAllOfRef.md index eae28911ed2c..65ebdd4c7e1d 100644 --- a/samples/openapi3/client/petstore/python/docs/SecondCircularAllOfRef.md +++ b/samples/openapi3/client/petstore/python/docs/SecondCircularAllOfRef.md @@ -23,7 +23,7 @@ print(SecondCircularAllOfRef.to_json()) # convert the object into a dict second_circular_all_of_ref_dict = second_circular_all_of_ref_instance.to_dict() # create an instance of SecondCircularAllOfRef from a dict -second_circular_all_of_ref_form_dict = second_circular_all_of_ref.from_dict(second_circular_all_of_ref_dict) +second_circular_all_of_ref_from_dict = SecondCircularAllOfRef.from_dict(second_circular_all_of_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/SecondRef.md b/samples/openapi3/client/petstore/python/docs/SecondRef.md index 97c65b8ef79b..dfb1a0ac6db5 100644 --- a/samples/openapi3/client/petstore/python/docs/SecondRef.md +++ b/samples/openapi3/client/petstore/python/docs/SecondRef.md @@ -23,7 +23,7 @@ print(SecondRef.to_json()) # convert the object into a dict second_ref_dict = second_ref_instance.to_dict() # create an instance of SecondRef from a dict -second_ref_form_dict = second_ref.from_dict(second_ref_dict) +second_ref_from_dict = SecondRef.from_dict(second_ref_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/SelfReferenceModel.md b/samples/openapi3/client/petstore/python/docs/SelfReferenceModel.md index 2ca21efd50cc..208cdac04b6f 100644 --- a/samples/openapi3/client/petstore/python/docs/SelfReferenceModel.md +++ b/samples/openapi3/client/petstore/python/docs/SelfReferenceModel.md @@ -23,7 +23,7 @@ print(SelfReferenceModel.to_json()) # convert the object into a dict self_reference_model_dict = self_reference_model_instance.to_dict() # create an instance of SelfReferenceModel from a dict -self_reference_model_form_dict = self_reference_model.from_dict(self_reference_model_dict) +self_reference_model_from_dict = SelfReferenceModel.from_dict(self_reference_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/SpecialModelName.md b/samples/openapi3/client/petstore/python/docs/SpecialModelName.md index ea1ef0008c81..35303f34efd2 100644 --- a/samples/openapi3/client/petstore/python/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/python/docs/SpecialModelName.md @@ -22,7 +22,7 @@ print(SpecialModelName.to_json()) # convert the object into a dict special_model_name_dict = special_model_name_instance.to_dict() # create an instance of SpecialModelName from a dict -special_model_name_form_dict = special_model_name.from_dict(special_model_name_dict) +special_model_name_from_dict = SpecialModelName.from_dict(special_model_name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/SpecialName.md b/samples/openapi3/client/petstore/python/docs/SpecialName.md index c541b0b3d4b5..ccc550b16e33 100644 --- a/samples/openapi3/client/petstore/python/docs/SpecialName.md +++ b/samples/openapi3/client/petstore/python/docs/SpecialName.md @@ -24,7 +24,7 @@ print(SpecialName.to_json()) # convert the object into a dict special_name_dict = special_name_instance.to_dict() # create an instance of SpecialName from a dict -special_name_form_dict = special_name.from_dict(special_name_dict) +special_name_from_dict = SpecialName.from_dict(special_name_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Tag.md b/samples/openapi3/client/petstore/python/docs/Tag.md index a8d1885a938a..4106d9cfe5db 100644 --- a/samples/openapi3/client/petstore/python/docs/Tag.md +++ b/samples/openapi3/client/petstore/python/docs/Tag.md @@ -23,7 +23,7 @@ print(Tag.to_json()) # convert the object into a dict tag_dict = tag_instance.to_dict() # create an instance of Tag from a dict -tag_form_dict = tag.from_dict(tag_dict) +tag_from_dict = Tag.from_dict(tag_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Task.md b/samples/openapi3/client/petstore/python/docs/Task.md index 905cc03b65d6..211ce76cdfeb 100644 --- a/samples/openapi3/client/petstore/python/docs/Task.md +++ b/samples/openapi3/client/petstore/python/docs/Task.md @@ -24,7 +24,7 @@ print(Task.to_json()) # convert the object into a dict task_dict = task_instance.to_dict() # create an instance of Task from a dict -task_form_dict = task.from_dict(task_dict) +task_from_dict = Task.from_dict(task_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/TaskActivity.md b/samples/openapi3/client/petstore/python/docs/TaskActivity.md index 36159e069b56..e905a477292d 100644 --- a/samples/openapi3/client/petstore/python/docs/TaskActivity.md +++ b/samples/openapi3/client/petstore/python/docs/TaskActivity.md @@ -24,7 +24,7 @@ print(TaskActivity.to_json()) # convert the object into a dict task_activity_dict = task_activity_instance.to_dict() # create an instance of TaskActivity from a dict -task_activity_form_dict = task_activity.from_dict(task_activity_dict) +task_activity_from_dict = TaskActivity.from_dict(task_activity_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel400Response.md b/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel400Response.md index 1ff12d238e00..be416bbad0f7 100644 --- a/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel400Response.md +++ b/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel400Response.md @@ -22,7 +22,7 @@ print(TestErrorResponsesWithModel400Response.to_json()) # convert the object into a dict test_error_responses_with_model400_response_dict = test_error_responses_with_model400_response_instance.to_dict() # create an instance of TestErrorResponsesWithModel400Response from a dict -test_error_responses_with_model400_response_form_dict = test_error_responses_with_model400_response.from_dict(test_error_responses_with_model400_response_dict) +test_error_responses_with_model400_response_from_dict = TestErrorResponsesWithModel400Response.from_dict(test_error_responses_with_model400_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel404Response.md b/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel404Response.md index a62725a99bb7..1c984f847bf1 100644 --- a/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel404Response.md +++ b/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel404Response.md @@ -22,7 +22,7 @@ print(TestErrorResponsesWithModel404Response.to_json()) # convert the object into a dict test_error_responses_with_model404_response_dict = test_error_responses_with_model404_response_instance.to_dict() # create an instance of TestErrorResponsesWithModel404Response from a dict -test_error_responses_with_model404_response_form_dict = test_error_responses_with_model404_response.from_dict(test_error_responses_with_model404_response_dict) +test_error_responses_with_model404_response_from_dict = TestErrorResponsesWithModel404Response.from_dict(test_error_responses_with_model404_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/python/docs/TestInlineFreeformAdditionalPropertiesRequest.md index d678aa823e18..511132d689be 100644 --- a/samples/openapi3/client/petstore/python/docs/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/python/docs/TestInlineFreeformAdditionalPropertiesRequest.md @@ -22,7 +22,7 @@ print(TestInlineFreeformAdditionalPropertiesRequest.to_json()) # convert the object into a dict test_inline_freeform_additional_properties_request_dict = test_inline_freeform_additional_properties_request_instance.to_dict() # create an instance of TestInlineFreeformAdditionalPropertiesRequest from a dict -test_inline_freeform_additional_properties_request_form_dict = test_inline_freeform_additional_properties_request.from_dict(test_inline_freeform_additional_properties_request_dict) +test_inline_freeform_additional_properties_request_from_dict = TestInlineFreeformAdditionalPropertiesRequest.from_dict(test_inline_freeform_additional_properties_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/TestObjectForMultipartRequestsRequestMarker.md b/samples/openapi3/client/petstore/python/docs/TestObjectForMultipartRequestsRequestMarker.md index 75cd561ffae8..ff0ca9ee00ac 100644 --- a/samples/openapi3/client/petstore/python/docs/TestObjectForMultipartRequestsRequestMarker.md +++ b/samples/openapi3/client/petstore/python/docs/TestObjectForMultipartRequestsRequestMarker.md @@ -22,7 +22,7 @@ print(TestObjectForMultipartRequestsRequestMarker.to_json()) # convert the object into a dict test_object_for_multipart_requests_request_marker_dict = test_object_for_multipart_requests_request_marker_instance.to_dict() # create an instance of TestObjectForMultipartRequestsRequestMarker from a dict -test_object_for_multipart_requests_request_marker_form_dict = test_object_for_multipart_requests_request_marker.from_dict(test_object_for_multipart_requests_request_marker_dict) +test_object_for_multipart_requests_request_marker_from_dict = TestObjectForMultipartRequestsRequestMarker.from_dict(test_object_for_multipart_requests_request_marker_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/Tiger.md b/samples/openapi3/client/petstore/python/docs/Tiger.md index f03552af0732..f1cf2133f0f7 100644 --- a/samples/openapi3/client/petstore/python/docs/Tiger.md +++ b/samples/openapi3/client/petstore/python/docs/Tiger.md @@ -22,7 +22,7 @@ print(Tiger.to_json()) # convert the object into a dict tiger_dict = tiger_instance.to_dict() # create an instance of Tiger from a dict -tiger_form_dict = tiger.from_dict(tiger_dict) +tiger_from_dict = Tiger.from_dict(tiger_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/UnnamedDictWithAdditionalModelListProperties.md b/samples/openapi3/client/petstore/python/docs/UnnamedDictWithAdditionalModelListProperties.md index 201a2d8d3e83..68cd00ab0a7a 100644 --- a/samples/openapi3/client/petstore/python/docs/UnnamedDictWithAdditionalModelListProperties.md +++ b/samples/openapi3/client/petstore/python/docs/UnnamedDictWithAdditionalModelListProperties.md @@ -22,7 +22,7 @@ print(UnnamedDictWithAdditionalModelListProperties.to_json()) # convert the object into a dict unnamed_dict_with_additional_model_list_properties_dict = unnamed_dict_with_additional_model_list_properties_instance.to_dict() # create an instance of UnnamedDictWithAdditionalModelListProperties from a dict -unnamed_dict_with_additional_model_list_properties_form_dict = unnamed_dict_with_additional_model_list_properties.from_dict(unnamed_dict_with_additional_model_list_properties_dict) +unnamed_dict_with_additional_model_list_properties_from_dict = UnnamedDictWithAdditionalModelListProperties.from_dict(unnamed_dict_with_additional_model_list_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/UnnamedDictWithAdditionalStringListProperties.md b/samples/openapi3/client/petstore/python/docs/UnnamedDictWithAdditionalStringListProperties.md index 534b6bec7978..045b0e22ad09 100644 --- a/samples/openapi3/client/petstore/python/docs/UnnamedDictWithAdditionalStringListProperties.md +++ b/samples/openapi3/client/petstore/python/docs/UnnamedDictWithAdditionalStringListProperties.md @@ -22,7 +22,7 @@ print(UnnamedDictWithAdditionalStringListProperties.to_json()) # convert the object into a dict unnamed_dict_with_additional_string_list_properties_dict = unnamed_dict_with_additional_string_list_properties_instance.to_dict() # create an instance of UnnamedDictWithAdditionalStringListProperties from a dict -unnamed_dict_with_additional_string_list_properties_form_dict = unnamed_dict_with_additional_string_list_properties.from_dict(unnamed_dict_with_additional_string_list_properties_dict) +unnamed_dict_with_additional_string_list_properties_from_dict = UnnamedDictWithAdditionalStringListProperties.from_dict(unnamed_dict_with_additional_string_list_properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/User.md b/samples/openapi3/client/petstore/python/docs/User.md index e9d5051b6462..c45d26d27043 100644 --- a/samples/openapi3/client/petstore/python/docs/User.md +++ b/samples/openapi3/client/petstore/python/docs/User.md @@ -29,7 +29,7 @@ print(User.to_json()) # convert the object into a dict user_dict = user_instance.to_dict() # create an instance of User from a dict -user_form_dict = user.from_dict(user_dict) +user_from_dict = User.from_dict(user_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/WithNestedOneOf.md b/samples/openapi3/client/petstore/python/docs/WithNestedOneOf.md index 7fdc6cb3d215..e7bbbc28fc2d 100644 --- a/samples/openapi3/client/petstore/python/docs/WithNestedOneOf.md +++ b/samples/openapi3/client/petstore/python/docs/WithNestedOneOf.md @@ -24,7 +24,7 @@ print(WithNestedOneOf.to_json()) # convert the object into a dict with_nested_one_of_dict = with_nested_one_of_instance.to_dict() # create an instance of WithNestedOneOf from a dict -with_nested_one_of_form_dict = with_nested_one_of.from_dict(with_nested_one_of_dict) +with_nested_one_of_from_dict = WithNestedOneOf.from_dict(with_nested_one_of_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index 258954a0b6d3..04e5e9cd15cf 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -25,6 +25,7 @@ from petstore_api.models.file_schema_test_class import FileSchemaTestClass from petstore_api.models.health_check_result import HealthCheckResult from petstore_api.models.outer_composite import OuterComposite +from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty from petstore_api.models.pet import Pet from petstore_api.models.tag import Tag @@ -2179,6 +2180,7 @@ def _fake_outer_string_serialize_serialize( def fake_property_enum_integer_serialize( self, outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + param: Optional[List[OuterEnumInteger]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2198,6 +2200,8 @@ def fake_property_enum_integer_serialize( :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2222,6 +2226,7 @@ def fake_property_enum_integer_serialize( _param = self._fake_property_enum_integer_serialize_serialize( outer_object_with_enum_property=outer_object_with_enum_property, + param=param, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2246,6 +2251,7 @@ def fake_property_enum_integer_serialize( def fake_property_enum_integer_serialize_with_http_info( self, outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + param: Optional[List[OuterEnumInteger]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2265,6 +2271,8 @@ def fake_property_enum_integer_serialize_with_http_info( :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2289,6 +2297,7 @@ def fake_property_enum_integer_serialize_with_http_info( _param = self._fake_property_enum_integer_serialize_serialize( outer_object_with_enum_property=outer_object_with_enum_property, + param=param, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2313,6 +2322,7 @@ def fake_property_enum_integer_serialize_with_http_info( def fake_property_enum_integer_serialize_without_preload_content( self, outer_object_with_enum_property: Annotated[OuterObjectWithEnumProperty, Field(description="Input enum (int) as post body")], + param: Optional[List[OuterEnumInteger]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2332,6 +2342,8 @@ def fake_property_enum_integer_serialize_without_preload_content( :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty + :param param: + :type param: List[OuterEnumInteger] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2356,6 +2368,7 @@ def fake_property_enum_integer_serialize_without_preload_content( _param = self._fake_property_enum_integer_serialize_serialize( outer_object_with_enum_property=outer_object_with_enum_property, + param=param, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2375,6 +2388,7 @@ def fake_property_enum_integer_serialize_without_preload_content( def _fake_property_enum_integer_serialize_serialize( self, outer_object_with_enum_property, + param, _request_auth, _content_type, _headers, @@ -2384,6 +2398,7 @@ def _fake_property_enum_integer_serialize_serialize( _host = None _collection_formats: Dict[str, str] = { + 'param': 'multi', } _path_params: Dict[str, str] = {} @@ -2395,6 +2410,10 @@ def _fake_property_enum_integer_serialize_serialize( # process the path parameters # process the query parameters + if param is not None: + + _query_params.append(('param', param)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index 18c5803cb5cf..7e17903a95fd 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -350,6 +350,8 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value elif isinstance(obj, SecretStr): return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_serialization.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_serialization.py new file mode 100644 index 000000000000..b7177b7f380a --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_serialization.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EnumSerialization(int, Enum): + """ + EnumSerialization + """ + + """ + allowed enum values + """ + NUMBER_0 = 0 + NUMBER_1 = 1 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EnumSerialization from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/samples/openapi3/client/petstore/python/test/test_enum_serialization.py b/samples/openapi3/client/petstore/python/test/test_enum_serialization.py new file mode 100644 index 000000000000..aca0106b36b9 --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_enum_serialization.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from petstore_api.models.enum_serialization import EnumSerialization + +class TestEnumSerialization(unittest.TestCase): + """EnumSerialization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnumSerialization(self): + """Test EnumSerialization""" + # inst = EnumSerialization() + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests/test_api_client.py b/samples/openapi3/client/petstore/python/tests/test_api_client.py index 8c5a99d3acff..1d8ffebaca0a 100644 --- a/samples/openapi3/client/petstore/python/tests/test_api_client.py +++ b/samples/openapi3/client/petstore/python/tests/test_api_client.py @@ -9,11 +9,9 @@ $ pytest """ -import os -import time -import atexit -import weakref import unittest +from enum import Enum + from dateutil.parser import parse import petstore_api @@ -155,6 +153,16 @@ def test_sanitize_for_serialization_datetime(self): result = self.api_client.sanitize_for_serialization(data) self.assertEqual(result, "1997-07-16T19:20:30.450000+01:00") + def test_sanitize_for_serialization_list_enum(self): + class EnumSerialization(int, Enum): + NUMBER_0 = 0 + NUMBER_1 = 1 + + data = [EnumSerialization.NUMBER_1] + result = self.api_client.sanitize_for_serialization(data) + self.assertEqual(result, [1]) + self.assertNotIsInstance(result[0], EnumSerialization) + def test_sanitize_for_serialization_list(self): data = [1] result = self.api_client.sanitize_for_serialization(data) @@ -203,10 +211,11 @@ def test_parameters_to_url_query_simple_values(self): "category2": "example2" } result = self.api_client.parameters_to_url_query([('value', dictionary)], {}) - self.assertEqual(result, "value=%7B%22category%22%3A%20%22example%22%2C%20%22category2%22%3A%20%22example2%22%7D") - + self.assertEqual(result, + "value=%7B%22category%22%3A%20%22example%22%2C%20%22category2%22%3A%20%22example2%22%7D") + def test_parameters_to_url_query_complex_values(self): - data='value={"number": 1, "string": "str", "bool": true, "dict": {"number": 1, "string": "str", "bool": true}}' + data = 'value={"number": 1, "string": "str", "bool": true, "dict": {"number": 1, "string": "str", "bool": true}}' dictionary = { "number": 1, "string": "str", @@ -218,10 +227,11 @@ def test_parameters_to_url_query_complex_values(self): } } result = self.api_client.parameters_to_url_query([('value', dictionary)], {}) - self.assertEqual(result, 'value=%7B%22number%22%3A%201%2C%20%22string%22%3A%20%22str%22%2C%20%22bool%22%3A%20true%2C%20%22dict%22%3A%20%7B%22number%22%3A%201%2C%20%22string%22%3A%20%22str%22%2C%20%22bool%22%3A%20true%7D%7D') + self.assertEqual(result, + 'value=%7B%22number%22%3A%201%2C%20%22string%22%3A%20%22str%22%2C%20%22bool%22%3A%20true%2C%20%22dict%22%3A%20%7B%22number%22%3A%201%2C%20%22string%22%3A%20%22str%22%2C%20%22bool%22%3A%20true%7D%7D') def test_parameters_to_url_query_dict_values(self): - data='value={"strValues": ["one", "two", "three"], "dictValues": [{"name": "value1", "age": 14}, {"name": "value2", "age": 12}]}' + data = 'value={"strValues": ["one", "two", "three"], "dictValues": [{"name": "value1", "age": 14}, {"name": "value2", "age": 12}]}' dictionary = { "strValues": [ "one", @@ -240,12 +250,14 @@ def test_parameters_to_url_query_dict_values(self): ] } result = self.api_client.parameters_to_url_query([('value', dictionary)], {}) - self.assertEqual(result, 'value=%7B%22strValues%22%3A%20%5B%22one%22%2C%20%22two%22%2C%20%22three%22%5D%2C%20%22dictValues%22%3A%20%5B%7B%22name%22%3A%20%22value1%22%2C%20%22age%22%3A%2014%7D%2C%20%7B%22name%22%3A%20%22value2%22%2C%20%22age%22%3A%2012%7D%5D%7D') + self.assertEqual(result, + 'value=%7B%22strValues%22%3A%20%5B%22one%22%2C%20%22two%22%2C%20%22three%22%5D%2C%20%22dictValues%22%3A%20%5B%7B%22name%22%3A%20%22value1%22%2C%20%22age%22%3A%2014%7D%2C%20%7B%22name%22%3A%20%22value2%22%2C%20%22age%22%3A%2012%7D%5D%7D') def test_parameters_to_url_query_boolean_value(self): result = self.api_client.parameters_to_url_query([('boolean', True)], {}) self.assertEqual(result, "boolean=true") def test_parameters_to_url_query_list_value(self): - params = self.api_client.parameters_to_url_query(params=[('list', [1, 2, 3])], collection_formats={'list': 'multi'}) + params = self.api_client.parameters_to_url_query(params=[('list', [1, 2, 3])], + collection_formats={'list': 'multi'}) self.assertEqual(params, "list=1&list=2&list=3") diff --git a/samples/openapi3/client/petstore/python/tests/test_fake_api.py b/samples/openapi3/client/petstore/python/tests/test_fake_api.py index 5e48d09b040e..dec2dcb4954b 100644 --- a/samples/openapi3/client/petstore/python/tests/test_fake_api.py +++ b/samples/openapi3/client/petstore/python/tests/test_fake_api.py @@ -15,6 +15,8 @@ import unittest from unittest.mock import patch, Mock import petstore_api +from petstore_api import OuterObjectWithEnumProperty, OuterEnumInteger + class TestFakeApi(unittest.TestCase): """StrLikeJson unit test stubs""" @@ -141,4 +143,25 @@ def testByteLikeJson(self): "petstore_api.api_client.ApiClient.call_api", return_value=mock_resp ): returned = self.fake_api.fake_return_byte_like_json() - self.assertEqual(b'{"a": "a"}', returned) \ No newline at end of file + self.assertEqual(b'{"a": "a"}', returned) + + def testIntEnumReturnsValue(self): + """ + Fixes #18327 (https://github.com/OpenAPITools/openapi-generator/issues/18327) + The enum value should be used in the param and not the enum name + """ + mock_resp = Mock() + mock_resp.status = 200 + mock_resp.data = b'{"value": "0"}' + mock_resp.getheaders.return_value = {} + mock_resp.getheader = ( + lambda name: "text/plain" if name == "content-type" else Mock() + ) + with patch( + "petstore_api.api_client.ApiClient.call_api", return_value=mock_resp + ) as call_api_mock: + self.fake_api.fake_property_enum_integer_serialize( + outer_object_with_enum_property=OuterObjectWithEnumProperty(value=OuterEnumInteger.NUMBER_0), + param=[OuterEnumInteger.NUMBER_0]) + self.assertEqual(call_api_mock.call_args[0][1], + 'http://petstore.swagger.io:80/v2/fake/property/enum-int?param=0') diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Category.java index f1c4031651ee..74382989eb02 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Category.java @@ -33,6 +33,14 @@ public class Category { private String name; + /** + * Constructor with all args parameters + */ + public Category(Long id, String name) { + this.id = id; + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/ModelApiResponse.java index ffef60ad7bf9..95561a5d73c8 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -37,6 +37,15 @@ public class ModelApiResponse { private String message; + /** + * Constructor with all args parameters + */ + public ModelApiResponse(Integer code, String type, String message) { + this.code = code; + this.type = type; + this.message = message; + } + public ModelApiResponse code(Integer code) { this.code = code; return this; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Order.java index f3b1eba96e9a..d67b292917d8 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Order.java @@ -82,6 +82,18 @@ public static StatusEnum fromValue(String value) { private Boolean complete = false; + /** + * Constructor with all args parameters + */ + public Order(Long id, Long petId, Integer quantity, OffsetDateTime shipDate, StatusEnum status, Boolean complete) { + this.id = id; + this.petId = petId; + this.quantity = quantity; + this.shipDate = shipDate; + this.status = status; + this.complete = complete; + } + public Order id(Long id) { this.id = id; return this; 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 f10ebeeb11a7..62be29e776a2 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 @@ -99,6 +99,18 @@ public Pet(String name, List photoUrls) { this.photoUrls = photoUrls; } + /** + * Constructor with all args parameters + */ + public Pet(Long id, Category category, String name, List photoUrls, List<@Valid Tag> tags, StatusEnum status) { + this.id = id; + this.category = category; + this.name = name; + this.photoUrls = photoUrls; + this.tags = tags; + this.status = status; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Tag.java index df1dbda7b2b5..799bfabac4b1 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Tag.java @@ -33,6 +33,14 @@ public class Tag { private String name; + /** + * Constructor with all args parameters + */ + public Tag(Long id, String name) { + this.id = id; + this.name = name; + } + public Tag id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/User.java index c25263b752af..631c6422e60a 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/User.java @@ -45,6 +45,20 @@ public class User { private Integer userStatus; + /** + * Constructor with all args parameters + */ + public User(Long id, String username, String firstName, String lastName, String email, String password, String phone, Integer userStatus) { + this.id = id; + this.username = username; + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + this.password = password; + this.phone = phone; + this.userStatus = userStatus; + } + public User id(Long id) { this.id = id; return this; diff --git a/samples/schema/postman-collection/postman.json b/samples/schema/postman-collection/postman.json index a274a7c2abfa..ee4af4efb371 100644 --- a/samples/schema/postman-collection/postman.json +++ b/samples/schema/postman-collection/postman.json @@ -109,7 +109,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"email\" : \"rebecca@gmail.com\"\n}", + "raw": "{\n \"email\" : \"rebecca@gmail.com\",\n \"verified\" : true\n}", "options": { "raw": { "language": "json" diff --git a/samples/schema/postman-collection/python/test/test_endpoints.py b/samples/schema/postman-collection/python/test/test_endpoints.py index 5030cb1b0332..59a7dc6da6d1 100644 --- a/samples/schema/postman-collection/python/test/test_endpoints.py +++ b/samples/schema/postman-collection/python/test/test_endpoints.py @@ -39,6 +39,13 @@ def test_request_with_array_strings(self): # check values self.assertTrue(set(data.get("tags")) == {"user", "admin", "guest"}) + def test_request_boolean_field(self): + # item + item = self.json_data['item'][0]['item'][0]['item'][1] + self.assertEqual(item['name'], 'Update Email') + self.assertEqual(item['request']["method"], 'PATCH') + self.assertEqual(item['request']["body"]["raw"], '{\n "email" : "rebecca@gmail.com",\n "verified" : true\n}') + if __name__ == '__main__': unittest.main() diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs index d4230ca5a4c5..9aa7c62b8e82 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonSerializer.Deserialize(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs index 2c52f026791d..edb6042856df 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs index 5a0951513f3d..98e67314721d 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs index fae01d29a624..64c652ea1875 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 7dded4e0f16a..5a197da3156e 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index b925426c761d..c57b5fb3bd16 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 6d7094c81a9d..3277ae43fcfd 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs index 419bab14d099..562ee1b0ff43 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -86,7 +86,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -117,7 +117,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; + exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -151,7 +151,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -226,7 +226,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index 8e493e399264..8dc20ddadfc4 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -127,7 +127,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order body) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs index 6669f0418cee..d1d13530b839 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -127,7 +127,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php index f1d6d929d538..abaf02d5b8c5 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php @@ -102,7 +102,7 @@ public function createErrorResponse(HttpException $exception): Response $json = $this->exceptionToArray($exception); $json['statusCode'] = $statusCode; - return new Response(json_encode($json, 15, 512), $statusCode, $headers); + return new Response(json_encode($json, 15), $statusCode, $headers); } /** @@ -229,7 +229,7 @@ protected function getOutputFormat(string $accept, array $produced): ?string public static function isContentTypeAllowed(Request $request, array $consumes = []): bool { if (!empty($consumes) && $consumes[0] !== '*/*') { - $currentFormat = $request->getContentType(); + $currentFormat = $request->getContentTypeFormat(); foreach ($consumes as $mimeType) { // canonize mime type if (is_string($mimeType) && false !== $pos = strpos($mimeType, ';')) { @@ -240,7 +240,7 @@ public static function isContentTypeAllowed(Request $request, array $consumes = // add custom format to request $format = $mimeType; $request->setFormat($format, $format); - $currentFormat = $request->getContentType(); + $currentFormat = $request->getContentTypeFormat(); } if ($format === $currentFormat) { diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/PetController.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/PetController.php index 66cec11ee392..c9bf53c92e2a 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/PetController.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/PetController.php @@ -88,7 +88,7 @@ public function addPetAction(Request $request) // Deserialize the input values that needs it try { - $inputFormat = $request->getMimeType($request->getContentType()); + $inputFormat = $request->getMimeType($request->getContentTypeFormat()); $pet = $this->deserialize($pet, 'OpenAPI\Server\Model\Pet', $inputFormat); } catch (SerializerRuntimeException $exception) { return $this->createBadRequestResponse($exception->getMessage()); @@ -117,18 +117,11 @@ public function addPetAction(Request $request) $result = $handler->addPet($pet, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 405: - $message = 'Invalid input'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 405 => 'Invalid input', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -202,15 +195,10 @@ public function deletePetAction(Request $request, $petId) $handler->deletePet($petId, $apiKey, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 400: - $message = 'Invalid pet value'; - break; - } + $message = match($responseCode) { + 400 => 'Invalid pet value', + default => '', + }; return new Response( '', @@ -291,18 +279,11 @@ public function findPetsByStatusAction(Request $request) $result = $handler->findPetsByStatus($status, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 400: - $message = 'Invalid status value'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 400 => 'Invalid status value', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -382,18 +363,11 @@ public function findPetsByTagsAction(Request $request) $result = $handler->findPetsByTags($tags, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 400: - $message = 'Invalid tag value'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 400 => 'Invalid tag value', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -468,21 +442,12 @@ public function getPetByIdAction(Request $request, $petId) $result = $handler->getPetById($petId, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 400: - $message = 'Invalid ID supplied'; - break; - case 404: - $message = 'Pet not found'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 400 => 'Invalid ID supplied', + 404 => 'Pet not found', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -538,7 +503,7 @@ public function updatePetAction(Request $request) // Deserialize the input values that needs it try { - $inputFormat = $request->getMimeType($request->getContentType()); + $inputFormat = $request->getMimeType($request->getContentTypeFormat()); $pet = $this->deserialize($pet, 'OpenAPI\Server\Model\Pet', $inputFormat); } catch (SerializerRuntimeException $exception) { return $this->createBadRequestResponse($exception->getMessage()); @@ -567,24 +532,13 @@ public function updatePetAction(Request $request) $result = $handler->updatePet($pet, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 400: - $message = 'Invalid ID supplied'; - break; - case 404: - $message = 'Pet not found'; - break; - case 405: - $message = 'Validation exception'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 400 => 'Invalid ID supplied', + 404 => 'Pet not found', + 405 => 'Validation exception', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -666,15 +620,10 @@ public function updatePetWithFormAction(Request $request, $petId) $handler->updatePetWithForm($petId, $name, $status, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 405: - $message = 'Invalid input'; - break; - } + $message = match($responseCode) { + 405 => 'Invalid input', + default => '', + }; return new Response( '', @@ -763,15 +712,10 @@ public function uploadFileAction(Request $request, $petId) $result = $handler->uploadFile($petId, $additionalMetadata, $file, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/StoreController.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/StoreController.php index 28a894894f64..79b38c784f41 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/StoreController.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/StoreController.php @@ -92,18 +92,11 @@ public function deleteOrderAction(Request $request, $orderId) $handler->deleteOrder($orderId, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 400: - $message = 'Invalid ID supplied'; - break; - case 404: - $message = 'Order not found'; - break; - } + $message = match($responseCode) { + 400 => 'Invalid ID supplied', + 404 => 'Order not found', + default => '', + }; return new Response( '', @@ -163,15 +156,10 @@ public function getInventoryAction(Request $request) $result = $handler->getInventory($responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -243,21 +231,12 @@ public function getOrderByIdAction(Request $request, $orderId) $result = $handler->getOrderById($orderId, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 400: - $message = 'Invalid ID supplied'; - break; - case 404: - $message = 'Order not found'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 400 => 'Invalid ID supplied', + 404 => 'Order not found', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -310,7 +289,7 @@ public function placeOrderAction(Request $request) // Deserialize the input values that needs it try { - $inputFormat = $request->getMimeType($request->getContentType()); + $inputFormat = $request->getMimeType($request->getContentTypeFormat()); $order = $this->deserialize($order, 'OpenAPI\Server\Model\Order', $inputFormat); } catch (SerializerRuntimeException $exception) { return $this->createBadRequestResponse($exception->getMessage()); @@ -337,18 +316,11 @@ public function placeOrderAction(Request $request) $result = $handler->placeOrder($order, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 400: - $message = 'Invalid Order'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 400 => 'Invalid Order', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/UserController.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/UserController.php index 49287cbbe203..fac6cc022507 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/UserController.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/UserController.php @@ -78,7 +78,7 @@ public function createUserAction(Request $request) // Deserialize the input values that needs it try { - $inputFormat = $request->getMimeType($request->getContentType()); + $inputFormat = $request->getMimeType($request->getContentTypeFormat()); $user = $this->deserialize($user, 'OpenAPI\Server\Model\User', $inputFormat); } catch (SerializerRuntimeException $exception) { return $this->createBadRequestResponse($exception->getMessage()); @@ -107,15 +107,10 @@ public function createUserAction(Request $request) $handler->createUser($user, $responseCode, $responseHeaders); - // Find default response message - $message = 'successful operation'; - - // Find a more specific message, if available - switch ($responseCode) { - case 0: - $message = 'successful operation'; - break; - } + $message = match($responseCode) { + 0 => 'successful operation', + default => 'successful operation', + }; return new Response( '', @@ -161,7 +156,7 @@ public function createUsersWithArrayInputAction(Request $request) // Deserialize the input values that needs it try { - $inputFormat = $request->getMimeType($request->getContentType()); + $inputFormat = $request->getMimeType($request->getContentTypeFormat()); $user = $this->deserialize($user, 'array', $inputFormat); } catch (SerializerRuntimeException $exception) { return $this->createBadRequestResponse($exception->getMessage()); @@ -192,15 +187,10 @@ public function createUsersWithArrayInputAction(Request $request) $handler->createUsersWithArrayInput($user, $responseCode, $responseHeaders); - // Find default response message - $message = 'successful operation'; - - // Find a more specific message, if available - switch ($responseCode) { - case 0: - $message = 'successful operation'; - break; - } + $message = match($responseCode) { + 0 => 'successful operation', + default => 'successful operation', + }; return new Response( '', @@ -246,7 +236,7 @@ public function createUsersWithListInputAction(Request $request) // Deserialize the input values that needs it try { - $inputFormat = $request->getMimeType($request->getContentType()); + $inputFormat = $request->getMimeType($request->getContentTypeFormat()); $user = $this->deserialize($user, 'array', $inputFormat); } catch (SerializerRuntimeException $exception) { return $this->createBadRequestResponse($exception->getMessage()); @@ -277,15 +267,10 @@ public function createUsersWithListInputAction(Request $request) $handler->createUsersWithListInput($user, $responseCode, $responseHeaders); - // Find default response message - $message = 'successful operation'; - - // Find a more specific message, if available - switch ($responseCode) { - case 0: - $message = 'successful operation'; - break; - } + $message = match($responseCode) { + 0 => 'successful operation', + default => 'successful operation', + }; return new Response( '', @@ -350,18 +335,11 @@ public function deleteUserAction(Request $request, $username) $handler->deleteUser($username, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 400: - $message = 'Invalid username supplied'; - break; - case 404: - $message = 'User not found'; - break; - } + $message = match($responseCode) { + 400 => 'Invalid username supplied', + 404 => 'User not found', + default => '', + }; return new Response( '', @@ -430,21 +408,12 @@ public function getUserByNameAction(Request $request, $username) $result = $handler->getUserByName($username, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 400: - $message = 'Invalid username supplied'; - break; - case 404: - $message = 'User not found'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 400 => 'Invalid username supplied', + 404 => 'User not found', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -525,18 +494,11 @@ public function loginUserAction(Request $request) $result = $handler->loginUser($username, $password, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 200: - $message = 'successful operation'; - break; - case 400: - $message = 'Invalid username/password supplied'; - break; - } + $message = match($responseCode) { + 200 => 'successful operation', + 400 => 'Invalid username/password supplied', + default => '', + }; return new Response( $result !== null ?$this->serialize($result, $responseFormat):'', @@ -588,15 +550,10 @@ public function logoutUserAction(Request $request) $handler->logoutUser($responseCode, $responseHeaders); - // Find default response message - $message = 'successful operation'; - - // Find a more specific message, if available - switch ($responseCode) { - case 0: - $message = 'successful operation'; - break; - } + $message = match($responseCode) { + 0 => 'successful operation', + default => 'successful operation', + }; return new Response( '', @@ -643,7 +600,7 @@ public function updateUserAction(Request $request, $username) // Deserialize the input values that needs it try { $username = $this->deserialize($username, 'string', 'string'); - $inputFormat = $request->getMimeType($request->getContentType()); + $inputFormat = $request->getMimeType($request->getContentTypeFormat()); $user = $this->deserialize($user, 'OpenAPI\Server\Model\User', $inputFormat); } catch (SerializerRuntimeException $exception) { return $this->createBadRequestResponse($exception->getMessage()); @@ -679,18 +636,11 @@ public function updateUserAction(Request $request, $username) $handler->updateUser($username, $user, $responseCode, $responseHeaders); - // Find default response message - $message = ''; - - // Find a more specific message, if available - switch ($responseCode) { - case 400: - $message = 'Invalid user supplied'; - break; - case 404: - $message = 'User not found'; - break; - } + $message = match($responseCode) { + 400 => 'Invalid user supplied', + 404 => 'User not found', + default => '', + }; return new Response( '', diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/JmsSerializer.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/JmsSerializer.php index 34a16b5e7346..12c69bab088b 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/JmsSerializer.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/JmsSerializer.php @@ -47,14 +47,11 @@ public function deserialize($data, string $type, string $format) private function convertFormat(string $format): ?string { - switch ($format) { - case 'application/json': - return 'json'; - case 'application/xml': - return 'xml'; - } - - return null; + return match($format) { + 'application/json' => 'json', + 'application/xml' => 'xml', + default => null, + }; } private function deserializeString($data, string $type) @@ -132,22 +129,13 @@ private function deserializeArrayString(string $format, string $type, $data): ar } // Parse the string using the correct separator - switch ($format) { - case 'csv': - $data = explode(',', $data); - break; - case 'ssv': - $data = explode(' ', $data); - break; - case 'tsv': - $data = explode("\t", $data); - break; - case 'pipes': - $data = explode('|', $data); - break; - default; - $data = []; - } + $data = match($format) { + 'csv' => explode(',', $data), + 'ssv' => explode(' ', $data), + 'tsv' => explode("\t", $data), + 'pipes' => explode('|', $data), + default => [], + }; // Deserialize each of the array elements foreach ($data as $key => $item) { diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/Controller/ControllerTest.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/Controller/ControllerTest.php index 9e2328a813f0..bf0edd41b456 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/Controller/ControllerTest.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/Controller/ControllerTest.php @@ -65,7 +65,7 @@ public function testIsContentTypeAllowed(?string $contentType, array $consumes, ); } - public function dataProviderIsContentTypeAllowed(): array + public static function dataProviderIsContentTypeAllowed(): array { return [ 'usual JSON content type' => [ diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json b/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json index 7aaf83d9c768..258c66371039 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json @@ -16,19 +16,19 @@ } ], "require": { - "php": ">=7.4.0|>=8.0.2", + "php": ">=8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "symfony/validator": "^5.0|^6.0", - "jms/serializer-bundle": "^4.0", - "symfony/framework-bundle": "^5.0|^6.0" + "symfony/validator": "^6.4|^7.0", + "jms/serializer-bundle": "^5.4", + "symfony/framework-bundle": "^6.4|^7.0" }, "require-dev": { - "phpunit/phpunit": "^9.5", - "friendsofphp/php-cs-fixer": "^2.16.3", - "symfony/browser-kit": "^5.0|^6.0", - "symfony/yaml": "^5.0|^6.0", + "phpunit/phpunit": "^10.5|^11.0", + "friendsofphp/php-cs-fixer": "*", + "symfony/browser-kit": "^6.4|7.0", + "symfony/yaml": "^6.4|^7.0", "hoa/regex": "~1.0" }, "autoload": { diff --git a/samples/server/petstore/python-fastapi/requirements.txt b/samples/server/petstore/python-fastapi/requirements.txt index d8e19d7ac0f3..f33ba924deca 100644 --- a/samples/server/petstore/python-fastapi/requirements.txt +++ b/samples/server/petstore/python-fastapi/requirements.txt @@ -5,7 +5,7 @@ async-generator==1.10 certifi==2023.7.22 chardet==4.0.0 click==7.1.2 -dnspython==2.1.0 +dnspython==2.6.1 email-validator==2.0.0 fastapi==0.109.2 graphene==2.1.8 @@ -14,7 +14,7 @@ graphql-relay==2.0.1 h11==0.12.0 httptools==0.1.2 httpx==0.24.1 -idna==2.10 +idna==3.7 itsdangerous==1.1.0 Jinja2==2.11.3 MarkupSafe==2.0.1 diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/multipart-v3/.openapi-generator/VERSION index c9e125ba1880..08bfd0643b8c 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/multipart-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/Cargo.toml b/samples/server/petstore/rust-axum/output/multipart-v3/Cargo.toml index 9b554d7ce5fc..1d9f505db109 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/Cargo.toml +++ b/samples/server/petstore/rust-axum/output/multipart-v3/Cargo.toml @@ -20,7 +20,7 @@ conversion = [ async-trait = "0.1" axum = { version = "0.7" } axum-extra = { version = "0.9", features = ["cookie", "multipart"] } -base64 = "0.21" +base64 = "0.22" bytes = "1" chrono = { version = "0.4", features = ["serde"] } frunk = { version = "0.4", optional = true } @@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [ ] } tracing = { version = "0.1", features = ["attributes"] } uuid = { version = "1", features = ["serde"] } -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/README.md b/samples/server/petstore/rust-axum/output/multipart-v3/README.md index d7e08f99cb3d..f4f456c04bd6 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/README.md +++ b/samples/server/petstore/rust-axum/output/multipart-v3/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.7 - +- Generator version: 7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/src/lib.rs b/samples/server/petstore/rust-axum/output/multipart-v3/src/lib.rs index ad0edc3812ee..f34355edde08 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/multipart-v3/src/lib.rs @@ -3,11 +3,11 @@ trivial_casts, unused_variables, unused_mut, - unused_imports, unused_extern_crates, - non_camel_case_types + non_camel_case_types, + unused_imports, + unused_attributes )] -#![allow(unused_imports, unused_attributes)] #![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/src/server/mod.rs b/samples/server/petstore/rust-axum/output/multipart-v3/src/server/mod.rs index b1dc6929757c..ea53d41e0e85 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/multipart-v3/src/server/mod.rs @@ -41,7 +41,6 @@ where fn multipart_related_request_post_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// MultipartRelatedRequestPost - POST /multipart_related_request #[tracing::instrument(skip_all)] async fn multipart_related_request_post( @@ -99,7 +98,6 @@ where fn multipart_request_post_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// MultipartRequestPost - POST /multipart_request #[tracing::instrument(skip_all)] async fn multipart_request_post( @@ -156,7 +154,6 @@ where fn multiple_identical_mime_types_post_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// MultipleIdenticalMimeTypesPost - POST /multiple-identical-mime-types #[tracing::instrument(skip_all)] async fn multiple_identical_mime_types_post( diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/openapi-v3/.openapi-generator/VERSION index c9e125ba1880..08bfd0643b8c 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/openapi-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/Cargo.toml b/samples/server/petstore/rust-axum/output/openapi-v3/Cargo.toml index 0c2cd9740585..5ffc5cd94055 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/Cargo.toml +++ b/samples/server/petstore/rust-axum/output/openapi-v3/Cargo.toml @@ -20,7 +20,7 @@ conversion = [ async-trait = "0.1" axum = { version = "0.7" } axum-extra = { version = "0.9", features = ["cookie", "multipart"] } -base64 = "0.21" +base64 = "0.22" bytes = "1" chrono = { version = "0.4", features = ["serde"] } frunk = { version = "0.4", optional = true } @@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [ ] } tracing = { version = "0.1", features = ["attributes"] } uuid = { version = "1", features = ["serde"] } -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/README.md b/samples/server/petstore/rust-axum/output/openapi-v3/README.md index 7343a6f0ef3b..cce3ce70309e 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/README.md +++ b/samples/server/petstore/rust-axum/output/openapi-v3/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.7 - +- Generator version: 7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/src/lib.rs b/samples/server/petstore/rust-axum/output/openapi-v3/src/lib.rs index a86c406ffee4..999fa523c362 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/openapi-v3/src/lib.rs @@ -3,11 +3,11 @@ trivial_casts, unused_variables, unused_mut, - unused_imports, unused_extern_crates, - non_camel_case_types + non_camel_case_types, + unused_imports, + unused_attributes )] -#![allow(unused_imports, unused_attributes)] #![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/src/server/mod.rs b/samples/server/petstore/rust-axum/output/openapi-v3/src/server/mod.rs index b471568f253c..77ff323cab4c 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/openapi-v3/src/server/mod.rs @@ -96,7 +96,6 @@ fn any_of_get_validation( Ok((query_params,)) } - /// AnyOfGet - GET /any-of #[tracing::instrument(skip_all)] async fn any_of_get( @@ -219,7 +218,6 @@ fn callback_with_header_post_validation( Ok((query_params,)) } - /// CallbackWithHeaderPost - POST /callback-with-header #[tracing::instrument(skip_all)] async fn callback_with_header_post( @@ -277,7 +275,6 @@ fn complex_query_param_get_validation( Ok((query_params,)) } - /// ComplexQueryParamGet - GET /complex-query-param #[tracing::instrument(skip_all)] async fn complex_query_param_get( @@ -335,7 +332,6 @@ fn enum_in_path_path_param_get_validation( Ok((path_params,)) } - /// EnumInPathPathParamGet - GET /enum_in_path/{path_param} #[tracing::instrument(skip_all)] async fn enum_in_path_path_param_get( @@ -393,7 +389,6 @@ fn json_complex_query_param_get_validation( Ok((query_params,)) } - /// JsonComplexQueryParamGet - GET /json-complex-query-param #[tracing::instrument(skip_all)] async fn json_complex_query_param_get( @@ -451,7 +446,6 @@ fn mandatory_request_header_get_validation( Ok((header_params,)) } - /// MandatoryRequestHeaderGet - GET /mandatory-request-header #[tracing::instrument(skip_all)] async fn mandatory_request_header_get( @@ -467,7 +461,7 @@ where { // Header parameters let header_params = { - let header_x_header = headers.get(HeaderName::from_static("x-header")); + let header_x_header = headers.get(HeaderName::from_static("x_header")); let header_x_header = match header_x_header { Some(v) => match header::IntoHeaderValue::::try_from((*v).clone()) { @@ -538,7 +532,6 @@ where fn merge_patch_json_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// MergePatchJsonGet - GET /merge-patch-json #[tracing::instrument(skip_all)] async fn merge_patch_json_get( @@ -610,7 +603,6 @@ where fn multiget_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// MultigetGet - GET /multiget #[tracing::instrument(skip_all)] async fn multiget_get( @@ -796,7 +788,6 @@ where fn multiple_auth_scheme_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// MultipleAuthSchemeGet - GET /multiple_auth_scheme #[tracing::instrument(skip_all)] async fn multiple_auth_scheme_get( @@ -851,7 +842,6 @@ where fn one_of_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// OneOfGet - GET /one-of #[tracing::instrument(skip_all)] async fn one_of_get( @@ -920,7 +910,6 @@ where fn override_server_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// OverrideServerGet - GET /override-server #[tracing::instrument(skip_all)] async fn override_server_get( @@ -977,7 +966,6 @@ fn paramget_get_validation( Ok((query_params,)) } - /// ParamgetGet - GET /paramget #[tracing::instrument(skip_all)] async fn paramget_get( @@ -1050,7 +1038,6 @@ where fn readonly_auth_scheme_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// ReadonlyAuthSchemeGet - GET /readonly_auth_scheme #[tracing::instrument(skip_all)] async fn readonly_auth_scheme_get( @@ -1109,7 +1096,6 @@ fn register_callback_post_validation( Ok((query_params,)) } - /// RegisterCallbackPost - POST /register-callback #[tracing::instrument(skip_all)] async fn register_callback_post( @@ -1171,7 +1157,6 @@ fn required_octet_stream_put_validation( ) -> std::result::Result<(Bytes,), ValidationErrors> { Ok((body,)) } - /// RequiredOctetStreamPut - PUT /required_octet_stream #[tracing::instrument(skip_all)] async fn required_octet_stream_put( @@ -1225,7 +1210,6 @@ where fn responses_with_headers_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// ResponsesWithHeadersGet - GET /responses_with_headers #[tracing::instrument(skip_all)] async fn responses_with_headers_get( @@ -1273,7 +1257,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers.insert(HeaderName::from_static("success-info"), success_info); + response_headers.insert(HeaderName::from_static(""), success_info); } if let Some(bool_header) = bool_header { let bool_header = match header::IntoHeaderValue(bool_header).try_into() { @@ -1287,8 +1271,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers - .insert(HeaderName::from_static("bool-header"), bool_header); + response_headers.insert(HeaderName::from_static(""), bool_header); } } if let Some(object_header) = object_header { @@ -1303,8 +1286,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers - .insert(HeaderName::from_static("object-header"), object_header); + response_headers.insert(HeaderName::from_static(""), object_header); } } @@ -1346,8 +1328,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers - .insert(HeaderName::from_static("further-info"), further_info); + response_headers.insert(HeaderName::from_static(""), further_info); } } if let Some(failure_info) = failure_info { @@ -1362,8 +1343,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers - .insert(HeaderName::from_static("failure-info"), failure_info); + response_headers.insert(HeaderName::from_static(""), failure_info); } } @@ -1388,7 +1368,6 @@ where fn rfc7807_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Rfc7807Get - GET /rfc7807 #[tracing::instrument(skip_all)] async fn rfc7807_get( @@ -1495,7 +1474,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct UntypedPropertyGetBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::ObjectUntypedProps, } @@ -1510,7 +1489,6 @@ fn untyped_property_get_validation( Ok((body,)) } - /// UntypedPropertyGet - GET /untyped_property #[tracing::instrument(skip_all)] async fn untyped_property_get( @@ -1564,7 +1542,6 @@ where fn uuid_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// UuidGet - GET /uuid #[tracing::instrument(skip_all)] async fn uuid_get( @@ -1639,7 +1616,6 @@ struct XmlExtraPostBodyValidator<'a> { fn xml_extra_post_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> { Ok((body,)) } - /// XmlExtraPost - POST /xml_extra #[tracing::instrument(skip_all)] async fn xml_extra_post( @@ -1703,7 +1679,6 @@ struct XmlOtherPostBodyValidator<'a> { fn xml_other_post_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> { Ok((body,)) } - /// XmlOtherPost - POST /xml_other #[tracing::instrument(skip_all)] async fn xml_other_post( @@ -1779,7 +1754,6 @@ struct XmlOtherPutBodyValidator<'a> { fn xml_other_put_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> { Ok((body,)) } - /// XmlOtherPut - PUT /xml_other #[tracing::instrument(skip_all)] async fn xml_other_put( @@ -1843,7 +1817,6 @@ struct XmlPostBodyValidator<'a> { fn xml_post_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> { Ok((body,)) } - /// XmlPost - POST /xml #[tracing::instrument(skip_all)] async fn xml_post( @@ -1907,7 +1880,6 @@ struct XmlPutBodyValidator<'a> { fn xml_put_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> { Ok((body,)) } - /// XmlPut - PUT /xml #[tracing::instrument(skip_all)] async fn xml_put( @@ -1961,7 +1933,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct CreateRepoBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::ObjectParam, } @@ -1974,7 +1946,6 @@ fn create_repo_validation( Ok((body,)) } - /// CreateRepo - POST /repos #[tracing::instrument(skip_all)] async fn create_repo( @@ -2032,7 +2003,6 @@ fn get_repo_info_validation( Ok((path_params,)) } - /// GetRepoInfo - GET /repos/{repoId} #[tracing::instrument(skip_all)] async fn get_repo_info( diff --git a/samples/server/petstore/rust-axum/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/ops-v3/.openapi-generator/VERSION index c9e125ba1880..08bfd0643b8c 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/ops-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/ops-v3/Cargo.toml b/samples/server/petstore/rust-axum/output/ops-v3/Cargo.toml index 80a1405875ea..7969d169d307 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/Cargo.toml +++ b/samples/server/petstore/rust-axum/output/ops-v3/Cargo.toml @@ -20,7 +20,7 @@ conversion = [ async-trait = "0.1" axum = { version = "0.7" } axum-extra = { version = "0.9", features = ["cookie", "multipart"] } -base64 = "0.21" +base64 = "0.22" bytes = "1" chrono = { version = "0.4", features = ["serde"] } frunk = { version = "0.4", optional = true } @@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [ ] } tracing = { version = "0.1", features = ["attributes"] } uuid = { version = "1", features = ["serde"] } -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/samples/server/petstore/rust-axum/output/ops-v3/README.md b/samples/server/petstore/rust-axum/output/ops-v3/README.md index c32fe05320aa..3cf44f6b0230 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/README.md +++ b/samples/server/petstore/rust-axum/output/ops-v3/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 0.0.1 - +- Generator version: 7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/ops-v3/src/lib.rs b/samples/server/petstore/rust-axum/output/ops-v3/src/lib.rs index 91aa8d085bb4..19337219b02b 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/ops-v3/src/lib.rs @@ -3,11 +3,11 @@ trivial_casts, unused_variables, unused_mut, - unused_imports, unused_extern_crates, - non_camel_case_types + non_camel_case_types, + unused_imports, + unused_attributes )] -#![allow(unused_imports, unused_attributes)] #![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; diff --git a/samples/server/petstore/rust-axum/output/ops-v3/src/server/mod.rs b/samples/server/petstore/rust-axum/output/ops-v3/src/server/mod.rs index ae991fadd5c3..e9bc23c2cd3f 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/ops-v3/src/server/mod.rs @@ -75,7 +75,6 @@ where fn op10_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op10Get - GET /op10 #[tracing::instrument(skip_all)] async fn op10_get( @@ -128,7 +127,6 @@ where fn op11_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op11Get - GET /op11 #[tracing::instrument(skip_all)] async fn op11_get( @@ -181,7 +179,6 @@ where fn op12_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op12Get - GET /op12 #[tracing::instrument(skip_all)] async fn op12_get( @@ -234,7 +231,6 @@ where fn op13_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op13Get - GET /op13 #[tracing::instrument(skip_all)] async fn op13_get( @@ -287,7 +283,6 @@ where fn op14_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op14Get - GET /op14 #[tracing::instrument(skip_all)] async fn op14_get( @@ -340,7 +335,6 @@ where fn op15_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op15Get - GET /op15 #[tracing::instrument(skip_all)] async fn op15_get( @@ -393,7 +387,6 @@ where fn op16_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op16Get - GET /op16 #[tracing::instrument(skip_all)] async fn op16_get( @@ -446,7 +439,6 @@ where fn op17_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op17Get - GET /op17 #[tracing::instrument(skip_all)] async fn op17_get( @@ -499,7 +491,6 @@ where fn op18_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op18Get - GET /op18 #[tracing::instrument(skip_all)] async fn op18_get( @@ -552,7 +543,6 @@ where fn op19_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op19Get - GET /op19 #[tracing::instrument(skip_all)] async fn op19_get( @@ -605,7 +595,6 @@ where fn op1_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op1Get - GET /op1 #[tracing::instrument(skip_all)] async fn op1_get( @@ -658,7 +647,6 @@ where fn op20_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op20Get - GET /op20 #[tracing::instrument(skip_all)] async fn op20_get( @@ -711,7 +699,6 @@ where fn op21_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op21Get - GET /op21 #[tracing::instrument(skip_all)] async fn op21_get( @@ -764,7 +751,6 @@ where fn op22_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op22Get - GET /op22 #[tracing::instrument(skip_all)] async fn op22_get( @@ -817,7 +803,6 @@ where fn op23_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op23Get - GET /op23 #[tracing::instrument(skip_all)] async fn op23_get( @@ -870,7 +855,6 @@ where fn op24_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op24Get - GET /op24 #[tracing::instrument(skip_all)] async fn op24_get( @@ -923,7 +907,6 @@ where fn op25_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op25Get - GET /op25 #[tracing::instrument(skip_all)] async fn op25_get( @@ -976,7 +959,6 @@ where fn op26_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op26Get - GET /op26 #[tracing::instrument(skip_all)] async fn op26_get( @@ -1029,7 +1011,6 @@ where fn op27_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op27Get - GET /op27 #[tracing::instrument(skip_all)] async fn op27_get( @@ -1082,7 +1063,6 @@ where fn op28_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op28Get - GET /op28 #[tracing::instrument(skip_all)] async fn op28_get( @@ -1135,7 +1115,6 @@ where fn op29_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op29Get - GET /op29 #[tracing::instrument(skip_all)] async fn op29_get( @@ -1188,7 +1167,6 @@ where fn op2_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op2Get - GET /op2 #[tracing::instrument(skip_all)] async fn op2_get( @@ -1241,7 +1219,6 @@ where fn op30_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op30Get - GET /op30 #[tracing::instrument(skip_all)] async fn op30_get( @@ -1294,7 +1271,6 @@ where fn op31_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op31Get - GET /op31 #[tracing::instrument(skip_all)] async fn op31_get( @@ -1347,7 +1323,6 @@ where fn op32_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op32Get - GET /op32 #[tracing::instrument(skip_all)] async fn op32_get( @@ -1400,7 +1375,6 @@ where fn op33_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op33Get - GET /op33 #[tracing::instrument(skip_all)] async fn op33_get( @@ -1453,7 +1427,6 @@ where fn op34_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op34Get - GET /op34 #[tracing::instrument(skip_all)] async fn op34_get( @@ -1506,7 +1479,6 @@ where fn op35_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op35Get - GET /op35 #[tracing::instrument(skip_all)] async fn op35_get( @@ -1559,7 +1531,6 @@ where fn op36_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op36Get - GET /op36 #[tracing::instrument(skip_all)] async fn op36_get( @@ -1612,7 +1583,6 @@ where fn op37_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op37Get - GET /op37 #[tracing::instrument(skip_all)] async fn op37_get( @@ -1665,7 +1635,6 @@ where fn op3_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op3Get - GET /op3 #[tracing::instrument(skip_all)] async fn op3_get( @@ -1718,7 +1687,6 @@ where fn op4_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op4Get - GET /op4 #[tracing::instrument(skip_all)] async fn op4_get( @@ -1771,7 +1739,6 @@ where fn op5_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op5Get - GET /op5 #[tracing::instrument(skip_all)] async fn op5_get( @@ -1824,7 +1791,6 @@ where fn op6_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op6Get - GET /op6 #[tracing::instrument(skip_all)] async fn op6_get( @@ -1877,7 +1843,6 @@ where fn op7_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op7Get - GET /op7 #[tracing::instrument(skip_all)] async fn op7_get( @@ -1930,7 +1895,6 @@ where fn op8_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op8Get - GET /op8 #[tracing::instrument(skip_all)] async fn op8_get( @@ -1983,7 +1947,6 @@ where fn op9_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Op9Get - GET /op9 #[tracing::instrument(skip_all)] async fn op9_get( diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index c9e125ba1880..08bfd0643b8c 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml index 42f579e8e992..7a7a1011388d 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml @@ -22,7 +22,7 @@ conversion = [ async-trait = "0.1" axum = { version = "0.7" } axum-extra = { version = "0.9", features = ["cookie", "multipart"] } -base64 = "0.21" +base64 = "0.22" bytes = "1" chrono = { version = "0.4", features = ["serde"] } frunk = { version = "0.4", optional = true } @@ -42,7 +42,7 @@ tokio = { version = "1", default-features = false, features = [ ] } tracing = { version = "0.1", features = ["attributes"] } uuid = { version = "1", features = ["serde"] } -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/README.md b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/README.md index 66718aba409f..e48c2df3d016 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/README.md +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.0 - +- Generator version: 7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs index 553ab3558136..5cc0e76a1a53 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs @@ -3,11 +3,11 @@ trivial_casts, unused_variables, unused_mut, - unused_imports, unused_extern_crates, - non_camel_case_types + non_camel_case_types, + unused_imports, + unused_attributes )] -#![allow(unused_imports, unused_attributes)] #![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index b1f8076c548e..ccd8f72ef78c 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -2768,12 +2768,14 @@ pub struct FormatTest { pub double: Option, #[serde(rename = "string")] - #[validate(regex = "RE_FORMATTEST_STRING")] + #[validate( + regex(path = *RE_FORMATTEST_STRING), + )] #[serde(skip_serializing_if = "Option::is_none")] pub string: Option, #[serde(rename = "byte")] - #[validate(custom = "validate_byte_formattest_byte")] + #[validate(custom(function = "validate_byte_formattest_byte"))] pub byte: ByteArray, #[serde(rename = "binary")] diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs index 521d140f42b8..cf0fe31c8130 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs @@ -118,7 +118,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct TestSpecialTagsBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Client, } @@ -131,7 +131,6 @@ fn test_special_tags_validation( Ok((body,)) } - /// TestSpecialTags - PATCH /v2/another-fake/dummy #[tracing::instrument(skip_all)] async fn test_special_tags( @@ -207,7 +206,6 @@ where fn call123example_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// Call123example - GET /v2/fake/operation-with-numeric-id #[tracing::instrument(skip_all)] async fn call123example( @@ -262,7 +260,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct FakeOuterBooleanSerializeBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::OuterBoolean, } @@ -277,7 +275,6 @@ fn fake_outer_boolean_serialize_validation( Ok((body,)) } - /// FakeOuterBooleanSerialize - POST /v2/fake/outer/boolean #[tracing::instrument(skip_all)] async fn fake_outer_boolean_serialize( @@ -353,7 +350,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct FakeOuterCompositeSerializeBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::OuterComposite, } @@ -368,7 +365,6 @@ fn fake_outer_composite_serialize_validation( Ok((body,)) } - /// FakeOuterCompositeSerialize - POST /v2/fake/outer/composite #[tracing::instrument(skip_all)] async fn fake_outer_composite_serialize( @@ -444,7 +440,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct FakeOuterNumberSerializeBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::OuterNumber, } @@ -459,7 +455,6 @@ fn fake_outer_number_serialize_validation( Ok((body,)) } - /// FakeOuterNumberSerialize - POST /v2/fake/outer/number #[tracing::instrument(skip_all)] async fn fake_outer_number_serialize( @@ -535,7 +530,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct FakeOuterStringSerializeBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::OuterString, } @@ -550,7 +545,6 @@ fn fake_outer_string_serialize_validation( Ok((body,)) } - /// FakeOuterStringSerialize - POST /v2/fake/outer/string #[tracing::instrument(skip_all)] async fn fake_outer_string_serialize( @@ -628,7 +622,6 @@ fn fake_response_with_numerical_description_validation() -> std::result::Result< { Ok(()) } - /// FakeResponseWithNumericalDescription - GET /v2/fake/response-with-numerical-description #[tracing::instrument(skip_all)] async fn fake_response_with_numerical_description( @@ -689,7 +682,6 @@ fn hyphen_param_validation( Ok((path_params,)) } - /// HyphenParam - GET /v2/fake/hyphenParam/{hyphen-param} #[tracing::instrument(skip_all)] async fn hyphen_param( @@ -745,7 +737,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct TestBodyWithQueryParamsBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::User, } @@ -761,7 +753,6 @@ fn test_body_with_query_params_validation( Ok((query_params, body)) } - /// TestBodyWithQueryParams - PUT /v2/fake/body-with-query-params #[tracing::instrument(skip_all)] async fn test_body_with_query_params( @@ -820,7 +811,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct TestClientModelBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Client, } @@ -833,7 +824,6 @@ fn test_client_model_validation( Ok((body,)) } - /// TestClientModel - PATCH /v2/fake #[tracing::instrument(skip_all)] async fn test_client_model( @@ -909,7 +899,6 @@ where fn test_endpoint_parameters_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// TestEndpointParameters - POST /v2/fake #[tracing::instrument(skip_all)] async fn test_endpoint_parameters( @@ -981,7 +970,6 @@ fn test_enum_parameters_validation( Ok((header_params, query_params)) } - /// TestEnumParameters - GET /v2/fake #[tracing::instrument(skip_all)] async fn test_enum_parameters( @@ -1106,7 +1094,6 @@ fn test_inline_additional_properties_validation( Ok((body,)) } - /// TestInlineAdditionalProperties - POST /v2/fake/inline-additionalProperties #[tracing::instrument(skip_all)] async fn test_inline_additional_properties( @@ -1164,7 +1151,6 @@ where fn test_json_form_data_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// TestJsonFormData - GET /v2/fake/jsonFormData #[tracing::instrument(skip_all)] async fn test_json_form_data( @@ -1219,7 +1205,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct TestClassnameBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Client, } @@ -1232,7 +1218,6 @@ fn test_classname_validation( Ok((body,)) } - /// TestClassname - PATCH /v2/fake_classname_test #[tracing::instrument(skip_all)] async fn test_classname( @@ -1307,7 +1292,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct AddPetBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Pet, } @@ -1318,7 +1303,6 @@ fn add_pet_validation(body: models::Pet) -> std::result::Result<(models::Pet,), Ok((body,)) } - /// AddPet - POST /v2/pet #[tracing::instrument(skip_all)] async fn add_pet( @@ -1381,7 +1365,6 @@ fn delete_pet_validation( Ok((header_params, path_params)) } - /// DeletePet - DELETE /v2/pet/{petId} #[tracing::instrument(skip_all)] async fn delete_pet( @@ -1469,7 +1452,6 @@ fn find_pets_by_status_validation( Ok((query_params,)) } - /// FindPetsByStatus - GET /v2/pet/findByStatus #[tracing::instrument(skip_all)] async fn find_pets_by_status( @@ -1547,7 +1529,6 @@ fn find_pets_by_tags_validation( Ok((query_params,)) } - /// FindPetsByTags - GET /v2/pet/findByTags #[tracing::instrument(skip_all)] async fn find_pets_by_tags( @@ -1625,7 +1606,6 @@ fn get_pet_by_id_validation( Ok((path_params,)) } - /// GetPetById - GET /v2/pet/{petId} #[tracing::instrument(skip_all)] async fn get_pet_by_id( @@ -1701,7 +1681,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct UpdatePetBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Pet, } @@ -1714,7 +1694,6 @@ fn update_pet_validation( Ok((body,)) } - /// UpdatePet - PUT /v2/pet #[tracing::instrument(skip_all)] async fn update_pet( @@ -1783,7 +1762,6 @@ fn update_pet_with_form_validation( Ok((path_params,)) } - /// UpdatePetWithForm - POST /v2/pet/{petId} #[tracing::instrument(skip_all)] async fn update_pet_with_form( @@ -1845,7 +1823,6 @@ fn upload_file_validation( Ok((path_params,)) } - /// UploadFile - POST /v2/pet/{petId}/uploadImage #[tracing::instrument(skip_all)] async fn upload_file( @@ -1926,7 +1903,6 @@ fn delete_order_validation( Ok((path_params,)) } - /// DeleteOrder - DELETE /v2/store/order/{order_id} #[tracing::instrument(skip_all)] async fn delete_order( @@ -1987,7 +1963,6 @@ where fn get_inventory_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// GetInventory - GET /v2/store/inventory #[tracing::instrument(skip_all)] async fn get_inventory( @@ -2063,7 +2038,6 @@ fn get_order_by_id_validation( Ok((path_params,)) } - /// GetOrderById - GET /v2/store/order/{order_id} #[tracing::instrument(skip_all)] async fn get_order_by_id( @@ -2139,7 +2113,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct PlaceOrderBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Order, } @@ -2152,7 +2126,6 @@ fn place_order_validation( Ok((body,)) } - /// PlaceOrder - POST /v2/store/order #[tracing::instrument(skip_all)] async fn place_order( @@ -2224,7 +2197,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct CreateUserBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::User, } @@ -2237,7 +2210,6 @@ fn create_user_validation( Ok((body,)) } - /// CreateUser - POST /v2/user #[tracing::instrument(skip_all)] async fn create_user( @@ -2293,7 +2265,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct CreateUsersWithArrayInputBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a Vec, } @@ -2306,7 +2278,6 @@ fn create_users_with_array_input_validation( Ok((body,)) } - /// CreateUsersWithArrayInput - POST /v2/user/createWithArray #[tracing::instrument(skip_all)] async fn create_users_with_array_input( @@ -2363,7 +2334,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct CreateUsersWithListInputBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a Vec, } @@ -2376,7 +2347,6 @@ fn create_users_with_list_input_validation( Ok((body,)) } - /// CreateUsersWithListInput - POST /v2/user/createWithList #[tracing::instrument(skip_all)] async fn create_users_with_list_input( @@ -2438,7 +2408,6 @@ fn delete_user_validation( Ok((path_params,)) } - /// DeleteUser - DELETE /v2/user/{username} #[tracing::instrument(skip_all)] async fn delete_user( @@ -2503,7 +2472,6 @@ fn get_user_by_name_validation( Ok((path_params,)) } - /// GetUserByName - GET /v2/user/{username} #[tracing::instrument(skip_all)] async fn get_user_by_name( @@ -2584,7 +2552,6 @@ fn login_user_validation( Ok((query_params,)) } - /// LoginUser - GET /v2/user/login #[tracing::instrument(skip_all)] async fn login_user( @@ -2636,8 +2603,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers - .insert(HeaderName::from_static("x-rate-limit"), x_rate_limit); + response_headers.insert(HeaderName::from_static(""), x_rate_limit); } } if let Some(x_expires_after) = x_expires_after { @@ -2653,8 +2619,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers - .insert(HeaderName::from_static("x-expires-after"), x_expires_after); + response_headers.insert(HeaderName::from_static(""), x_expires_after); } } @@ -2695,7 +2660,6 @@ where fn logout_user_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// LogoutUser - GET /v2/user/logout #[tracing::instrument(skip_all)] async fn logout_user( @@ -2747,7 +2711,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct UpdateUserBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::User, } @@ -2762,7 +2726,6 @@ fn update_user_validation( Ok((path_params, body)) } - /// UpdateUser - PUT /v2/user/{username} #[tracing::instrument(skip_all)] async fn update_user( diff --git a/samples/server/petstore/rust-axum/output/petstore/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/petstore/.openapi-generator/VERSION index c9e125ba1880..08bfd0643b8c 100644 --- a/samples/server/petstore/rust-axum/output/petstore/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/petstore/Cargo.toml b/samples/server/petstore/rust-axum/output/petstore/Cargo.toml index bdc5cf7766cf..2dc9654f6155 100644 --- a/samples/server/petstore/rust-axum/output/petstore/Cargo.toml +++ b/samples/server/petstore/rust-axum/output/petstore/Cargo.toml @@ -21,7 +21,7 @@ conversion = [ async-trait = "0.1" axum = { version = "0.7" } axum-extra = { version = "0.9", features = ["cookie", "multipart"] } -base64 = "0.21" +base64 = "0.22" bytes = "1" chrono = { version = "0.4", features = ["serde"] } frunk = { version = "0.4", optional = true } @@ -41,7 +41,7 @@ tokio = { version = "1", default-features = false, features = [ ] } tracing = { version = "0.1", features = ["attributes"] } uuid = { version = "1", features = ["serde"] } -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/samples/server/petstore/rust-axum/output/petstore/README.md b/samples/server/petstore/rust-axum/output/petstore/README.md index 3a9a839d794b..795a6f427e32 100644 --- a/samples/server/petstore/rust-axum/output/petstore/README.md +++ b/samples/server/petstore/rust-axum/output/petstore/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.0 - +- Generator version: 7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/petstore/src/lib.rs b/samples/server/petstore/rust-axum/output/petstore/src/lib.rs index eef1a4fbdc1d..50d589234ee9 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/lib.rs @@ -3,11 +3,11 @@ trivial_casts, unused_variables, unused_mut, - unused_imports, unused_extern_crates, - non_camel_case_types + non_camel_case_types, + unused_imports, + unused_attributes )] -#![allow(unused_imports, unused_attributes)] #![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; diff --git a/samples/server/petstore/rust-axum/output/petstore/src/models.rs b/samples/server/petstore/rust-axum/output/petstore/src/models.rs index cb639d3f374f..3bc961a8430b 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/models.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/models.rs @@ -92,7 +92,9 @@ pub struct GetUserByNamePathParams { pub struct LoginUserQueryParams { /// The user name for login #[serde(rename = "username")] - #[validate(regex = "RE_LOGINUSERQUERYPARAMS_USERNAME")] + #[validate( + regex(path = *RE_LOGINUSERQUERYPARAMS_USERNAME), + )] pub username: String, /// The password for login in clear text #[serde(rename = "password")] @@ -287,7 +289,9 @@ pub struct Category { pub id: Option, #[serde(rename = "name")] - #[validate(regex = "RE_CATEGORY_NAME")] + #[validate( + regex(path = *RE_CATEGORY_NAME), + )] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, } diff --git a/samples/server/petstore/rust-axum/output/petstore/src/server/mod.rs b/samples/server/petstore/rust-axum/output/petstore/src/server/mod.rs index 87e0b820afb8..51fb05bcfa24 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/server/mod.rs @@ -68,7 +68,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct AddPetBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Pet, } @@ -79,7 +79,6 @@ fn add_pet_validation(body: models::Pet) -> std::result::Result<(models::Pet,), Ok((body,)) } - /// AddPet - POST /v2/pet #[tracing::instrument(skip_all)] async fn add_pet( @@ -158,7 +157,6 @@ fn delete_pet_validation( Ok((header_params, path_params)) } - /// DeletePet - DELETE /v2/pet/{petId} #[tracing::instrument(skip_all)] async fn delete_pet( @@ -246,7 +244,6 @@ fn find_pets_by_status_validation( Ok((query_params,)) } - /// FindPetsByStatus - GET /v2/pet/findByStatus #[tracing::instrument(skip_all)] async fn find_pets_by_status( @@ -324,7 +321,6 @@ fn find_pets_by_tags_validation( Ok((query_params,)) } - /// FindPetsByTags - GET /v2/pet/findByTags #[tracing::instrument(skip_all)] async fn find_pets_by_tags( @@ -402,7 +398,6 @@ fn get_pet_by_id_validation( Ok((path_params,)) } - /// GetPetById - GET /v2/pet/{petId} #[tracing::instrument(skip_all)] async fn get_pet_by_id( @@ -478,7 +473,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct UpdatePetBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Pet, } @@ -491,7 +486,6 @@ fn update_pet_validation( Ok((body,)) } - /// UpdatePet - PUT /v2/pet #[tracing::instrument(skip_all)] async fn update_pet( @@ -576,7 +570,6 @@ fn update_pet_with_form_validation( Ok((path_params,)) } - /// UpdatePetWithForm - POST /v2/pet/{petId} #[tracing::instrument(skip_all)] async fn update_pet_with_form( @@ -638,7 +631,6 @@ fn upload_file_validation( Ok((path_params,)) } - /// UploadFile - POST /v2/pet/{petId}/uploadImage #[tracing::instrument(skip_all)] async fn upload_file( @@ -719,7 +711,6 @@ fn delete_order_validation( Ok((path_params,)) } - /// DeleteOrder - DELETE /v2/store/order/{orderId} #[tracing::instrument(skip_all)] async fn delete_order( @@ -780,7 +771,6 @@ where fn get_inventory_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// GetInventory - GET /v2/store/inventory #[tracing::instrument(skip_all)] async fn get_inventory( @@ -856,7 +846,6 @@ fn get_order_by_id_validation( Ok((path_params,)) } - /// GetOrderById - GET /v2/store/order/{orderId} #[tracing::instrument(skip_all)] async fn get_order_by_id( @@ -932,7 +921,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct PlaceOrderBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::Order, } @@ -945,7 +934,6 @@ fn place_order_validation( Ok((body,)) } - /// PlaceOrder - POST /v2/store/order #[tracing::instrument(skip_all)] async fn place_order( @@ -1017,7 +1005,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct CreateUserBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::User, } @@ -1030,7 +1018,6 @@ fn create_user_validation( Ok((body,)) } - /// CreateUser - POST /v2/user #[tracing::instrument(skip_all)] async fn create_user( @@ -1086,7 +1073,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct CreateUsersWithArrayInputBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a Vec, } @@ -1099,7 +1086,6 @@ fn create_users_with_array_input_validation( Ok((body,)) } - /// CreateUsersWithArrayInput - POST /v2/user/createWithArray #[tracing::instrument(skip_all)] async fn create_users_with_array_input( @@ -1156,7 +1142,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct CreateUsersWithListInputBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a Vec, } @@ -1169,7 +1155,6 @@ fn create_users_with_list_input_validation( Ok((body,)) } - /// CreateUsersWithListInput - POST /v2/user/createWithList #[tracing::instrument(skip_all)] async fn create_users_with_list_input( @@ -1231,7 +1216,6 @@ fn delete_user_validation( Ok((path_params,)) } - /// DeleteUser - DELETE /v2/user/{username} #[tracing::instrument(skip_all)] async fn delete_user( @@ -1296,7 +1280,6 @@ fn get_user_by_name_validation( Ok((path_params,)) } - /// GetUserByName - GET /v2/user/{username} #[tracing::instrument(skip_all)] async fn get_user_by_name( @@ -1377,7 +1360,6 @@ fn login_user_validation( Ok((query_params,)) } - /// LoginUser - GET /v2/user/login #[tracing::instrument(skip_all)] async fn login_user( @@ -1430,7 +1412,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers.insert(HeaderName::from_static("set-cookie"), set_cookie); + response_headers.insert(HeaderName::from_static(""), set_cookie); } } if let Some(x_rate_limit) = x_rate_limit { @@ -1445,8 +1427,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers - .insert(HeaderName::from_static("x-rate-limit"), x_rate_limit); + response_headers.insert(HeaderName::from_static(""), x_rate_limit); } } if let Some(x_expires_after) = x_expires_after { @@ -1462,8 +1443,7 @@ where { let mut response_headers = response.headers_mut().unwrap(); - response_headers - .insert(HeaderName::from_static("x-expires-after"), x_expires_after); + response_headers.insert(HeaderName::from_static(""), x_expires_after); } } @@ -1504,7 +1484,6 @@ where fn logout_user_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// LogoutUser - GET /v2/user/logout #[tracing::instrument(skip_all)] async fn logout_user( @@ -1556,7 +1535,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct UpdateUserBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::User, } @@ -1571,7 +1550,6 @@ fn update_user_validation( Ok((path_params, body)) } - /// UpdateUser - PUT /v2/user/{username} #[tracing::instrument(skip_all)] async fn update_user( diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/ping-bearer-auth/.openapi-generator/VERSION index c9e125ba1880..08bfd0643b8c 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/Cargo.toml b/samples/server/petstore/rust-axum/output/ping-bearer-auth/Cargo.toml index fa0a6c1f3ed6..df7f8cd5207a 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/Cargo.toml +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/Cargo.toml @@ -20,7 +20,7 @@ conversion = [ async-trait = "0.1" axum = { version = "0.7" } axum-extra = { version = "0.9", features = ["cookie", "multipart"] } -base64 = "0.21" +base64 = "0.22" bytes = "1" chrono = { version = "0.4", features = ["serde"] } frunk = { version = "0.4", optional = true } @@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [ ] } tracing = { version = "0.1", features = ["attributes"] } uuid = { version = "1", features = ["serde"] } -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/README.md b/samples/server/petstore/rust-axum/output/ping-bearer-auth/README.md index 46a6534028db..56b88a40475c 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/README.md +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0 - +- Generator version: 7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/lib.rs b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/lib.rs index 5b44cc42895e..f09f3f93369d 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/lib.rs @@ -3,11 +3,11 @@ trivial_casts, unused_variables, unused_mut, - unused_imports, unused_extern_crates, - non_camel_case_types + non_camel_case_types, + unused_imports, + unused_attributes )] -#![allow(unused_imports, unused_attributes)] #![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/server/mod.rs b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/server/mod.rs index 5ec08d2d341f..6f0aa768504f 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/server/mod.rs @@ -30,7 +30,6 @@ where fn ping_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// PingGet - GET /ping #[tracing::instrument(skip_all)] async fn ping_get( diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/rust-axum-test/.openapi-generator/VERSION index c9e125ba1880..08bfd0643b8c 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/Cargo.toml b/samples/server/petstore/rust-axum/output/rust-axum-test/Cargo.toml index 347c1aad2d7c..2c9049bb789d 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/Cargo.toml +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/Cargo.toml @@ -20,7 +20,7 @@ conversion = [ async-trait = "0.1" axum = { version = "0.7" } axum-extra = { version = "0.9", features = ["cookie", "multipart"] } -base64 = "0.21" +base64 = "0.22" bytes = "1" chrono = { version = "0.4", features = ["serde"] } frunk = { version = "0.4", optional = true } @@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [ ] } tracing = { version = "0.1", features = ["attributes"] } uuid = { version = "1", features = ["serde"] } -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/README.md b/samples/server/petstore/rust-axum/output/rust-axum-test/README.md index b71f8cde2164..d1f027f128d6 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/README.md +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 2.3.4 - +- Generator version: 7.5.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/src/lib.rs b/samples/server/petstore/rust-axum/output/rust-axum-test/src/lib.rs index 4024a01566dc..305ff1df6d15 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/src/lib.rs @@ -3,11 +3,11 @@ trivial_casts, unused_variables, unused_mut, - unused_imports, unused_extern_crates, - non_camel_case_types + non_camel_case_types, + unused_imports, + unused_attributes )] -#![allow(unused_imports, unused_attributes)] #![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/src/server/mod.rs b/samples/server/petstore/rust-axum/output/rust-axum-test/src/server/mod.rs index 7acb80ed7adb..da5d544f848a 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/src/server/mod.rs @@ -41,7 +41,6 @@ where fn all_of_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// AllOfGet - GET /allOf #[tracing::instrument(skip_all)] async fn all_of_get( @@ -113,7 +112,6 @@ where fn dummy_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// DummyGet - GET /dummy #[tracing::instrument(skip_all)] async fn dummy_get( @@ -165,7 +163,7 @@ where #[derive(validator::Validate)] #[allow(dead_code)] struct DummyPutBodyValidator<'a> { - #[validate] + #[validate(nested)] body: &'a models::DummyPutRequest, } @@ -178,7 +176,6 @@ fn dummy_put_validation( Ok((body,)) } - /// DummyPut - PUT /dummy #[tracing::instrument(skip_all)] async fn dummy_put( @@ -235,7 +232,6 @@ where fn file_response_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// FileResponseGet - GET /file_response #[tracing::instrument(skip_all)] async fn file_response_get( @@ -310,7 +306,6 @@ where fn get_structured_yaml_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// GetStructuredYaml - GET /get-structured-yaml #[tracing::instrument(skip_all)] async fn get_structured_yaml( @@ -384,7 +379,6 @@ struct HtmlPostBodyValidator<'a> { fn html_post_validation(body: String) -> std::result::Result<(String,), ValidationErrors> { Ok((body,)) } - /// HtmlPost - POST /html #[tracing::instrument(skip_all)] async fn html_post( @@ -459,7 +453,6 @@ struct PostYamlBodyValidator<'a> { fn post_yaml_validation(body: String) -> std::result::Result<(String,), ValidationErrors> { Ok((body,)) } - /// PostYaml - POST /post-yaml #[tracing::instrument(skip_all)] async fn post_yaml( @@ -516,7 +509,6 @@ where fn raw_json_get_validation() -> std::result::Result<(), ValidationErrors> { Ok(()) } - /// RawJsonGet - GET /raw_json #[tracing::instrument(skip_all)] async fn raw_json_get( @@ -599,7 +591,6 @@ fn solo_object_post_validation( Ok((body,)) } - /// SoloObjectPost - POST /solo-object #[tracing::instrument(skip_all)] async fn solo_object_post( diff --git a/samples/server/petstore/scala-cask/.github/workflows/bulidAndPublish.yml b/samples/server/petstore/scala-cask/.github/workflows/bulidAndPublish.yml new file mode 100644 index 000000000000..fef794246b02 --- /dev/null +++ b/samples/server/petstore/scala-cask/.github/workflows/bulidAndPublish.yml @@ -0,0 +1,41 @@ +name: Scala CI with sbt + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Cache sbt dependencies + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.m2 + key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }} + restore-keys: | + ${{ runner.os }}-sbt- + + - name: Build with sbt + run: sbt clean compile + + - name: Test with sbt + run: sbt test + + - name: Publish to GitHub Packages + run: sbt publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/samples/server/petstore/scala-cask/.gitignore b/samples/server/petstore/scala-cask/.gitignore new file mode 100644 index 000000000000..56f2b272a080 --- /dev/null +++ b/samples/server/petstore/scala-cask/.gitignore @@ -0,0 +1,25 @@ +# scala specific +*.class +*.log + +# sbt specific +.cache +.history +.lib/ +dist/* +target/ +lib_managed/ +src_managed/ +project/boot/ +project/plugins/project/ + +# Scala-IDE specific +.scala_dependencies +.worksheet + +# Mill specific +out + +# IntelliJ specific +.idea +*.iml diff --git a/samples/server/petstore/scala-cask/.openapi-generator-ignore b/samples/server/petstore/scala-cask/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/scala-cask/.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/scala-cask/.openapi-generator/VERSION b/samples/server/petstore/scala-cask/.openapi-generator/VERSION new file mode 100644 index 000000000000..08bfd0643b8c --- /dev/null +++ b/samples/server/petstore/scala-cask/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0-SNAPSHOT diff --git a/samples/server/petstore/scala-cask/.scalafmt.conf b/samples/server/petstore/scala-cask/.scalafmt.conf new file mode 100644 index 000000000000..e150d4c409d2 --- /dev/null +++ b/samples/server/petstore/scala-cask/.scalafmt.conf @@ -0,0 +1,4 @@ +version = 3.6.1 +align.preset = more // For pretty alignment. +maxColumn = 100 +runner.dialect = scala3 \ No newline at end of file diff --git a/samples/server/petstore/scala-cask/README.md b/samples/server/petstore/scala-cask/README.md new file mode 100644 index 000000000000..39e65480193a --- /dev/null +++ b/samples/server/petstore/scala-cask/README.md @@ -0,0 +1,96 @@ +# REST Service + +This project contains the data models and REST services, generated from the [openapi-generator](https://github.com/OpenAPITools/openapi-generator) project. + +The server implementation is based on Li's excellent [cask](https://com-lihaoyi.github.io/cask/) library. + +# How to use this code + +This code was designed so that it can be packaged up and semantically-versioned alongside your open-api schema. + +That approach supports having separate "contract" repositories for microservice projects, where the pipeline for the +contract repo might produce versioned jar artefacts which can then easily be brought in / referenced by a separate service project which simply +implements the business logic. + +You can read more about this approach [here](https://github.com/kindservices/contract-first-rest) + +# How to implement your business logic +There are a few options for using this code/applying your business logic for the services. + +## Option 1 (preferred): Package and publish this boilerplate +Typically, OpenApi templates are written to generate code which co-exists alongside the handwritten business logic. + +While that works, it's also not ideal: + * You have to ensure the generated code isn't checked in + * Team members, build pipelines, etc all have to regenerate and recompile the same boilerplate code over and over + * People can encounter IDE issues with generated code + +Instead, you have the option of simply packaging/publishing this generated code, and then allowing service implementations +to simply bring in the published code as a dependency. + +The steps to do that are: + +### Build/Publish +This project is built using [sbt](https://www.scala-sbt.org/download/), so you can run `sbt publish` (or `sbt publishLocal`) + +Or, for a zero-install docker build: +```bash +docker run -it --rm -v $(pwd):/app -w /app sbtscala/scala-sbt:eclipse-temurin-17.0.4_1.7.1_3.2.0 sbt publishLocal +``` + +### Create a new separate implementation project +Once published, you can create your server implementation in a new, clean, separate project based on [the example](./example) + +This means all the boilerplate endpoint and model code is brought in as "just another jar", and you're free to +create a greenfield project in whatever language (scala, java, kotlin) and build system of your choosing. + +We show a simple, minimalistic example of a starting point in [the example project](./example) + +## Option 2: Extend this generated example +You can configure this project (for instance, setting up your own .gitignore rules and scripts) to leave the generated code as-is +and provide your implementation alongside the generated code. + +The place to start is by providing your own implementation of the Services defined in the `api` package - +perhaps by creating your 'MyService.scala' code in a new `impl` package. + +You then have several options for how to wire those in: + +1) Create a new BaseApp instance to create your own Main entry point +Follow the pattern in App.scala, but by passing your own implementations to BaseApp, +ensuring you call `start` to start the server + +```bash +@main def run() = BaseApp(/* your services here/*).start() +``` + +2) Extend either BaseApp class or mix in the AppRoutes trait +You can create your own main entry point with further control of the main cask app by extending +the BaseApp or otherwise creating your own CaskApp which mixes in the AppRoutes + +```bash +object MyApp extends BaseApp(/* your services here/*) { + // any overrides, new routes, etc here + start() +} +``` + + +# Customising the generated code + +A typical config.yml used to alter the generated code may look like this: +``` +groupId: "ex.amp.le" +artifactId: "pets-test" +apiPackage: "ex.ample.api" +modelPackage: "ex.ample.model" +``` + +Which you would then pass to the generator like this: +``` +docker run --rm \ +-v ${PWD}:/local openapitools/openapi-generator-cli generate \ +-i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.yaml \ +-g scala-cask \ +-c /local/config.yml \ +-o /local/path/to/output_dir +``` diff --git a/samples/server/petstore/scala-cask/build.sbt b/samples/server/petstore/scala-cask/build.sbt new file mode 100644 index 000000000000..4062a2fa45ae --- /dev/null +++ b/samples/server/petstore/scala-cask/build.sbt @@ -0,0 +1,29 @@ +name := "scala-cask-petstore" +organization:="cask.groupId" +version := "0.0.1-SNAPSHOT" +scalaVersion := "3.3.1" +scalafmtOnCompile := true +libraryDependencies ++= Seq( + "com.lihaoyi" %% "cask" % "0.9.2" , + "com.lihaoyi" %% "upickle" % "3.2.0", + "org.scalatest" %% "scalatest" % "3.2.18" % Test +) + +publishMavenStyle := true + +val githubUser = "GIT_USER_ID" +val githubRepo = "GIT_REPO_ID" +publishTo := Some("GitHub Package Registry" at s"https://maven.pkg.github.com/$githubUser/$githubRepo") + +sys.env.get("GITHUB_TOKEN") match { + case Some(token) if !token.isEmpty => + credentials += Credentials( + "GitHub Package Registry", + "maven.pkg.github.com", + githubUser, + token + ) + case _ => + println("\n\t\tGITHUB_TOKEN not set - assuming a local build\n\n") + credentials ++= Nil +} \ No newline at end of file diff --git a/samples/server/petstore/scala-cask/build.sc b/samples/server/petstore/scala-cask/build.sc new file mode 100644 index 000000000000..b2ca29889874 --- /dev/null +++ b/samples/server/petstore/scala-cask/build.sc @@ -0,0 +1,43 @@ +import mill._, scalalib._, scalafmt._, publish._ + +// Mill build file (see https://mill-build.com/mill/Intro_to_Mill.html). +// run with: +// +// mill _.compile +// mill _.reformat +// mill _.publishLocal +// mill _.test.test +object scala-cask-petstore extends SbtModule with ScalafmtModule with PublishModule { + def scalaVersion = "3.3.1" + + def pomSettings = PomSettings( + description = "scala-cask-petstore", + organization = "cask.groupId", + url = "https://github.com//scala-cask-petstore", + licenses = Seq(License.MIT), + versionControl = VersionControl.github("", "scala-cask-petstore"), + developers = Seq( + // Developer("", "", "https://github.com/") + ) + ) + + def publishVersion: mill.T[String] = T("0.0.1-SNAPSHOT") + + def ivyDeps = Agg( + ivy"com.lihaoyi::cask:0.9.2" , + ivy"com.lihaoyi::upickle:3.2.0" + ) + + override def sources = T.sources(millSourcePath / os.up / "src" / "main" / "scala") + override def resources = T.sources(millSourcePath / os.up / "src" / "main" / "resources") + + object test extends SbtModuleTests { + def ivyDeps = Agg( + ivy"org.scalactic::scalactic:3.2.18", + ivy"org.scalatest::scalatest:3.2.18" + ) + + def testFramework = "org.scalatest.tools.Framework" + override def sources = T.sources(millSourcePath / os.up / "src" / "test" / "scala") + } +} diff --git a/samples/server/petstore/scala-cask/example/Dockerfile b/samples/server/petstore/scala-cask/example/Dockerfile new file mode 100644 index 000000000000..0c5487539733 --- /dev/null +++ b/samples/server/petstore/scala-cask/example/Dockerfile @@ -0,0 +1,13 @@ +FROM virtuslab/scala-cli:latest as build +WORKDIR /app +COPY ./Server.scala /app/ +# note: this assumes a published server stub jar. +# If you've published this locally, you would need to copy those into this image, +# perhaps by using coursier fetch +RUN scala-cli --power package /app/Server.scala --assembly -o app.jar + +# The main image +FROM openjdk:23-slim +WORKDIR /app +COPY --from=build /app/app.jar /app/ +ENTRYPOINT ["java", "-jar", "/app/app.jar"] diff --git a/samples/server/petstore/scala-cask/example/Server.scala b/samples/server/petstore/scala-cask/example/Server.scala new file mode 100644 index 000000000000..77e65913712a --- /dev/null +++ b/samples/server/petstore/scala-cask/example/Server.scala @@ -0,0 +1,61 @@ +//> using scala "3.3.1" +//> using lib "cask.groupId::scala-cask-petstore:0.0.1-SNAPSHOT" +//> using repositories https://maven.pkg.github.com/GIT_USER_ID/GIT_REPO_ID + + +/** +* This single file can contain the business logic for a REST service. +* ==================================== +* == zero-install build with docker == +* ==================================== +* +* +* ``` +* docker build . -t scala-cask-petstore:latest +* ``` +* ====================== +* == Building Locally == +* ====================== +* This project can be built using [[scala-clit][https://scala-cli.virtuslab.org]] +* +* To simply run the project +* ``` +* scala-cli Server.scala +* ``` +* +* To create a runnable jar, run: +* ``` +* scala-cli --power package Server.scala -o app-assembly --assembly +* ``` +* +* To produce a docker image (no need for the Dockerfile), run: +* ``` +* scala-cli --power package --docker Server.scala --docker-image-repository app-docker +* ``` +* +* To generate an IDE project: +* ``` +* scala-cli setup-ide . --scala 3.3 +* ``` +*/ +package app + +import cask.groupId.server.BaseApp +import sample.cask.api.* +import sample.cask.model.* + +import java.io.File + +// TODO - write your business logic for your services here (the defaults all return 'not implemented'): +val myPetService : PetService = PetService() // <-- replace this with your implementation +val myStoreService : StoreService = StoreService() // <-- replace this with your implementation +val myUserService : UserService = UserService() // <-- replace this with your implementation + +/** This is your main entry point for your REST service + * It extends BaseApp which defines the business logic for your services + */ +object Server extends BaseApp(appPetService = myPetService, +appStoreService = myStoreService, +appUserService = myUserService): + start() + diff --git a/samples/server/petstore/scala-cask/project/build.properties b/samples/server/petstore/scala-cask/project/build.properties new file mode 100644 index 000000000000..04267b14af69 --- /dev/null +++ b/samples/server/petstore/scala-cask/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.9.9 diff --git a/samples/server/petstore/scala-cask/project/plugins.sbt b/samples/server/petstore/scala-cask/project/plugins.sbt new file mode 100644 index 000000000000..4f3f02c2de45 --- /dev/null +++ b/samples/server/petstore/scala-cask/project/plugins.sbt @@ -0,0 +1,3 @@ +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") + +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") \ No newline at end of file diff --git a/samples/server/petstore/scala-cask/src/main/resources/openapi.json b/samples/server/petstore/scala-cask/src/main/resources/openapi.json new file mode 100644 index 000000000000..5c3f8dec9aa7 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/resources/openapi.json @@ -0,0 +1,1032 @@ +{ + "openapi" : "3.0.0", + "info" : { + "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", + "license" : { + "name" : "Apache-2.0", + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "title" : "OpenAPI Petstore", + "version" : "1.0.0" + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + }, + "servers" : [ { + "url" : "http://petstore.swagger.io/v2" + } ], + "tags" : [ { + "description" : "Everything about your Pets", + "name" : "pet" + }, { + "description" : "Access to Petstore orders", + "name" : "store" + }, { + "description" : "Operations about user", + "name" : "user" + } ], + "paths" : { + "/pet" : { + "post" : { + "description" : "", + "operationId" : "addPet", + "requestBody" : { + "$ref" : "#/components/requestBodies/Pet" + }, + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "description" : "successful operation" + }, + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Add a new pet to the store", + "tags" : [ "pet" ] + }, + "put" : { + "description" : "", + "externalDocs" : { + "description" : "API documentation for the updatePet operation", + "url" : "http://petstore.swagger.io/v2/doc/updatePet" + }, + "operationId" : "updatePet", + "requestBody" : { + "$ref" : "#/components/requestBodies/Pet" + }, + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Update an existing pet", + "tags" : [ "pet" ] + } + }, + "/pet/findByStatus" : { + "get" : { + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "parameters" : [ { + "deprecated" : true, + "description" : "Status values that need to be considered for filter", + "explode" : false, + "in" : "query", + "name" : "status", + "required" : true, + "schema" : { + "items" : { + "default" : "available", + "enum" : [ "available", "pending", "sold" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/Pet" + }, + "type" : "array" + } + }, + "application/json" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/Pet" + }, + "type" : "array" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "read:pets" ] + } ], + "summary" : "Finds Pets by status", + "tags" : [ "pet" ] + } + }, + "/pet/findByTags" : { + "get" : { + "deprecated" : true, + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "parameters" : [ { + "description" : "Tags to filter by", + "explode" : false, + "in" : "query", + "name" : "tags", + "required" : true, + "schema" : { + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/Pet" + }, + "type" : "array" + } + }, + "application/json" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/Pet" + }, + "type" : "array" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "read:pets" ] + } ], + "summary" : "Finds Pets by tags", + "tags" : [ "pet" ] + } + }, + "/pet/{petId}" : { + "delete" : { + "description" : "", + "operationId" : "deletePet", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "api_key", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "description" : "Pet id to delete", + "explode" : false, + "in" : "path", + "name" : "petId", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + }, + "style" : "simple" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Deletes a pet", + "tags" : [ "pet" ] + }, + "get" : { + "description" : "Returns a single pet", + "operationId" : "getPetById", + "parameters" : [ { + "description" : "ID of pet to return", + "explode" : false, + "in" : "path", + "name" : "petId", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "summary" : "Find pet by ID", + "tags" : [ "pet" ] + }, + "post" : { + "description" : "", + "operationId" : "updatePetWithForm", + "parameters" : [ { + "description" : "ID of pet that needs to be updated", + "explode" : false, + "in" : "path", + "name" : "petId", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + }, + "style" : "simple" + } ], + "requestBody" : { + "content" : { + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/updatePetWithForm_request" + } + } + } + }, + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Updates a pet in the store with form data", + "tags" : [ "pet" ] + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "description" : "", + "operationId" : "uploadFile", + "parameters" : [ { + "description" : "ID of pet to update", + "explode" : false, + "in" : "path", + "name" : "petId", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + }, + "style" : "simple" + } ], + "requestBody" : { + "content" : { + "multipart/form-data" : { + "schema" : { + "$ref" : "#/components/schemas/uploadFile_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponse" + } + } + }, + "description" : "successful operation" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "uploads an image", + "tags" : [ "pet" ] + } + }, + "/store/inventory" : { + "get" : { + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "additionalProperties" : { + "format" : "int32", + "type" : "integer" + }, + "type" : "object" + } + } + }, + "description" : "successful operation" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "summary" : "Returns pet inventories by status", + "tags" : [ "store" ] + } + }, + "/store/order" : { + "post" : { + "description" : "", + "operationId" : "placeOrder", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + } + }, + "description" : "order placed for purchasing the pet", + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "description" : "Invalid Order" + } + }, + "summary" : "Place an order for a pet", + "tags" : [ "store" ] + } + }, + "/store/order/{orderId}" : { + "delete" : { + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "parameters" : [ { + "description" : "ID of the order that needs to be deleted", + "explode" : false, + "in" : "path", + "name" : "orderId", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "summary" : "Delete purchase order by ID", + "tags" : [ "store" ] + }, + "get" : { + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", + "operationId" : "getOrderById", + "parameters" : [ { + "description" : "ID of pet that needs to be fetched", + "explode" : false, + "in" : "path", + "name" : "orderId", + "required" : true, + "schema" : { + "format" : "int64", + "maximum" : 5, + "minimum" : 1, + "type" : "integer" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "summary" : "Find purchase order by ID", + "tags" : [ "store" ] + } + }, + "/user" : { + "post" : { + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + }, + "description" : "Created user object", + "required" : true + }, + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "summary" : "Create user", + "tags" : [ "user" ] + } + }, + "/user/createWithArray" : { + "post" : { + "description" : "", + "operationId" : "createUsersWithArrayInput", + "requestBody" : { + "$ref" : "#/components/requestBodies/UserArray" + }, + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "summary" : "Creates list of users with given input array", + "tags" : [ "user" ] + } + }, + "/user/createWithList" : { + "post" : { + "description" : "", + "operationId" : "createUsersWithListInput", + "requestBody" : { + "$ref" : "#/components/requestBodies/UserArray" + }, + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "summary" : "Creates list of users with given input array", + "tags" : [ "user" ] + } + }, + "/user/login" : { + "get" : { + "description" : "", + "operationId" : "loginUser", + "parameters" : [ { + "description" : "The user name for login", + "explode" : true, + "in" : "query", + "name" : "username", + "required" : true, + "schema" : { + "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", + "type" : "string" + }, + "style" : "form" + }, { + "description" : "The password for login in clear text", + "explode" : true, + "in" : "query", + "name" : "password", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "type" : "string" + } + }, + "application/json" : { + "schema" : { + "type" : "string" + } + } + }, + "description" : "successful operation", + "headers" : { + "Set-Cookie" : { + "description" : "Cookie authentication key for use with the `api_key` apiKey authentication.", + "explode" : false, + "schema" : { + "example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly", + "type" : "string" + }, + "style" : "simple" + }, + "X-Rate-Limit" : { + "description" : "calls per hour allowed by the user", + "explode" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + }, + "X-Expires-After" : { + "description" : "date in UTC when token expires", + "explode" : false, + "schema" : { + "format" : "date-time", + "type" : "string" + }, + "style" : "simple" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "summary" : "Logs user into the system", + "tags" : [ "user" ] + } + }, + "/user/logout" : { + "get" : { + "description" : "", + "operationId" : "logoutUser", + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "summary" : "Logs out current logged in user session", + "tags" : [ "user" ] + } + }, + "/user/{username}" : { + "delete" : { + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "parameters" : [ { + "description" : "The name that needs to be deleted", + "explode" : false, + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "summary" : "Delete user", + "tags" : [ "user" ] + }, + "get" : { + "description" : "", + "operationId" : "getUserByName", + "parameters" : [ { + "description" : "The name that needs to be fetched. Use user1 for testing.", + "explode" : false, + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "summary" : "Get user by user name", + "tags" : [ "user" ] + }, + "put" : { + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "parameters" : [ { + "description" : "name that need to be deleted", + "explode" : false, + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + }, + "description" : "Updated user object", + "required" : true + }, + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "summary" : "Updated user", + "tags" : [ "user" ] + } + } + }, + "components" : { + "requestBodies" : { + "UserArray" : { + "content" : { + "application/json" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/User" + }, + "type" : "array" + } + } + }, + "description" : "List of user object", + "required" : true + }, + "Pet" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "description" : "Pet object that needs to be added to the store", + "required" : true + } + }, + "schemas" : { + "Order" : { + "description" : "An order for a pets from the pet store", + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "petId" : { + "format" : "int64", + "type" : "integer" + }, + "quantity" : { + "format" : "int32", + "type" : "integer" + }, + "shipDate" : { + "format" : "date-time", + "type" : "string" + }, + "status" : { + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ], + "type" : "string" + }, + "complete" : { + "default" : false, + "type" : "boolean" + } + }, + "title" : "Pet Order", + "type" : "object", + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "description" : "A category for a pet", + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "name" : { + "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", + "type" : "string" + } + }, + "title" : "Pet category", + "type" : "object", + "xml" : { + "name" : "Category" + } + }, + "User" : { + "description" : "A User who is purchasing from the pet store", + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string" + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "description" : "User Status", + "format" : "int32", + "type" : "integer" + } + }, + "title" : "a User", + "type" : "object", + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "description" : "A tag for a pet", + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "type" : "object", + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "description" : "A pet for sale in the pet store", + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "category" : { + "$ref" : "#/components/schemas/Category" + }, + "name" : { + "example" : "doggie", + "type" : "string" + }, + "photoUrls" : { + "items" : { + "type" : "string" + }, + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + } + }, + "tags" : { + "items" : { + "$ref" : "#/components/schemas/Tag" + }, + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + } + }, + "status" : { + "deprecated" : true, + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ], + "type" : "string" + } + }, + "required" : [ "name", "photoUrls" ], + "title" : "a Pet", + "type" : "object", + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "description" : "Describes the result of uploading an image resource", + "properties" : { + "code" : { + "format" : "int32", + "type" : "integer" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "type" : "object" + }, + "updatePetWithForm_request" : { + "properties" : { + "name" : { + "description" : "Updated name of the pet", + "type" : "string" + }, + "status" : { + "description" : "Updated status of the pet", + "type" : "string" + } + }, + "type" : "object" + }, + "uploadFile_request" : { + "properties" : { + "additionalMetadata" : { + "description" : "Additional data to pass to server", + "type" : "string" + }, + "file" : { + "description" : "file to upload", + "format" : "binary", + "type" : "string" + } + }, + "type" : "object" + } + }, + "securitySchemes" : { + "petstore_auth" : { + "flows" : { + "implicit" : { + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + } + }, + "type" : "oauth2" + }, + "api_key" : { + "in" : "header", + "name" : "api_key", + "type" : "apiKey" + } + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/AppRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/AppRoutes.scala new file mode 100644 index 000000000000..365015573714 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/AppRoutes.scala @@ -0,0 +1,52 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.9.2" +//> using lib "com.lihaoyi::scalatags:0.8.2" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// this file was generated from app.mustache +package cask.groupId.server + +import _root_.sample.cask.model.* +import _root_.sample.cask.api.* + +/** + * This trait encapsulates the business logic (services) and the + * http routes which handle the http requests sent to those services. + * + * There are default 'not implemented' implementations for the service. + * + * If you wanted fine-grained control over the routes and services, you could + * extend the cask.MainRoutes and mix in this trait by using this: + * + * \{\{\{ + * override def allRoutes = appRoutes + * \}\}\} + * + * More typically, however, you would extend the 'BaseApp' class + */ +trait AppRoutes { + def appPetService : PetService = PetService() + def routeForPet : PetRoutes = PetRoutes(appPetService) + def appStoreService : StoreService = StoreService() + def routeForStore : StoreRoutes = StoreRoutes(appStoreService) + def appUserService : UserService = UserService() + def routeForUser : UserRoutes = UserRoutes(appUserService) + + def appRoutes = Seq( + routeForPet , + routeForStore , + routeForUser + ) +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/BaseApp.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/BaseApp.scala new file mode 100644 index 000000000000..c854b216d20f --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/BaseApp.scala @@ -0,0 +1,59 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.9.2" +//> using lib "com.lihaoyi::scalatags:0.8.2" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// this file was generated from app.mustache +package cask.groupId.server + +import _root_.sample.cask.model.* +import _root_.sample.cask.api.* + +/** + * This class was created with the intention of being extended by some runnable object, + * passing in the custom business logic services + */ +class BaseApp( + override val appPetService : PetService = PetService(), + + override val appStoreService : StoreService = StoreService(), + + override val appUserService : UserService = UserService(), + override val port : Int = sys.env.get("PORT").map(_.toInt).getOrElse(8080)) extends cask.MainRoutes with AppRoutes { + + /** routes for the UI + * Subclasses can override to turn this off + */ + def openApiRoute: Option[cask.Routes] = Option(OpenApiRoutes(port)) + + override def allRoutes = appRoutes ++ openApiRoute + + + override def host: String = "0.0.0.0" + + def start() = locally { + initialize() + println(box(s""" 🚀 browse to localhost:$port 🚀 + | host : $host + | port : $port + | verbose : $verbose + | debugMode : $debugMode + |""".stripMargin)) + + // if java.awt.Desktop.isDesktopSupported then { + // java.awt.Desktop.getDesktop.browse(new java.net.URI(s"http://localhost:${port}")) + // } + } +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/ExampleApp.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/ExampleApp.scala new file mode 100644 index 000000000000..9c5e733b73e3 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/ExampleApp.scala @@ -0,0 +1,31 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.9.2" +//> using lib "com.lihaoyi::scalatags:0.8.2" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// this file was generated from app.mustache +package cask.groupId.server + +import _root_.sample.cask.model.* +import _root_.sample.cask.api.* + +/** + * This is an example of how you might extends BaseApp for a runnable application. + * + * See the README.md for how to create your own app + */ +object ExampleApp extends BaseApp() { + start() +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/OpenApiRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/OpenApiRoutes.scala new file mode 100644 index 000000000000..a991ce2aaf45 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/OpenApiRoutes.scala @@ -0,0 +1,128 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// generated from openapiRoute.mustache +package sample.cask.api + +import cask.model.Response + +import java.nio.file.{Files, Path, Paths} + +/** + * This code will try and download the swagger UI static files on startup + * + * That behaviour can be altered by: + * - setting the environment variable SWAGGER_ON to false + * - setting the environment variable SWAGGER_UI_URL to either the URL of a swagger UI zip or setting it to the empty string + * + */ +object OpenApiRoutes { + + def swaggerUIUrl: Option[String] = { + // flag to turn SWAGGER off + def useSwaggerUI = sys.env.get("SWAGGER_ON").map(_.toBoolean).getOrElse(true) + + val defaultUrl = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.11.9.zip" + Option(sys.env.getOrElse("SWAGGER_UI_URL", defaultUrl)) + .map(_.trim) + .filterNot(_.isEmpty) + .filter(_ => useSwaggerUI) + } + def apply(localPort: Int) = new OpenApiRoutes(localPort, swaggerUIUrl) +} + +class OpenApiRoutes(localPort: Int, swaggerUrl: Option[String]) extends cask.Routes { + + def openApiDir = "ui" + + @cask.get("/") + def index() = cask.Redirect("/ui/index.html") + + @cask.staticFiles("/ui") + def staticUI() = openApiDir + + @cask.staticResources("/openapi.json") + def staticOpenApi() = "openapi.json" + + /** This code will try and download the swagger UI artefacts to a local directory to serve up + */ + object extract { + + def openApiDirPath: Path = Paths.get(openApiDir) + def hasSwagger = Files.exists(openApiDirPath) && Files.isDirectory(openApiDirPath) + + import java.io.{BufferedInputStream, FileOutputStream, InputStream} + import java.net.URL + import java.util.zip.{ZipEntry, ZipInputStream} + import scala.util.Using + + def apply(url: String) = { + if !hasSwagger then downloadAndExtractZip(url, openApiDir) + } + + def downloadAndExtractZip(url: String, outputDir: String): Unit = { + val urlConn = new URL(url).openConnection() + urlConn.setRequestProperty("User-Agent", "Mozilla/5.0") + + Using(urlConn.getInputStream) { inputStream => + val zipIn = new ZipInputStream(new BufferedInputStream(inputStream)) + LazyList.continually(zipIn.getNextEntry).takeWhile(_ != null).foreach { entry => + + def isDist = entry.getName.contains("/dist/") + def isNotMap = !entry.getName.endsWith(".map") + + if (!entry.isDirectory && isDist && isNotMap) { + val fileName = entry.getName.split("/").last + extractFile(entry.getName, zipIn, s"$outputDir/$fileName") + } + zipIn.closeEntry() + } + } + } + + def extractFile(name: String, zipIn: ZipInputStream, filePath: String): Unit = { + val fullPath = Paths.get(filePath).toAbsolutePath + if !Files.exists(fullPath.getParent) then { + Files.createDirectories(fullPath.getParent) + } + + // config hack - we replace the default url from this swagger conf to use our localhost + // + if name.endsWith("swagger-initializer.js") then { + val textLines = scala.io.Source.fromInputStream(zipIn).getLines().map { + case line if line.contains("url:") => + s""" url: "http://localhost:$localPort/openapi.json",""" + case line => line + } + + // keeping this compatible for java 8, where this is from >= java 11: + // Files.writeString(fullPath, textLines.mkString("\n")) + scala.util.Using(new java.io.PrintWriter(fullPath.toFile))(_.write(textLines.mkString("\n"))) + } else { + Using(new FileOutputStream(filePath)) { outputStream => + val buffer = new Array[Byte](1024) + LazyList + .continually(zipIn.read(buffer)) + .takeWhile(_ != -1) + .foreach(outputStream.write(buffer, 0, _)) + } + } + } + } + + // extract the swagger UI resources to our local directory + swaggerUrl.foreach(url => extract(url)) + + initialize() +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetRoutes.scala new file mode 100644 index 000000000000..75d4799d6e33 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetRoutes.scala @@ -0,0 +1,218 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.8.3" +//> using lib "com.lihaoyi::scalatags:0.12.0" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// this is generated from apiRoutes.mustache +package sample.cask.api + +import sample.cask.model.* + +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +import sample.cask.model.ApiResponse +import java.io.File +import sample.cask.model.Pet + +class PetRoutes(service : PetService) extends cask.Routes { + + // route group for routeWorkAroundForPOSTPet + @cask.post("/pet", true) + def routeWorkAroundForPOSTPet(request: cask.Request) = { + request.remainingPathSegments match { + case Seq() => addPet(request) + case Seq(petId) => updatePetWithForm(petId.toLong,request) + case Seq(petId,"uploadImage") => uploadFile(petId.toLong,request) + case _ => cask.Response("Not Found", statusCode = 404) + } + } + // route group for routeWorkAroundForGETPet + @cask.get("/pet", true) + def routeWorkAroundForGETPet(request: cask.Request,status : Seq[String] = Nil,tags : Seq[String] = Nil) = { + request.remainingPathSegments match { + case Seq("findByStatus") => findPetsByStatus(request,status) + case Seq("findByTags") => findPetsByTags(request,tags) + case Seq(petId) => getPetById(petId.toLong,request) + case _ => cask.Response("Not Found", statusCode = 404) + } + } + + /** Add a new pet to the store + * + */ + // conflicts with [/pet/{petId}, /pet/{petId}/uploadImage, /pet] after/pet, ignoring @cask.post("/pet") + def addPet(request: cask.Request) = { + // auth method petstore_auth : oauth2, keyParamName: + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + petData <- Parsed.eval(PetData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as Pet from >${request.bodyAsString}< : ${e}") /* not array or map */ + pet <- Parsed.fromTry(petData.validated(failFast)) + result <- Parsed.eval(service.addPet(pet)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : Pet) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Deletes a pet + * + */ + @cask.delete("/pet/:petId") + def deletePet(petId : Long, request: cask.Request) = { + // auth method petstore_auth : oauth2, keyParamName: + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + petId <- Parsed(petId) + apiKey <- request.headerSingleValueOptional("apiKey") + result <- Parsed.eval(service.deletePet(petId, apiKey)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Finds Pets by status + * + */ + // conflicts with [/pet/{petId}, /pet/findByStatus, /pet/findByTags] after/pet, ignoring @cask.get("/pet/findByStatus") + def findPetsByStatus(request: cask.Request, status : Seq[String]) = { + // auth method petstore_auth : oauth2, keyParamName: + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + result <- Parsed.eval(service.findPetsByStatus(status)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : List[Pet]) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Finds Pets by tags + * + */ + // conflicts with [/pet/{petId}, /pet/findByStatus, /pet/findByTags] after/pet, ignoring @cask.get("/pet/findByTags") + def findPetsByTags(request: cask.Request, tags : Seq[String]) = { + // auth method petstore_auth : oauth2, keyParamName: + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + result <- Parsed.eval(service.findPetsByTags(tags)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : List[Pet]) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Find pet by ID + * + */ + // conflicts with [/pet/{petId}, /pet/findByStatus, /pet/findByTags] after/pet, ignoring @cask.get("/pet/:petId") + def getPetById(petId : Long, request: cask.Request) = { + // auth method api_key : apiKey, keyParamName: api_key + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + petId <- Parsed(petId) + result <- Parsed.eval(service.getPetById(petId)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : Pet) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Update an existing pet + * + */ + @cask.put("/pet") + def updatePet(request: cask.Request) = { + // auth method petstore_auth : oauth2, keyParamName: + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + petData <- Parsed.eval(PetData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as Pet from >${request.bodyAsString}< : ${e}") /* not array or map */ + pet <- Parsed.fromTry(petData.validated(failFast)) + result <- Parsed.eval(service.updatePet(pet)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : Pet) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Updates a pet in the store with form data + * + */ + // conflicts with [/pet/{petId}, /pet/{petId}/uploadImage, /pet] after/pet, ignoring @cask.post("/pet/:petId") + def updatePetWithForm(petId : Long, request: cask.Request) = { + // auth method petstore_auth : oauth2, keyParamName: + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + petId <- Parsed(petId) + name <- request.formSingleValueOptional("name") + status <- request.formSingleValueOptional("status") + result <- Parsed.eval(service.updatePetWithForm(petId, name, status)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** uploads an image + * + */ + // conflicts with [/pet/{petId}, /pet/{petId}/uploadImage, /pet] after/pet, ignoring @cask.post("/pet/:petId/uploadImage") + def uploadFile(petId : Long, request: cask.Request) = { + // auth method petstore_auth : oauth2, keyParamName: + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + petId <- Parsed(petId) + additionalMetadata <- request.formSingleValueOptional("additionalMetadata") + file <- request.formValueAsFileOptional("file") + result <- Parsed.eval(service.uploadFile(petId, additionalMetadata, file)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : ApiResponse) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + + initialize() +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetService.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetService.scala new file mode 100644 index 000000000000..7bed5032e2c7 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetService.scala @@ -0,0 +1,84 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.8.3" +//> using lib "com.lihaoyi::scalatags:0.12.0" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// generated from apiService.mustache +package sample.cask.api + +import _root_.sample.cask.model.ApiResponse +import _root_.java.io.File +import _root_.sample.cask.model.Pet + +import _root_.sample.cask.model.* + +object PetService { + def apply() : PetService = new PetService { + override def addPet(pet : Pet) : Pet = ??? + override def deletePet(petId : Long, apiKey : Option[String]) : Unit = ??? + override def findPetsByStatus(status : Seq[String]) : List[Pet] = ??? + override def findPetsByTags(tags : Seq[String]) : List[Pet] = ??? + override def getPetById(petId : Long) : Pet = ??? + override def updatePet(pet : Pet) : Pet = ??? + override def updatePetWithForm(petId : Long, name : Option[String], status : Option[String]) : Unit = ??? + override def uploadFile(petId : Long, additionalMetadata : Option[String], file : Option[File]) : ApiResponse = ??? + } +} + +/** + * The Pet business-logic + */ +trait PetService { + /** Add a new pet to the store + * + * @return Pet + */ + def addPet(pet : Pet) : Pet + /** Deletes a pet + * + * @return + */ + def deletePet(petId : Long, apiKey : Option[String]) : Unit + /** Finds Pets by status + * + * @return List[Pet] + */ + def findPetsByStatus(status : Seq[String]) : List[Pet] + /** Finds Pets by tags + * + * @return List[Pet] + */ + def findPetsByTags(tags : Seq[String]) : List[Pet] + /** Find pet by ID + * + * @return Pet + */ + def getPetById(petId : Long) : Pet + /** Update an existing pet + * + * @return Pet + */ + def updatePet(pet : Pet) : Pet + /** Updates a pet in the store with form data + * + * @return + */ + def updatePetWithForm(petId : Long, name : Option[String], status : Option[String]) : Unit + /** uploads an image + * + * @return ApiResponse + */ + def uploadFile(petId : Long, additionalMetadata : Option[String], file : Option[File]) : ApiResponse +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreRoutes.scala new file mode 100644 index 000000000000..ede98a18d8b3 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreRoutes.scala @@ -0,0 +1,109 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.8.3" +//> using lib "com.lihaoyi::scalatags:0.12.0" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// this is generated from apiRoutes.mustache +package sample.cask.api + +import sample.cask.model.* + +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +import sample.cask.model.Order + +class StoreRoutes(service : StoreService) extends cask.Routes { + + + /** Delete purchase order by ID + * + */ + @cask.delete("/store/order/:orderId") + def deleteOrder(orderId : String, request: cask.Request) = { + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + orderId <- Parsed(orderId) + result <- Parsed.eval(service.deleteOrder(orderId)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Returns pet inventories by status + * + */ + @cask.get("/store/inventory") + def getInventory(request: cask.Request) = { + // auth method api_key : apiKey, keyParamName: api_key + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + result <- Parsed.eval(service.getInventory()) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : Map[String, Int]) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Find purchase order by ID + * + */ + @cask.get("/store/order/:orderId") + def getOrderById(orderId : Long, request: cask.Request) = { + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + orderId <- Parsed(orderId) + result <- Parsed.eval(service.getOrderById(orderId)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : Order) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Place an order for a pet + * + */ + @cask.post("/store/order") + def placeOrder(request: cask.Request) = { + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + orderData <- Parsed.eval(OrderData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as Order from >${request.bodyAsString}< : ${e}") /* not array or map */ + order <- Parsed.fromTry(orderData.validated(failFast)) + result <- Parsed.eval(service.placeOrder(order)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : Order) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + + initialize() +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreService.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreService.scala new file mode 100644 index 000000000000..231f03fc3fe7 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreService.scala @@ -0,0 +1,58 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.8.3" +//> using lib "com.lihaoyi::scalatags:0.12.0" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// generated from apiService.mustache +package sample.cask.api + +import _root_.sample.cask.model.Order + +import _root_.sample.cask.model.* + +object StoreService { + def apply() : StoreService = new StoreService { + override def deleteOrder(orderId : String) : Unit = ??? + override def getInventory() : Map[String, Int] = ??? + override def getOrderById(orderId : Long) : Order = ??? + override def placeOrder(order : Order) : Order = ??? + } +} + +/** + * The Store business-logic + */ +trait StoreService { + /** Delete purchase order by ID + * + * @return + */ + def deleteOrder(orderId : String) : Unit + /** Returns pet inventories by status + * + * @return Map[String, Int] + */ + def getInventory() : Map[String, Int] + /** Find purchase order by ID + * + * @return Order + */ + def getOrderById(orderId : Long) : Order + /** Place an order for a pet + * + * @return Order + */ + def placeOrder(order : Order) : Order +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserRoutes.scala new file mode 100644 index 000000000000..3bd483d6b802 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserRoutes.scala @@ -0,0 +1,197 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.8.3" +//> using lib "com.lihaoyi::scalatags:0.12.0" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// this is generated from apiRoutes.mustache +package sample.cask.api + +import sample.cask.model.* + +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +import java.time.OffsetDateTime +import sample.cask.model.User + +class UserRoutes(service : UserService) extends cask.Routes { + + // route group for routeWorkAroundForGETUser + @cask.get("/user", true) + def routeWorkAroundForGETUser(request: cask.Request,username : Option[String] = None,password : Option[String] = None) = { + request.remainingPathSegments match { + case Seq("login") => loginUser(request,username.getOrElse(""), password.getOrElse("")) + case Seq("logout") => logoutUser(request) + case Seq(username) => getUserByName(username,request) + case _ => cask.Response("Not Found", statusCode = 404) + } + } + + /** Create user + * + */ + @cask.post("/user") + def createUser(request: cask.Request) = { + // auth method api_key : apiKey, keyParamName: api_key + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + userData <- Parsed.eval(UserData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as User from >${request.bodyAsString}< : ${e}") /* not array or map */ + user <- Parsed.fromTry(userData.validated(failFast)) + result <- Parsed.eval(service.createUser(user)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Creates list of users with given input array + * + */ + @cask.post("/user/createWithArray") + def createUsersWithArrayInput(request: cask.Request) = { + // auth method api_key : apiKey, keyParamName: api_key + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + user <- Parsed.fromTry(UserData.manyFromJsonStringValidated(request.bodyAsString)).mapError(e => s"Error parsing json as an array of User from >${request.bodyAsString}< : ${e}") /* array */ + result <- Parsed.eval(service.createUsersWithArrayInput(user)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Creates list of users with given input array + * + */ + @cask.post("/user/createWithList") + def createUsersWithListInput(request: cask.Request) = { + // auth method api_key : apiKey, keyParamName: api_key + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + user <- Parsed.fromTry(UserData.manyFromJsonStringValidated(request.bodyAsString)).mapError(e => s"Error parsing json as an array of User from >${request.bodyAsString}< : ${e}") /* array */ + result <- Parsed.eval(service.createUsersWithListInput(user)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Delete user + * + */ + @cask.delete("/user/:username") + def deleteUser(username : String, request: cask.Request) = { + // auth method api_key : apiKey, keyParamName: api_key + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + username <- Parsed(username) + result <- Parsed.eval(service.deleteUser(username)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Get user by user name + * + */ + // conflicts with [/user/{username}, /user/login, /user/logout] after/user, ignoring @cask.get("/user/:username") + def getUserByName(username : String, request: cask.Request) = { + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + username <- Parsed(username) + result <- Parsed.eval(service.getUserByName(username)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : User) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Logs user into the system + * + */ + // conflicts with [/user/{username}, /user/login, /user/logout] after/user, ignoring @cask.get("/user/login") + def loginUser(request: cask.Request, username : String, password : String) = { + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + result <- Parsed.eval(service.loginUser(username, password)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(value : String) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Logs out current logged in user session + * + */ + // conflicts with [/user/{username}, /user/login, /user/logout] after/user, ignoring @cask.get("/user/logout") + def logoutUser(request: cask.Request) = { + // auth method api_key : apiKey, keyParamName: api_key + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + result <- Parsed.eval(service.logoutUser()) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + /** Updated user + * + */ + @cask.put("/user/:username") + def updateUser(username : String, request: cask.Request) = { + // auth method api_key : apiKey, keyParamName: api_key + + def failFast = request.queryParams.keySet.contains("failFast") + + val result = for { + username <- Parsed(username) + userData <- Parsed.eval(UserData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as User from >${request.bodyAsString}< : ${e}") /* not array or map */ + user <- Parsed.fromTry(userData.validated(failFast)) + result <- Parsed.eval(service.updateUser(username, user)) + } yield result + + result match { + case Left(error) => cask.Response(error, 500) + case Right(other) => cask.Response(s"$other", 200) + } + } + + initialize() +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserService.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserService.scala new file mode 100644 index 000000000000..4872f31e3c7d --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserService.scala @@ -0,0 +1,83 @@ +//> using scala "3.3.1" +//> using lib "com.lihaoyi::cask:0.8.3" +//> using lib "com.lihaoyi::scalatags:0.12.0" +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + + +// generated from apiService.mustache +package sample.cask.api + +import _root_.java.time.OffsetDateTime +import _root_.sample.cask.model.User + +import _root_.sample.cask.model.* + +object UserService { + def apply() : UserService = new UserService { + override def createUser(user : User) : Unit = ??? + override def createUsersWithArrayInput(user : Seq[User]) : Unit = ??? + override def createUsersWithListInput(user : Seq[User]) : Unit = ??? + override def deleteUser(username : String) : Unit = ??? + override def getUserByName(username : String) : User = ??? + override def loginUser(username : String, password : String) : String = ??? + override def logoutUser() : Unit = ??? + override def updateUser(username : String, user : User) : Unit = ??? + } +} + +/** + * The User business-logic + */ +trait UserService { + /** Create user + * + * @return + */ + def createUser(user : User) : Unit + /** Creates list of users with given input array + * + * @return + */ + def createUsersWithArrayInput(user : Seq[User]) : Unit + /** Creates list of users with given input array + * + * @return + */ + def createUsersWithListInput(user : Seq[User]) : Unit + /** Delete user + * + * @return + */ + def deleteUser(username : String) : Unit + /** Get user by user name + * + * @return User + */ + def getUserByName(username : String) : User + /** Logs user into the system + * + * @return String + */ + def loginUser(username : String, password : String) : String + /** Logs out current logged in user session + * + * @return + */ + def logoutUser() : Unit + /** Updated user + * + * @return + */ + def updateUser(username : String, user : User) : Unit +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/package.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/package.scala new file mode 100644 index 000000000000..ab25a84875ab --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/package.scala @@ -0,0 +1,167 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +package sample.cask.api + + +import cask.FormEntry +import io.undertow.server.handlers.form.{FormData, FormParserFactory} + +import java.io.File +import scala.jdk.CollectionConverters.* +import java.time.LocalDate +import java.util.UUID +import scala.reflect.ClassTag +import scala.util.* + +// needed for BigDecimal params +given cask.endpoints.QueryParamReader.SimpleParam[BigDecimal](BigDecimal.apply) + +// a parsed value from an HTTP request +opaque type Parsed[A] = Either[String, A] + +object Parsed { + def apply[A](value: A): Parsed[A] = Right(value) + + def eval[A](value: => A): Parsed[A] = Try(value) match { + case Failure(exp) => Left(s"Error: ${exp.getMessage}") + case Success(ok) => Right(ok) + } + + def fromTry[A](value : Try[A]) = value match { + case Failure(err) => Left(err.getMessage) + case Success(ok) => Right(ok) + } + + def fail[A](msg: String): Parsed[A] = Left(msg) + + def optionalValue(map: Map[String, collection.Seq[String]], key: String): Parsed[Option[String]] = { + map.get(key) match { + case Some(Seq(only: String)) => Parsed(Option(only)) + case Some(Seq()) => Parsed(None) + case Some(many) => Parsed.fail(s"${many.size} values set for '$key'") + case None => Parsed(None) + } + } + + def singleValue(map: Map[String, collection.Seq[String]], key : String): Parsed[String] = { + map.get(key) match { + case Some(Seq(only : String)) => Parsed(only) + case Some(Seq()) => Parsed("") + case Some(many) => Parsed.fail(s"${many.size} values set for '$key'") + case None => Parsed.fail(s"required '$key' was not set") + } + } + + def manyValues(map: Map[String, collection.Seq[String]], key : String, required: Boolean): Parsed[List[String]] = { + map.get(key) match { + case Some(many) => Parsed(many.toList) + case None if required => Parsed.fail(s"required '$key' was not set") + case None => Parsed(Nil) + } + } +} + +extension[A] (parsed: Parsed[A]) { + def toEither: Either[String, A] = parsed + + def asLong(using ev : A =:= String): Parsed[Long] = as[Long](_.toLongOption) + def asBoolean(using ev : A =:= String): Parsed[Boolean] = as[Boolean](_.toBooleanOption) + def asInt(using ev : A =:= String): Parsed[Int] = as[Int](_.toIntOption) + def asByte(using ev : A =:= String): Parsed[Byte] = as[Byte](_.toByteOption) + def asUuid(using ev : A =:= String): Parsed[UUID] = as[UUID](x => Try(UUID.fromString(x)).toOption) + def asFloat(using ev : A =:= String): Parsed[Float] = as[Float](_.toFloatOption) + def asDouble(using ev : A =:= String): Parsed[Double] = as[Double](_.toDoubleOption) + def asDate(using ev: A =:= String): Parsed[LocalDate] = as[LocalDate](x => Try(LocalDate.parse(x)).toOption) + + private def as[B : ClassTag](f : String => Option[B])(using ev : A =:= String): Parsed[B] = parsed.flatMap { str => + f(ev(str)) match { + case None => Parsed.fail(s"'$str' cannot be parsed as a ${implicitly[ClassTag[B]].runtimeClass}") + case Some(x) => Parsed(x) + } + } + + + def mapError(f : String => String) : Parsed[A] = parsed match { + case Left(msg) => Left(f(msg)) + case right => right + } + + def map[B](f: A => B): Parsed[B] = parsed match { + case Right(value) => Right(f(value)) + case Left(err) => Left(err) + } + def flatMap[B](f : A => Parsed[B]): Parsed[B] = parsed match { + case Right(value) => f(value) + case Left(err) => Left(err) + } +} + + +extension (request: cask.Request) { + + def formSingleValueRequired(paramName: String): Parsed[String] = { + val data = formDataForKey(paramName).map(_.getValue).toSeq + Parsed.singleValue(Map(paramName -> data), paramName) + } + def formSingleValueOptional(paramName: String): Parsed[Option[String]] = { + val data = formDataForKey(paramName).map(_.getValue).toSeq + Parsed.optionalValue(Map(paramName -> data), paramName) + } + + def formValueAsFileOptional(paramName: String): Parsed[Option[File]] = { + val data = formDataForKey(paramName) + data.map(_.getFileItem.getFile.toFile).toSeq match { + case Seq() => Parsed(None) + case Seq(file) => Parsed(Option(file)) + case many => Parsed.fail(s"${many.size} file values set for '$paramName'") + } + } + + def formValueAsFileRequired(paramName: String): Parsed[File] = { + val data = formDataForKey(paramName) + data.map(_.getFileItem.getFile.toFile).toSeq match { + case Seq() => Parsed.fail(s"No file form data was submitted for '$paramName'. The submitted form keys were: ${formDataKeys.mkString(",")}") + case Seq(file) => Parsed(file) + case many => Parsed.fail(s"${many.size} file values set for '$paramName'") + } + } + + def formManyValues(paramName: String, required: Boolean): Parsed[List[String]] = { + val data = formDataForKey(paramName).map(_.getValue).toSeq + Parsed.manyValues(Map(paramName -> data), paramName, required) + } + + def formData: FormData = FormParserFactory.builder().build().createParser(request.exchange).parseBlocking() + + def formDataKeys: Iterator[String] = formData.iterator().asScala + + def formDataForKey(paramName: String): Iterable[FormData.FormValue] = formData.get(paramName).asScala + + def headerSingleValueOptional(paramName: String): Parsed[Option[String]] = Parsed.optionalValue(request.headers, paramName) + def headerSingleValueRequired(paramName: String): Parsed[String] = Parsed.singleValue(request.headers, paramName) + + def headerManyValues(paramName: String, required: Boolean): Parsed[List[String]] = Parsed.manyValues(request.headers, paramName, required) + + def bodyAsString = new String(request.readAllBytes(), "UTF-8") + + def pathValue(index: Int, paramName: String, required : Boolean): Parsed[String] = { + request + .remainingPathSegments + .lift(index) match { + case Some(value) => Right(value) + case None if required => Left(s"'$paramName'' is a required path parameter at path position $index") + case None => Right("") + } + } +} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponse.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponse.scala new file mode 100644 index 000000000000..ff5d8abaa145 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponse.scala @@ -0,0 +1,55 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using model.mustache +package sample.cask.model +import scala.util.control.NonFatal + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +case class ApiResponse( + code: Option[Int] = None , + + `type`: Option[String] = None , + + message: Option[String] = None + + ) { + + def asJson: String = asData.asJson + + def asData : ApiResponseData = { + ApiResponseData( + code = code.getOrElse(0), + `type` = `type`.getOrElse(""), + message = message.getOrElse("") + ) + } + +} + +object ApiResponse{ + + given RW[ApiResponse] = ApiResponseData.readWriter.bimap[ApiResponse](_.asData, _.asModel) + + enum Fields(fieldName : String) extends Field(fieldName) { + case code extends Fields("code") + case `type` extends Fields("`type`") + case message extends Fields("message") + } + + +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponseData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponseData.scala new file mode 100644 index 000000000000..b93b7eb44ef8 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponseData.scala @@ -0,0 +1,171 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using modelData.mustache +package sample.cask.model +import scala.util.control.NonFatal +import scala.util.* + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +/** ApiResponseData a data transfer object, primarily for simple json serialisation. + * It has no validation - there may be nulls, values out of range, etc + */ +case class ApiResponseData( + code: Int = 0 , + + `type`: String = "" , + + message: String = "" + + ) { + + def asJson: String = write(this) + + def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { + val errors = scala.collection.mutable.ListBuffer[ValidationError]() + // ================== + // code + + + + + + + + + + + + + + + + + // ================== + // `type` + + + + + + + + + + + + + + + + + // ================== + // message + + + + + + + + + + + + + + + + + errors.toSeq + } + + def validated(failFast : Boolean = false) : scala.util.Try[ApiResponse] = { + validationErrors(Vector(), failFast) match { + case Seq() => Success(asModel) + case first +: theRest => Failure(ValidationErrors(first, theRest)) + } + } + + /** use 'validated' to check validation */ + def asModel : ApiResponse = { + ApiResponse( + code = Option( + code + ) + , + `type` = Option( + `type` + ) + , + message = Option( + message + ) + + ) + } +} + +object ApiResponseData { + + given readWriter : RW[ApiResponseData] = macroRW + + def fromJsonString(jason : String) : ApiResponseData = try { + read[ApiResponseData](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") + } + + def manyFromJsonString(jason : String) : Seq[ApiResponseData] = try { + read[List[ApiResponseData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") + } + + def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[ApiResponse]] = { + Try(manyFromJsonString(jason)).flatMap { list => + list.zipWithIndex.foldLeft(Try(Vector[ApiResponse]())) { + case (Success(list), (next, i)) => + next.validated(failFast) match { + case Success(ok) => Success(list :+ ok) + case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } + + def mapFromJsonString(jason : String) : Map[String, ApiResponseData] = try { + read[Map[String, ApiResponseData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") + } + + + def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, ApiResponse]] = { + Try(mapFromJsonString(jason)).flatMap { map => + map.foldLeft(Try(Map[String, ApiResponse]())) { + case (Success(map), (key, next)) => + next.validated(failFast) match { + case Success(ok) => Success(map.updated(key, ok)) + case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Category.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Category.scala new file mode 100644 index 000000000000..d0bf01a2861f --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Category.scala @@ -0,0 +1,51 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using model.mustache +package sample.cask.model +import scala.util.control.NonFatal + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +case class Category( + id: Option[Long] = None , + + name: Option[String] = None + + ) { + + def asJson: String = asData.asJson + + def asData : CategoryData = { + CategoryData( + id = id.getOrElse(0), + name = name.getOrElse("") + ) + } + +} + +object Category{ + + given RW[Category] = CategoryData.readWriter.bimap[Category](_.asData, _.asModel) + + enum Fields(fieldName : String) extends Field(fieldName) { + case id extends Fields("id") + case name extends Fields("name") + } + + +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/CategoryData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/CategoryData.scala new file mode 100644 index 000000000000..77a834683a8a --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/CategoryData.scala @@ -0,0 +1,153 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using modelData.mustache +package sample.cask.model +import scala.util.control.NonFatal +import scala.util.* + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +/** CategoryData a data transfer object, primarily for simple json serialisation. + * It has no validation - there may be nulls, values out of range, etc + */ +case class CategoryData( + id: Long = 0 , + + name: String = "" + + ) { + + def asJson: String = write(this) + + def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { + val errors = scala.collection.mutable.ListBuffer[ValidationError]() + // ================== + // id + + + + + + + + + + + + + + + + + // ================== + // name + // validate against pattern '^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$' + if (errors.isEmpty || !failFast) { + val regex = """^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$""" + if name == null || !regex.r.matches(name) then + errors += ValidationError(path :+ Category.Fields.name, s"value '$name' doesn't match pattern $regex") + } + + + + + + + + + + + + + + + + + errors.toSeq + } + + def validated(failFast : Boolean = false) : scala.util.Try[Category] = { + validationErrors(Vector(), failFast) match { + case Seq() => Success(asModel) + case first +: theRest => Failure(ValidationErrors(first, theRest)) + } + } + + /** use 'validated' to check validation */ + def asModel : Category = { + Category( + id = Option( + id + ) + , + name = Option( + name + ) + + ) + } +} + +object CategoryData { + + given readWriter : RW[CategoryData] = macroRW + + def fromJsonString(jason : String) : CategoryData = try { + read[CategoryData](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") + } + + def manyFromJsonString(jason : String) : Seq[CategoryData] = try { + read[List[CategoryData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") + } + + def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[Category]] = { + Try(manyFromJsonString(jason)).flatMap { list => + list.zipWithIndex.foldLeft(Try(Vector[Category]())) { + case (Success(list), (next, i)) => + next.validated(failFast) match { + case Success(ok) => Success(list :+ ok) + case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } + + def mapFromJsonString(jason : String) : Map[String, CategoryData] = try { + read[Map[String, CategoryData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") + } + + + def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, Category]] = { + Try(mapFromJsonString(jason)).flatMap { map => + map.foldLeft(Try(Map[String, Category]())) { + case (Success(map), (key, next)) => + next.validated(failFast) match { + case Success(ok) => Success(map.updated(key, ok)) + case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Order.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Order.scala new file mode 100644 index 000000000000..85bda97b8152 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Order.scala @@ -0,0 +1,76 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using model.mustache +package sample.cask.model +import java.time.OffsetDateTime +import scala.util.control.NonFatal + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +case class Order( + id: Option[Long] = None , + + petId: Option[Long] = None , + + quantity: Option[Int] = None , + + shipDate: Option[OffsetDateTime] = None , + + /* Order Status */ + status: Option[Order.StatusEnum] = None , + + complete: Option[Boolean] = None + + ) { + + def asJson: String = asData.asJson + + def asData : OrderData = { + OrderData( + id = id.getOrElse(0), + petId = petId.getOrElse(0), + quantity = quantity.getOrElse(0), + shipDate = shipDate.getOrElse(null), + status = status.getOrElse(null), + complete = complete.getOrElse(false) + ) + } + +} + +object Order{ + + given RW[Order] = OrderData.readWriter.bimap[Order](_.asData, _.asModel) + + enum Fields(fieldName : String) extends Field(fieldName) { + case id extends Fields("id") + case petId extends Fields("petId") + case quantity extends Fields("quantity") + case shipDate extends Fields("shipDate") + case status extends Fields("status") + case complete extends Fields("complete") + } + + // baseName=status + // nameInCamelCase = status + enum StatusEnum derives ReadWriter { + case placed + case approved + case delivered + } + +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/OrderData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/OrderData.scala new file mode 100644 index 000000000000..0de58a7f0b3b --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/OrderData.scala @@ -0,0 +1,245 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using modelData.mustache +package sample.cask.model +import java.time.OffsetDateTime +import scala.util.control.NonFatal +import scala.util.* + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +/** OrderData a data transfer object, primarily for simple json serialisation. + * It has no validation - there may be nulls, values out of range, etc + */ +case class OrderData( + id: Long = 0 , + + petId: Long = 0 , + + quantity: Int = 0 , + + shipDate: OffsetDateTime = null , + + /* Order Status */ + status: Order.StatusEnum = null , + + complete: Boolean = false + + ) { + + def asJson: String = write(this) + + def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { + val errors = scala.collection.mutable.ListBuffer[ValidationError]() + // ================== + // id + + + + + + + + + + + + + + + + + // ================== + // petId + + + + + + + + + + + + + + + + + // ================== + // quantity + + + + + + + + + + + + + + + + + // ================== + // shipDate + + + + + + + + + + + + + + + + + // ================== + // status + + + + + + + + + + + + + + + + + // ================== + // complete + + + + + + + + + + + + + + + + + errors.toSeq + } + + def validated(failFast : Boolean = false) : scala.util.Try[Order] = { + validationErrors(Vector(), failFast) match { + case Seq() => Success(asModel) + case first +: theRest => Failure(ValidationErrors(first, theRest)) + } + } + + /** use 'validated' to check validation */ + def asModel : Order = { + Order( + id = Option( + id + ) + , + petId = Option( + petId + ) + , + quantity = Option( + quantity + ) + , + shipDate = Option( + shipDate + ) + , + status = Option( + status + ) + , + complete = Option( + complete + ) + + ) + } +} + +object OrderData { + + given readWriter : RW[OrderData] = macroRW + + def fromJsonString(jason : String) : OrderData = try { + read[OrderData](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") + } + + def manyFromJsonString(jason : String) : Seq[OrderData] = try { + read[List[OrderData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") + } + + def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[Order]] = { + Try(manyFromJsonString(jason)).flatMap { list => + list.zipWithIndex.foldLeft(Try(Vector[Order]())) { + case (Success(list), (next, i)) => + next.validated(failFast) match { + case Success(ok) => Success(list :+ ok) + case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } + + def mapFromJsonString(jason : String) : Map[String, OrderData] = try { + read[Map[String, OrderData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") + } + + + def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, Order]] = { + Try(mapFromJsonString(jason)).flatMap { map => + map.foldLeft(Try(Map[String, Order]())) { + case (Success(map), (key, next)) => + next.validated(failFast) match { + case Success(ok) => Success(map.updated(key, ok)) + case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Pet.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Pet.scala new file mode 100644 index 000000000000..068f593303c4 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Pet.scala @@ -0,0 +1,77 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using model.mustache +package sample.cask.model +import sample.cask.model.Category +import sample.cask.model.Tag +import scala.util.control.NonFatal + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +case class Pet( + id: Option[Long] = None , + + category: Option[Category] = None , + + name: String, + + photoUrls: Seq[String], + + tags: Seq[Tag] = Nil , + + /* pet status in the store */ + status: Option[Pet.StatusEnum] = None + + ) { + + def asJson: String = asData.asJson + + def asData : PetData = { + PetData( + id = id.getOrElse(0), + category = category.map(_.asData).getOrElse(null), + name = name, + photoUrls = photoUrls, + tags = tags.map(_.asData), + status = status.getOrElse(null) + ) + } + +} + +object Pet{ + + given RW[Pet] = PetData.readWriter.bimap[Pet](_.asData, _.asModel) + + enum Fields(fieldName : String) extends Field(fieldName) { + case id extends Fields("id") + case category extends Fields("category") + case name extends Fields("name") + case photoUrls extends Fields("photoUrls") + case tags extends Fields("tags") + case status extends Fields("status") + } + + // baseName=status + // nameInCamelCase = status + enum StatusEnum derives ReadWriter { + case available + case pending + case sold + } + +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/PetData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/PetData.scala new file mode 100644 index 000000000000..db6a3e1a5124 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/PetData.scala @@ -0,0 +1,262 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using modelData.mustache +package sample.cask.model +import sample.cask.model.Category +import sample.cask.model.Tag +import scala.util.control.NonFatal +import scala.util.* + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +/** PetData a data transfer object, primarily for simple json serialisation. + * It has no validation - there may be nulls, values out of range, etc + */ +case class PetData( + id: Long = 0 , + + category: CategoryData = null , + + name: String, + + photoUrls: Seq[String], + + tags: Seq[TagData] = Nil , + + /* pet status in the store */ + status: Pet.StatusEnum = null + + ) { + + def asJson: String = write(this) + + def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { + val errors = scala.collection.mutable.ListBuffer[ValidationError]() + // ================== + // id + + + + + + + + + + + + + + + + + // ================== + // category + + + + + + + + + + + + + + + + // validating category + if (errors.isEmpty || !failFast) { + if category != null then errors ++= category.validationErrors(path :+ Pet.Fields.category, failFast) + } + + // ================== + // name + + + + + + + + + + + + + + + + + // ================== + // photoUrls + + + + + + + + + + + + + + + + + // ================== + // tags + + + + + + + + + + + + + + + + if (errors.isEmpty || !failFast) { + if (tags != null) { + tags.zipWithIndex.foreach { + case (value, i) if errors.isEmpty || !failFast => + errors ++= value.validationErrors( + path :+ Pet.Fields.tags :+ Field(i.toString), + failFast) + case (value, i) => + } + } + } + + + // ================== + // status + + + + + + + + + + + + + + + + + errors.toSeq + } + + def validated(failFast : Boolean = false) : scala.util.Try[Pet] = { + validationErrors(Vector(), failFast) match { + case Seq() => Success(asModel) + case first +: theRest => Failure(ValidationErrors(first, theRest)) + } + } + + /** use 'validated' to check validation */ + def asModel : Pet = { + Pet( + id = Option( + id + ) + , + category = Option( + category + ) + .map(_.asModel), + name = + name + + , + photoUrls = + photoUrls + + , + tags = + tags + + .map(_.asModel), + status = Option( + status + ) + + ) + } +} + +object PetData { + + given readWriter : RW[PetData] = macroRW + + def fromJsonString(jason : String) : PetData = try { + read[PetData](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") + } + + def manyFromJsonString(jason : String) : Seq[PetData] = try { + read[List[PetData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") + } + + def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[Pet]] = { + Try(manyFromJsonString(jason)).flatMap { list => + list.zipWithIndex.foldLeft(Try(Vector[Pet]())) { + case (Success(list), (next, i)) => + next.validated(failFast) match { + case Success(ok) => Success(list :+ ok) + case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } + + def mapFromJsonString(jason : String) : Map[String, PetData] = try { + read[Map[String, PetData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") + } + + + def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, Pet]] = { + Try(mapFromJsonString(jason)).flatMap { map => + map.foldLeft(Try(Map[String, Pet]())) { + case (Success(map), (key, next)) => + next.validated(failFast) match { + case Success(ok) => Success(map.updated(key, ok)) + case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Tag.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Tag.scala new file mode 100644 index 000000000000..a8bd2a358669 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Tag.scala @@ -0,0 +1,51 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using model.mustache +package sample.cask.model +import scala.util.control.NonFatal + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +case class Tag( + id: Option[Long] = None , + + name: Option[String] = None + + ) { + + def asJson: String = asData.asJson + + def asData : TagData = { + TagData( + id = id.getOrElse(0), + name = name.getOrElse("") + ) + } + +} + +object Tag{ + + given RW[Tag] = TagData.readWriter.bimap[Tag](_.asData, _.asModel) + + enum Fields(fieldName : String) extends Field(fieldName) { + case id extends Fields("id") + case name extends Fields("name") + } + + +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/TagData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/TagData.scala new file mode 100644 index 000000000000..e8c66334bcb3 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/TagData.scala @@ -0,0 +1,147 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using modelData.mustache +package sample.cask.model +import scala.util.control.NonFatal +import scala.util.* + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +/** TagData a data transfer object, primarily for simple json serialisation. + * It has no validation - there may be nulls, values out of range, etc + */ +case class TagData( + id: Long = 0 , + + name: String = "" + + ) { + + def asJson: String = write(this) + + def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { + val errors = scala.collection.mutable.ListBuffer[ValidationError]() + // ================== + // id + + + + + + + + + + + + + + + + + // ================== + // name + + + + + + + + + + + + + + + + + errors.toSeq + } + + def validated(failFast : Boolean = false) : scala.util.Try[Tag] = { + validationErrors(Vector(), failFast) match { + case Seq() => Success(asModel) + case first +: theRest => Failure(ValidationErrors(first, theRest)) + } + } + + /** use 'validated' to check validation */ + def asModel : Tag = { + Tag( + id = Option( + id + ) + , + name = Option( + name + ) + + ) + } +} + +object TagData { + + given readWriter : RW[TagData] = macroRW + + def fromJsonString(jason : String) : TagData = try { + read[TagData](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") + } + + def manyFromJsonString(jason : String) : Seq[TagData] = try { + read[List[TagData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") + } + + def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[Tag]] = { + Try(manyFromJsonString(jason)).flatMap { list => + list.zipWithIndex.foldLeft(Try(Vector[Tag]())) { + case (Success(list), (next, i)) => + next.validated(failFast) match { + case Success(ok) => Success(list :+ ok) + case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } + + def mapFromJsonString(jason : String) : Map[String, TagData] = try { + read[Map[String, TagData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") + } + + + def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, Tag]] = { + Try(mapFromJsonString(jason)).flatMap { map => + map.foldLeft(Try(Map[String, Tag]())) { + case (Success(map), (key, next)) => + next.validated(failFast) match { + case Success(ok) => Success(map.updated(key, ok)) + case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/User.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/User.scala new file mode 100644 index 000000000000..286cdb3b6528 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/User.scala @@ -0,0 +1,76 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using model.mustache +package sample.cask.model +import scala.util.control.NonFatal + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +case class User( + id: Option[Long] = None , + + username: Option[String] = None , + + firstName: Option[String] = None , + + lastName: Option[String] = None , + + email: Option[String] = None , + + password: Option[String] = None , + + phone: Option[String] = None , + + /* User Status */ + userStatus: Option[Int] = None + + ) { + + def asJson: String = asData.asJson + + def asData : UserData = { + UserData( + id = id.getOrElse(0), + username = username.getOrElse(""), + firstName = firstName.getOrElse(""), + lastName = lastName.getOrElse(""), + email = email.getOrElse(""), + password = password.getOrElse(""), + phone = phone.getOrElse(""), + userStatus = userStatus.getOrElse(0) + ) + } + +} + +object User{ + + given RW[User] = UserData.readWriter.bimap[User](_.asData, _.asModel) + + enum Fields(fieldName : String) extends Field(fieldName) { + case id extends Fields("id") + case username extends Fields("username") + case firstName extends Fields("firstName") + case lastName extends Fields("lastName") + case email extends Fields("email") + case password extends Fields("password") + case phone extends Fields("phone") + case userStatus extends Fields("userStatus") + } + + +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/UserData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/UserData.scala new file mode 100644 index 000000000000..8b8ca7908abf --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/UserData.scala @@ -0,0 +1,292 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +// this model was generated using modelData.mustache +package sample.cask.model +import scala.util.control.NonFatal +import scala.util.* + +// see https://com-lihaoyi.github.io/upickle/ +import upickle.default.{ReadWriter => RW, macroRW} +import upickle.default.* + +/** UserData a data transfer object, primarily for simple json serialisation. + * It has no validation - there may be nulls, values out of range, etc + */ +case class UserData( + id: Long = 0 , + + username: String = "" , + + firstName: String = "" , + + lastName: String = "" , + + email: String = "" , + + password: String = "" , + + phone: String = "" , + + /* User Status */ + userStatus: Int = 0 + + ) { + + def asJson: String = write(this) + + def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { + val errors = scala.collection.mutable.ListBuffer[ValidationError]() + // ================== + // id + + + + + + + + + + + + + + + + + // ================== + // username + + + + + + + + + + + + + + + + + // ================== + // firstName + + + + + + + + + + + + + + + + + // ================== + // lastName + + + + + + + + + + + + + + + + + // ================== + // email + + + + + + + + + + + + + + + + + // ================== + // password + + + + + + + + + + + + + + + + + // ================== + // phone + + + + + + + + + + + + + + + + + // ================== + // userStatus + + + + + + + + + + + + + + + + + errors.toSeq + } + + def validated(failFast : Boolean = false) : scala.util.Try[User] = { + validationErrors(Vector(), failFast) match { + case Seq() => Success(asModel) + case first +: theRest => Failure(ValidationErrors(first, theRest)) + } + } + + /** use 'validated' to check validation */ + def asModel : User = { + User( + id = Option( + id + ) + , + username = Option( + username + ) + , + firstName = Option( + firstName + ) + , + lastName = Option( + lastName + ) + , + email = Option( + email + ) + , + password = Option( + password + ) + , + phone = Option( + phone + ) + , + userStatus = Option( + userStatus + ) + + ) + } +} + +object UserData { + + given readWriter : RW[UserData] = macroRW + + def fromJsonString(jason : String) : UserData = try { + read[UserData](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") + } + + def manyFromJsonString(jason : String) : Seq[UserData] = try { + read[List[UserData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") + } + + def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[User]] = { + Try(manyFromJsonString(jason)).flatMap { list => + list.zipWithIndex.foldLeft(Try(Vector[User]())) { + case (Success(list), (next, i)) => + next.validated(failFast) match { + case Success(ok) => Success(list :+ ok) + case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } + + def mapFromJsonString(jason : String) : Map[String, UserData] = try { + read[Map[String, UserData]](jason) + } catch { + case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") + } + + + def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, User]] = { + Try(mapFromJsonString(jason)).flatMap { map => + map.foldLeft(Try(Map[String, User]())) { + case (Success(map), (key, next)) => + next.validated(failFast) match { + case Success(ok) => Success(map.updated(key, ok)) + case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) + } + case (fail, _) => fail + } + } + } +} + diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/package.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/package.scala new file mode 100644 index 000000000000..b0c893da6715 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/package.scala @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +package sample.cask.model + +// model package +import upickle.default._ +import java.time.* +import java.time.format.DateTimeFormatter + +/** + * This base class lets us refer to fields in exceptions + */ +class Field(val name : String) + +final case class ValidationErrors( + first: ValidationError, + remaining: Seq[ValidationError], + message: String +) extends Exception(message) + +object ValidationErrors { + def apply(first: ValidationError, remaining: Seq[ValidationError]) = { + val noun = if remaining.isEmpty then "error" else "errors" + new ValidationErrors( + first, + remaining, + remaining.mkString(s"${remaining.size + 1} $noun found: ${first}", "\n\t", "") + ) + } +} + + +final case class ValidationError(path : Seq[Field], message : String) extends Exception(message) { + override def toString = s"ValidationError for ${path.mkString(".")}: $message" +} + +given ReadWriter[ZonedDateTime] = readwriter[String].bimap[ZonedDateTime]( + zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), + str => ZonedDateTime.parse(str, DateTimeFormatter.ISO_INSTANT)) + +given ReadWriter[LocalDateTime] = readwriter[String].bimap[LocalDateTime]( + zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), + str => LocalDateTime.parse(str, DateTimeFormatter.ISO_INSTANT)) + +given ReadWriter[LocalDate] = readwriter[String].bimap[LocalDate]( + zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), + str => LocalDate.parse(str, DateTimeFormatter.ISO_INSTANT)) + +given ReadWriter[OffsetDateTime] = readwriter[String].bimap[OffsetDateTime]( + zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), + str => scala.util.Try(OffsetDateTime.parse(str, DateTimeFormatter.ISO_DATE_TIME)).getOrElse( + OffsetDateTime.parse(str, DateTimeFormatter.ISO_INSTANT) + ) +) \ No newline at end of file diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/package.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/package.scala new file mode 100644 index 000000000000..f4c86e310e04 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/package.scala @@ -0,0 +1,24 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator. + * + * https://openapi-generator.tech + */ + +package cask.groupId.server + +def box(str: String): String = { + val lines = str.linesIterator.toList + val maxLen = (0 +: lines.map(_.length)).max + val boxed = lines.map { line => + s" | ${line.padTo(maxLen, ' ')} |" + } + val bar = " +-" + ("-" * maxLen) + "-+" + (bar +: boxed :+ bar).mkString("\n") +} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/ApiResponseTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/ApiResponseTest.scala new file mode 100644 index 000000000000..18906d1f3842 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/ApiResponseTest.scala @@ -0,0 +1,33 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + */ + +// this model was generated using modelTest.mustache +package sample.cask.model + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import scala.util.* + +class ApiResponseTest extends AnyWordSpec with Matchers { + + "ApiResponse.fromJson" should { + """not parse invalid json""" in { + val Failure(err) = Try(ApiResponseData.fromJsonString("invalid jason")) + err.getMessage should startWith ("Error parsing json 'invalid jason'") + } + """parse """ ignore { + val Failure(err : ValidationErrors) = ApiResponseData.fromJsonString("""""").validated() + + sys.error("TODO") + } + } + +} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/CategoryTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/CategoryTest.scala new file mode 100644 index 000000000000..a2d9d6c6251f --- /dev/null +++ b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/CategoryTest.scala @@ -0,0 +1,33 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + */ + +// this model was generated using modelTest.mustache +package sample.cask.model + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import scala.util.* + +class CategoryTest extends AnyWordSpec with Matchers { + + "Category.fromJson" should { + """not parse invalid json""" in { + val Failure(err) = Try(CategoryData.fromJsonString("invalid jason")) + err.getMessage should startWith ("Error parsing json 'invalid jason'") + } + """parse """ ignore { + val Failure(err : ValidationErrors) = CategoryData.fromJsonString("""""").validated() + + sys.error("TODO") + } + } + +} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/OrderTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/OrderTest.scala new file mode 100644 index 000000000000..3f5360101130 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/OrderTest.scala @@ -0,0 +1,34 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + */ + +// this model was generated using modelTest.mustache +package sample.cask.model +import java.time.OffsetDateTime + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import scala.util.* + +class OrderTest extends AnyWordSpec with Matchers { + + "Order.fromJson" should { + """not parse invalid json""" in { + val Failure(err) = Try(OrderData.fromJsonString("invalid jason")) + err.getMessage should startWith ("Error parsing json 'invalid jason'") + } + """parse """ ignore { + val Failure(err : ValidationErrors) = OrderData.fromJsonString("""""").validated() + + sys.error("TODO") + } + } + +} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/PetTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/PetTest.scala new file mode 100644 index 000000000000..1ab24f2e9269 --- /dev/null +++ b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/PetTest.scala @@ -0,0 +1,35 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + */ + +// this model was generated using modelTest.mustache +package sample.cask.model +import sample.cask.model.Category +import sample.cask.model.Tag + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import scala.util.* + +class PetTest extends AnyWordSpec with Matchers { + + "Pet.fromJson" should { + """not parse invalid json""" in { + val Failure(err) = Try(PetData.fromJsonString("invalid jason")) + err.getMessage should startWith ("Error parsing json 'invalid jason'") + } + """parse """ ignore { + val Failure(err : ValidationErrors) = PetData.fromJsonString("""""").validated() + + sys.error("TODO") + } + } + +} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/TagTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/TagTest.scala new file mode 100644 index 000000000000..664e43e63c9c --- /dev/null +++ b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/TagTest.scala @@ -0,0 +1,33 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + */ + +// this model was generated using modelTest.mustache +package sample.cask.model + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import scala.util.* + +class TagTest extends AnyWordSpec with Matchers { + + "Tag.fromJson" should { + """not parse invalid json""" in { + val Failure(err) = Try(TagData.fromJsonString("invalid jason")) + err.getMessage should startWith ("Error parsing json 'invalid jason'") + } + """parse """ ignore { + val Failure(err : ValidationErrors) = TagData.fromJsonString("""""").validated() + + sys.error("TODO") + } + } + +} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/UserTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/UserTest.scala new file mode 100644 index 000000000000..622fad87b0da --- /dev/null +++ b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/UserTest.scala @@ -0,0 +1,33 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + */ + +// this model was generated using modelTest.mustache +package sample.cask.model + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import scala.util.* + +class UserTest extends AnyWordSpec with Matchers { + + "User.fromJson" should { + """not parse invalid json""" in { + val Failure(err) = Try(UserData.fromJsonString("invalid jason")) + err.getMessage should startWith ("Error parsing json 'invalid jason'") + } + """parse """ ignore { + val Failure(err : ValidationErrors) = UserData.fromJsonString("""""").validated() + + sys.error("TODO") + } + } + +} diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index f26f109f7667..793ce78d63f2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -28,6 +28,13 @@ public class AdditionalPropertiesAnyType { private String name; + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesAnyType(String name) { + this.name = name; + } + public AdditionalPropertiesAnyType name(String name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 3d5a8cd24f91..5203a43dd69b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -29,6 +29,13 @@ public class AdditionalPropertiesArray { private String name; + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesArray(String name) { + this.name = name; + } + public AdditionalPropertiesArray name(String name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 8b46dd26500e..6b533427a499 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -28,6 +28,13 @@ public class AdditionalPropertiesBoolean { private String name; + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesBoolean(String name) { + this.name = name; + } + public AdditionalPropertiesBoolean name(String name) { this.name = name; return this; 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 0121930d3f95..8a4233afdf9c 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 @@ -59,6 +59,23 @@ public class AdditionalPropertiesClass { private Object anytype3; + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesClass(Map mapString, Map mapNumber, Map mapInteger, Map mapBoolean, Map> mapArrayInteger, Map> mapArrayAnytype, Map> mapMapString, Map> mapMapAnytype, Object anytype1, Object anytype2, Object anytype3) { + this.mapString = mapString; + this.mapNumber = mapNumber; + this.mapInteger = mapInteger; + this.mapBoolean = mapBoolean; + this.mapArrayInteger = mapArrayInteger; + this.mapArrayAnytype = mapArrayAnytype; + this.mapMapString = mapMapString; + this.mapMapAnytype = mapMapAnytype; + this.anytype1 = anytype1; + this.anytype2 = JsonNullable.of(anytype2); + this.anytype3 = anytype3; + } + public AdditionalPropertiesClass mapString(Map mapString) { this.mapString = mapString; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index d5462e03176b..2dc8ef0f8227 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -28,6 +28,13 @@ public class AdditionalPropertiesInteger { private String name; + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesInteger(String name) { + this.name = name; + } + public AdditionalPropertiesInteger name(String name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 486d63f63386..e06f0ff4385b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -29,6 +29,13 @@ public class AdditionalPropertiesNumber { private String name; + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesNumber(String name) { + this.name = name; + } + public AdditionalPropertiesNumber name(String name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 4e28c804ae66..fdc3fa38f291 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -29,6 +29,13 @@ public class AdditionalPropertiesObject { private String name; + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesObject(String name) { + this.name = name; + } + public AdditionalPropertiesObject name(String name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 30abaaa2713e..a200015b1101 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -28,6 +28,13 @@ public class AdditionalPropertiesString { private String name; + /** + * Constructor with all args parameters + */ + public AdditionalPropertiesString(String name) { + this.name = name; + } + public AdditionalPropertiesString name(String name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 38979ac87b25..045f58e01f54 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -51,6 +51,14 @@ public Animal(String className) { this.className = className; } + /** + * Constructor with all args parameters + */ + public Animal(String className, String color) { + this.className = className; + this.color = color; + } + public Animal className(String className) { this.className = className; return this; 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 831564f23bb2..55cf4cb2ad48 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 @@ -29,6 +29,13 @@ public class ArrayOfArrayOfNumberOnly { @Valid private List> arrayArrayNumber = new ArrayList<>(); + /** + * Constructor with all args parameters + */ + public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; return this; 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 7cffec68450d..7aa2ca4d53c3 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 @@ -29,6 +29,13 @@ public class ArrayOfNumberOnly { @Valid private List arrayNumber = new ArrayList<>(); + /** + * Constructor with all args parameters + */ + public ArrayOfNumberOnly(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; return this; 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 430b0c0e25c4..887f6873c879 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 @@ -35,6 +35,15 @@ public class ArrayTest { @Valid private List> arrayArrayOfModel = new ArrayList<>(); + /** + * Constructor with all args parameters + */ + public ArrayTest(List arrayOfString, List> arrayArrayOfInteger, List> arrayArrayOfModel) { + this.arrayOfString = arrayOfString; + this.arrayArrayOfInteger = arrayArrayOfInteger; + this.arrayArrayOfModel = arrayArrayOfModel; + } + public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 8da4d5eaea08..07b420d40b6e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -80,6 +80,14 @@ public BigCat(String className) { super(className); } + /** + * Constructor with all args parameters + */ + public BigCat(KindEnum kind, Boolean declawed, String className, String color) { + super(declawed, className, color); + this.kind = kind; + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 00f5e57bab88..675391c12f8d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -34,6 +34,18 @@ public class Capitalization { private String ATT_NAME; + /** + * Constructor with all args parameters + */ + public Capitalization(String smallCamel, String capitalCamel, String smallSnake, String capitalSnake, String scAETHFlowPoints, String ATT_NAME) { + this.smallCamel = smallCamel; + this.capitalCamel = capitalCamel; + this.smallSnake = smallSnake; + this.capitalSnake = capitalSnake; + this.scAETHFlowPoints = scAETHFlowPoints; + this.ATT_NAME = ATT_NAME; + } + public Capitalization smallCamel(String smallCamel) { this.smallCamel = smallCamel; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index eb6f6babeea0..57e3de985392 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -48,6 +48,14 @@ public Cat(String className) { super(className); } + /** + * Constructor with all args parameters + */ + public Cat(Boolean declawed, String className, String color) { + super(className, color); + this.declawed = declawed; + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index e5c6e8508e61..fc2e84a937c1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -37,6 +37,14 @@ public Category(String name) { this.name = name; } + /** + * Constructor with all args parameters + */ + public Category(Long id, String name) { + this.id = id; + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java index 870c1b3d9b01..a6a92a45c17c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -32,6 +32,14 @@ public class ChildWithNullable extends ParentWithNullable { private String otherProperty; + /** + * Constructor with all args parameters + */ + public ChildWithNullable(String otherProperty, TypeEnum type, String nullableProperty) { + super(type, nullableProperty); + this.otherProperty = otherProperty; + } + public ChildWithNullable otherProperty(String otherProperty) { this.otherProperty = otherProperty; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index 43ed63b13288..3a8fa97ae56e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -25,6 +25,13 @@ public class ClassModel { private String propertyClass; + /** + * Constructor with all args parameters + */ + public ClassModel(String propertyClass) { + this.propertyClass = propertyClass; + } + public ClassModel propertyClass(String propertyClass) { this.propertyClass = propertyClass; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index 37ec7ed48877..6beabd726420 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -24,6 +24,13 @@ public class Client { private String client; + /** + * Constructor with all args parameters + */ + public Client(String client) { + this.client = client; + } + public Client client(String client) { this.client = client; return this; 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 75ead686de0b..4f84ec2ca3c1 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 @@ -51,6 +51,16 @@ public ContainerDefaultValue(List nullableRequiredArray, List re this.requiredArray = requiredArray; } + /** + * Constructor with all args parameters + */ + public ContainerDefaultValue(List nullableArray, List nullableRequiredArray, List requiredArray, List nullableArrayWithDefault) { + this.nullableArray = JsonNullable.of(nullableArray); + this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + this.requiredArray = requiredArray; + this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + } + public ContainerDefaultValue nullableArray(List nullableArray) { this.nullableArray = JsonNullable.of(nullableArray); return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 0f4517101f4c..16b6bf48b22c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -40,6 +40,14 @@ public Dog(String className) { super(className); } + /** + * Constructor with all args parameters + */ + public Dog(String breed, String className, String color) { + super(className, color); + this.breed = breed; + } + public Dog breed(String breed) { this.breed = breed; return this; 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 f42059fd9883..20d02fc4f5cb 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 @@ -101,6 +101,14 @@ public static ArrayEnumEnum fromValue(String value) { @Valid private List arrayEnum = new ArrayList<>(); + /** + * Constructor with all args parameters + */ + public EnumArrays(JustSymbolEnum justSymbol, List arrayEnum) { + this.justSymbol = justSymbol; + this.arrayEnum = arrayEnum; + } + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 51305bdaca2c..4c98a51f7b47 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -191,6 +191,17 @@ public EnumTest(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } + /** + * Constructor with all args parameters + */ + public EnumTest(EnumStringEnum enumString, EnumStringRequiredEnum enumStringRequired, EnumIntegerEnum enumInteger, EnumNumberEnum enumNumber, OuterEnum outerEnum) { + this.enumString = enumString; + this.enumStringRequired = enumStringRequired; + this.enumInteger = enumInteger; + this.enumNumber = enumNumber; + this.outerEnum = outerEnum; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index 2a47f4e0b8bb..035343aa6a87 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -25,6 +25,13 @@ public class File { private String sourceURI; + /** + * Constructor with all args parameters + */ + public File(String sourceURI) { + this.sourceURI = sourceURI; + } + public File sourceURI(String sourceURI) { this.sourceURI = sourceURI; return this; 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 ee88b88d4089..44d0810fdb15 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 @@ -31,6 +31,14 @@ public class FileSchemaTestClass { @Valid private List<@Valid File> files = new ArrayList<>(); + /** + * Constructor with all args parameters + */ + public FileSchemaTestClass(File file, List<@Valid File> files) { + this.file = file; + this.files = files; + } + public FileSchemaTestClass file(File file) { this.file = file; return this; 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 37f91d2559bd..bd4384d47329 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 @@ -74,6 +74,26 @@ public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String passwo this.password = password; } + /** + * Constructor with all args parameters + */ + public FormatTest(Integer integer, Integer int32, Long int64, BigDecimal number, Float _float, Double _double, String string, byte[] _byte, org.springframework.core.io.Resource binary, LocalDate date, OffsetDateTime dateTime, UUID uuid, String password, BigDecimal bigDecimal) { + this.integer = integer; + this.int32 = int32; + this.int64 = int64; + this.number = number; + this._float = _float; + this._double = _double; + this.string = string; + this._byte = _byte; + this.binary = binary; + this.date = date; + this.dateTime = dateTime; + this.uuid = uuid; + this.password = password; + this.bigDecimal = bigDecimal; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 8b6842abe1d2..3f7bdbbac675 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -28,6 +28,14 @@ public class HasOnlyReadOnly { private String foo; + /** + * Constructor with all args parameters + */ + public HasOnlyReadOnly(String bar, String foo) { + this.bar = bar; + this.foo = foo; + } + public HasOnlyReadOnly bar(String bar) { this.bar = bar; return this; 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 2288fa5af1b9..0be3a10dcbeb 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 @@ -72,6 +72,16 @@ public static InnerEnum fromValue(String value) { @Valid private Map indirectMap = new HashMap<>(); + /** + * Constructor with all args parameters + */ + public MapTest(Map> mapMapOfString, Map mapOfEnumString, Map directMap, Map indirectMap) { + this.mapMapOfString = mapMapOfString; + this.mapOfEnumString = mapOfEnumString; + this.directMap = directMap; + this.indirectMap = indirectMap; + } + public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; return this; 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 67cb8dfadcb9..c9f357fb76f1 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 @@ -36,6 +36,15 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @Valid private Map map = new HashMap<>(); + /** + * Constructor with all args parameters + */ + public MixedPropertiesAndAdditionalPropertiesClass(UUID uuid, OffsetDateTime dateTime, Map map) { + this.uuid = uuid; + this.dateTime = dateTime; + this.map = map; + } + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index fa273e6acc60..6b59def11d86 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -29,6 +29,14 @@ public class Model200Response { private String propertyClass; + /** + * Constructor with all args parameters + */ + public Model200Response(Integer name, String propertyClass) { + this.name = name; + this.propertyClass = propertyClass; + } + public Model200Response name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index cdbff4b3f752..309277313379 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,6 +30,15 @@ public class ModelApiResponse { private String message; + /** + * Constructor with all args parameters + */ + public ModelApiResponse(Integer code, String type, String message) { + this.code = code; + this.type = type; + this.message = message; + } + public ModelApiResponse code(Integer code) { this.code = code; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index 0c34d043f8ba..24f6bcd23e5a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -26,6 +26,13 @@ public class ModelList { private String _123list; + /** + * Constructor with all args parameters + */ + public ModelList(String _123list) { + this._123list = _123list; + } + public ModelList _123list(String _123list) { this._123list = _123list; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index 23db45115b6b..4e12c079a4cc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -27,6 +27,13 @@ public class ModelReturn { private Integer _return; + /** + * Constructor with all args parameters + */ + public ModelReturn(Integer _return) { + this._return = _return; + } + public ModelReturn _return(Integer _return) { this._return = _return; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 84c44ead7d18..9234c8c54d35 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -42,6 +42,16 @@ public Name(Integer name) { this.name = name; } + /** + * Constructor with all args parameters + */ + public Name(Integer name, Integer snakeCase, String property, Integer _123number) { + this.name = name; + this.snakeCase = snakeCase; + this.property = property; + this._123number = _123number; + } + public Name name(Integer name) { this.name = name; return this; 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 0765c96c341d..10d2b818228a 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 @@ -30,6 +30,13 @@ public class NullableMapProperty { @Valid private JsonNullable> languageValues = JsonNullable.>undefined(); + /** + * Constructor with all args parameters + */ + public NullableMapProperty(Map languageValues) { + this.languageValues = JsonNullable.of(languageValues); + } + public NullableMapProperty languageValues(Map languageValues) { this.languageValues = JsonNullable.of(languageValues); return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index e77ed00dae0c..749a6793ac6f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,6 +25,13 @@ public class NumberOnly { private BigDecimal justNumber; + /** + * Constructor with all args parameters + */ + public NumberOnly(BigDecimal justNumber) { + this.justNumber = justNumber; + } + public NumberOnly justNumber(BigDecimal justNumber) { this.justNumber = justNumber; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 1720fa0a852e..eb9e5f1a41df 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -75,6 +75,18 @@ public static StatusEnum fromValue(String value) { private Boolean complete = false; + /** + * Constructor with all args parameters + */ + public Order(Long id, Long petId, Integer quantity, OffsetDateTime shipDate, StatusEnum status, Boolean complete) { + this.id = id; + this.petId = petId; + this.quantity = quantity; + this.shipDate = shipDate; + this.status = status; + this.complete = complete; + } + public Order id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index b4eaded19993..6a55abc39e3e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -29,6 +29,15 @@ public class OuterComposite { private Boolean myBoolean; + /** + * Constructor with all args parameters + */ + public OuterComposite(BigDecimal myNumber, String myString, Boolean myBoolean) { + this.myNumber = myNumber; + this.myString = myString; + this.myBoolean = myBoolean; + } + public OuterComposite myNumber(BigDecimal myNumber) { this.myNumber = myNumber; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java index 7c4db1043d9d..fecddfc993ee 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -75,6 +75,14 @@ public static TypeEnum fromValue(String value) { private JsonNullable nullableProperty = JsonNullable.undefined(); + /** + * Constructor with all args parameters + */ + public ParentWithNullable(TypeEnum type, String nullableProperty) { + this.type = type; + this.nullableProperty = JsonNullable.of(nullableProperty); + } + public ParentWithNullable type(TypeEnum type) { this.type = type; return this; 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 bcefb3bffc2f..a30129694856 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 @@ -95,6 +95,18 @@ public Pet(String name, Set photoUrls) { this.photoUrls = photoUrls; } + /** + * Constructor with all args parameters + */ + public Pet(Long id, Category category, String name, Set photoUrls, List<@Valid Tag> tags, StatusEnum status) { + this.id = id; + this.category = category; + this.name = name; + this.photoUrls = photoUrls; + this.tags = tags; + this.status = status; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 19fbb81bf8a3..21cb8fd31ecd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -26,6 +26,14 @@ public class ReadOnlyFirst { private String baz; + /** + * Constructor with all args parameters + */ + public ReadOnlyFirst(String bar, String baz) { + this.bar = bar; + this.baz = baz; + } + public ReadOnlyFirst bar(String bar) { this.bar = bar; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index d19431eaea0a..708fe9bad393 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -30,6 +30,16 @@ public class ResponseObjectWithDifferentFieldNames { private String propertyNameWithSpaces; + /** + * Constructor with all args parameters + */ + public ResponseObjectWithDifferentFieldNames(String normalPropertyName, String UPPER_CASE_PROPERTY_SNAKE, String lowerCasePropertyDashes, String propertyNameWithSpaces) { + this.normalPropertyName = normalPropertyName; + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + this.propertyNameWithSpaces = propertyNameWithSpaces; + } + public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPropertyName) { this.normalPropertyName = normalPropertyName; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index f40ea5dc780c..6dd4f8c4f087 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -26,6 +26,13 @@ public class SpecialModelName { private Long $specialPropertyName; + /** + * Constructor with all args parameters + */ + public SpecialModelName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 89a9fc3c1e2b..417e5de0621a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -26,6 +26,14 @@ public class Tag { private String name; + /** + * Constructor with all args parameters + */ + public Tag(Long id, String name) { + this.id = id; + this.name = name; + } + public Tag id(Long id) { this.id = id; return this; 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 9078b1b14912..c38e18daf578 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 @@ -42,7 +42,7 @@ public TypeHolderDefault() { } /** - * Constructor with only required parameters + * Constructor with only required parameters and all parameters */ public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { this.stringItem = stringItem; 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 025adca43ae7..d9eb7986949d 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 @@ -44,7 +44,7 @@ public TypeHolderExample() { } /** - * Constructor with only required parameters + * Constructor with only required parameters and all parameters */ public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { this.stringItem = stringItem; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index e3a531b30557..8b6c8209bfbd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -38,6 +38,20 @@ public class User { private Integer userStatus; + /** + * Constructor with all args parameters + */ + public User(Long id, String username, String firstName, String lastName, String email, String password, String phone, Integer userStatus) { + this.id = id; + this.username = username; + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + this.password = password; + this.phone = phone; + this.userStatus = userStatus; + } + public User id(Long id) { this.id = id; return this; 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 06b420cb3d44..8043192b97b0 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 @@ -93,6 +93,41 @@ public class XmlItem { @Valid private List prefixNsWrappedArray = new ArrayList<>(); + /** + * Constructor with all args parameters + */ + public XmlItem(String attributeString, BigDecimal attributeNumber, Integer attributeInteger, Boolean attributeBoolean, List wrappedArray, String nameString, BigDecimal nameNumber, Integer nameInteger, Boolean nameBoolean, List nameArray, List nameWrappedArray, String prefixString, BigDecimal prefixNumber, Integer prefixInteger, Boolean prefixBoolean, List prefixArray, List prefixWrappedArray, String namespaceString, BigDecimal namespaceNumber, Integer namespaceInteger, Boolean namespaceBoolean, List namespaceArray, List namespaceWrappedArray, String prefixNsString, BigDecimal prefixNsNumber, Integer prefixNsInteger, Boolean prefixNsBoolean, List prefixNsArray, List prefixNsWrappedArray) { + this.attributeString = attributeString; + this.attributeNumber = attributeNumber; + this.attributeInteger = attributeInteger; + this.attributeBoolean = attributeBoolean; + this.wrappedArray = wrappedArray; + this.nameString = nameString; + this.nameNumber = nameNumber; + this.nameInteger = nameInteger; + this.nameBoolean = nameBoolean; + this.nameArray = nameArray; + this.nameWrappedArray = nameWrappedArray; + this.prefixString = prefixString; + this.prefixNumber = prefixNumber; + this.prefixInteger = prefixInteger; + this.prefixBoolean = prefixBoolean; + this.prefixArray = prefixArray; + this.prefixWrappedArray = prefixWrappedArray; + this.namespaceString = namespaceString; + this.namespaceNumber = namespaceNumber; + this.namespaceInteger = namespaceInteger; + this.namespaceBoolean = namespaceBoolean; + this.namespaceArray = namespaceArray; + this.namespaceWrappedArray = namespaceWrappedArray; + this.prefixNsString = prefixNsString; + this.prefixNsNumber = prefixNsNumber; + this.prefixNsInteger = prefixNsInteger; + this.prefixNsBoolean = prefixNsBoolean; + this.prefixNsArray = prefixNsArray; + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + public XmlItem attributeString(String attributeString) { this.attributeString = attributeString; return this; From efa2dc41d1f5dd31454486927f2f992fd6205615 Mon Sep 17 00:00:00 2001 From: jpfinne Date: Tue, 23 Apr 2024 11:57:35 +0200 Subject: [PATCH 2/5] Remove leftover from builder pattern branch --- .../languages/AbstractJavaCodegen.java | 2 +- .../codegen/languages/SpringCodegen.java | 1 + .../Java/libraries/microprofile/pojo.mustache | 2 +- .../scala-cask/bulidAndPublish.yml.mustache | 41 - .../org/openapitools/codegen/AllVarsTest.java | 20 - .../codegen/java/JavaClientCodegenTest.java | 43 +- .../java/spring/SpringCodegenTest.java | 12 +- .../php-nextgen/.openapi-generator/FILES | 2 +- .../echo_api/php-nextgen/phpunit.xml.dist | 4 +- .../echo_api/r/.openapi-generator/FILES | 2 +- .../R-httr2-wrapper/.openapi-generator/FILES | 2 +- .../petstore/R-httr2/.openapi-generator/FILES | 2 +- .../petstore/R/.openapi-generator/FILES | 2 +- .../openapitools/client/model/Category.java | 1 + .../client/model/ModelApiResponse.java | 1 + .../org/openapitools/client/model/Order.java | 1 + .../org/openapitools/client/model/Pet.java | 1 + .../org/openapitools/client/model/Tag.java | 1 + .../org/openapitools/client/model/User.java | 1 + .../openapitools/client/model/Category.java | 1 + .../client/model/ModelApiResponse.java | 1 + .../org/openapitools/client/model/Order.java | 1 + .../org/openapitools/client/model/Pet.java | 1 + .../org/openapitools/client/model/Tag.java | 1 + .../org/openapitools/client/model/User.java | 1 + .../openapitools/client/model/Category.java | 1 + .../client/model/ModelApiResponse.java | 1 + .../org/openapitools/client/model/Order.java | 1 + .../org/openapitools/client/model/Pet.java | 1 + .../org/openapitools/client/model/Tag.java | 1 + .../org/openapitools/client/model/User.java | 1 + .../openapitools/client/model/Category.java | 1 + .../client/model/ModelApiResponse.java | 1 + .../org/openapitools/client/model/Order.java | 1 + .../org/openapitools/client/model/Pet.java | 1 + .../org/openapitools/client/model/Tag.java | 1 + .../org/openapitools/client/model/User.java | 1 + .../openapitools/client/model/Category.java | 1 + .../client/model/ModelApiResponse.java | 1 + .../org/openapitools/client/model/Order.java | 1 + .../org/openapitools/client/model/Pet.java | 1 + .../org/openapitools/client/model/Tag.java | 1 + .../org/openapitools/client/model/User.java | 1 + .../.openapi-generator/FILES | 2 +- .../OpenAPIClient-php/phpunit.xml.dist | 4 +- .../.openapi-generator/FILES | 2 +- .../php/psr-18/.openapi-generator/FILES | 2 +- samples/documentation/html2/index.html | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 12 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../Org.OpenAPITools/Controllers/PetApi.cs | 8 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 4 +- .../Org.OpenAPITools/Controllers/UserApi.cs | 2 +- .../.github/workflows/bulidAndPublish.yml | 41 - .../src/main/resources/openapi.json | 1032 ----------------- .../main/scala/sample/cask/AppRoutes.scala | 52 - .../src/main/scala/sample/cask/BaseApp.scala | 59 - .../main/scala/sample/cask/ExampleApp.scala | 31 - .../scala/sample/cask/api/OpenApiRoutes.scala | 128 -- .../scala/sample/cask/api/PetRoutes.scala | 218 ---- .../scala/sample/cask/api/PetService.scala | 84 -- .../scala/sample/cask/api/StoreRoutes.scala | 109 -- .../scala/sample/cask/api/StoreService.scala | 58 - .../scala/sample/cask/api/UserRoutes.scala | 197 ---- .../scala/sample/cask/api/UserService.scala | 83 -- .../main/scala/sample/cask/api/package.scala | 167 --- .../scala/sample/cask/model/ApiResponse.scala | 55 - .../sample/cask/model/ApiResponseData.scala | 171 --- .../scala/sample/cask/model/Category.scala | 51 - .../sample/cask/model/CategoryData.scala | 153 --- .../main/scala/sample/cask/model/Order.scala | 76 -- .../scala/sample/cask/model/OrderData.scala | 245 ---- .../main/scala/sample/cask/model/Pet.scala | 77 -- .../scala/sample/cask/model/PetData.scala | 262 ----- .../main/scala/sample/cask/model/Tag.scala | 51 - .../scala/sample/cask/model/TagData.scala | 147 --- .../main/scala/sample/cask/model/User.scala | 76 -- .../scala/sample/cask/model/UserData.scala | 292 ----- .../scala/sample/cask/model/package.scala | 65 -- .../src/main/scala/sample/cask/package.scala | 24 - .../sample/cask/model/ApiResponseTest.scala | 33 - .../sample/cask/model/CategoryTest.scala | 33 - .../scala/sample/cask/model/OrderTest.scala | 34 - .../scala/sample/cask/model/PetTest.scala | 35 - .../scala/sample/cask/model/TagTest.scala | 33 - .../scala/sample/cask/model/UserTest.scala | 33 - 108 files changed, 145 insertions(+), 4395 deletions(-) delete mode 100644 modules/openapi-generator/src/main/resources/scala-cask/bulidAndPublish.yml.mustache delete mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/AllVarsTest.java delete mode 100644 samples/server/petstore/scala-cask/.github/workflows/bulidAndPublish.yml delete mode 100644 samples/server/petstore/scala-cask/src/main/resources/openapi.json delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/AppRoutes.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/BaseApp.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/ExampleApp.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/OpenApiRoutes.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetRoutes.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetService.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreRoutes.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreService.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserRoutes.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserService.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/package.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponse.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponseData.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Category.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/CategoryData.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Order.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/OrderData.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Pet.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/PetData.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Tag.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/TagData.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/User.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/UserData.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/package.scala delete mode 100644 samples/server/petstore/scala-cask/src/main/scala/sample/cask/package.scala delete mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/ApiResponseTest.scala delete mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/CategoryTest.scala delete mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/OrderTest.scala delete mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/PetTest.scala delete mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/TagTest.scala delete mode 100644 samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/UserTest.scala diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 66a1db39bc7e..a12d35674bf5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -684,7 +684,7 @@ public void processOpts() { }); } - private void setGeneratedConstructorWithAllArgs(boolean aValue) { + public void setGeneratedConstructorWithAllArgs(boolean aValue) { this.generatedConstructorWithAllArgs = aValue; } 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 b44c75f12700..fb225cf6e58e 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 @@ -28,6 +28,7 @@ import io.swagger.v3.oas.models.PathItem; import io.swagger.v3.oas.models.media.MediaType; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.tags.Tag; import java.io.File; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache index f9f13cac22f8..870bf32c1ca0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache @@ -170,4 +170,4 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi } return o.toString().replace("\n", "\n "); } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/scala-cask/bulidAndPublish.yml.mustache b/modules/openapi-generator/src/main/resources/scala-cask/bulidAndPublish.yml.mustache deleted file mode 100644 index ead5b4c0dcb6..000000000000 --- a/modules/openapi-generator/src/main/resources/scala-cask/bulidAndPublish.yml.mustache +++ /dev/null @@ -1,41 +0,0 @@ -name: Scala CI with sbt - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - build-and-publish: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - - name: Cache sbt dependencies - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - ~/.m2 - key: ${{{openbrackets}}} runner.os {{{closebrackets}}}-sbt-${{{openbrackets}}} hashFiles('**/*.sbt') {{{closebrackets}}} - restore-keys: | - ${{{openbrackets}}} runner.os {{{closebrackets}}}-sbt- - - - name: Build with sbt - run: sbt clean compile - - - name: Test with sbt - run: sbt test - - - name: Publish to GitHub Packages - run: sbt publish - env: - GITHUB_TOKEN: ${{{openbrackets}}} secrets.GITHUB_TOKEN {{{closebrackets}}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/AllVarsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/AllVarsTest.java deleted file mode 100644 index f7a1c8914c0a..000000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/AllVarsTest.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.openapitools.codegen; - -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.media.Schema; -import org.openapitools.codegen.languages.SpringCodegen; -import org.openapitools.codegen.model.ModelMap; -import org.openapitools.codegen.utils.ModelUtils; -import org.testng.annotations.Test; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class AllVarsTest { - - -} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 49e254d311d7..3fed0eb8ca42 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -69,7 +69,16 @@ import junit.framework.AssertionFailedError; import lombok.SneakyThrows; -import org.openapitools.codegen.*; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.CodegenResponse; +import org.openapitools.codegen.CodegenSecurity; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.languages.AbstractJavaCodegen; @@ -1891,38 +1900,6 @@ public void testMicroprofileGenerateCorrectJsonbCreator_issue12622() throws Exce .containsWithNameAndAttributes("JsonbProperty", ImmutableMap.of("value", "\"c\"")); } - @Test - public void testMicroprofileGenerateCorrectJacksonGenerator_issue18336() throws Exception { - Map properties = new HashMap<>(); - properties.put(JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "3.0"); - properties.put(CodegenConstants.SERIALIZATION_LIBRARY, JavaClientCodegen.SERIALIZATION_LIBRARY_JACKSON); - - File output = Files.createTempDirectory("test").toFile(); - output.deleteOnExit(); - - final CodegenConfigurator configurator = new CodegenConfigurator() - - .setAdditionalProperties(properties) - .setGeneratorName("java") - .setLibrary(JavaClientCodegen.MICROPROFILE) - .setInputSpec("src/test/resources/bugs/issue_18336.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); - - final ClientOptInput clientOptInput = configurator.toClientOptInput(); - DefaultGenerator generator = new DefaultGenerator(); - Map files = generator.opts(clientOptInput).generate().stream() - .collect(Collectors.toMap(File::getName, Function.identity())); - - JavaFileAssert.assertThat(files.get("Pet.java")) - .assertConstructor("String") - .assertConstructorAnnotations() - .containsWithName("JsonCreator") - .toConstructor() - .hasParameter("name") - .assertParameterAnnotations() - .containsWithNameAndAttributes("JsonProperty", ImmutableMap.of("value", "JSON_PROPERTY_NAME", "required", "true")); - } - @Test public void testJavaClientDefaultValues_issueNoNumber() throws Exception { Map properties = new HashMap<>(); 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 e07bedb1a06d..2ff39fe6d4f6 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 @@ -58,10 +58,18 @@ import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Collectors; - import org.apache.commons.lang3.StringUtils; import org.assertj.core.api.MapAssert; -import org.openapitools.codegen.*; +import org.openapitools.codegen.CliOption; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.java.assertions.JavaFileAssert; diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES index 53ad43f78dc2..c51141c743e7 100644 --- a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES @@ -24,13 +24,13 @@ docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md git_push.sh phpunit.xml.dist -src/ApiException.php src/Api/AuthApi.php src/Api/BodyApi.php src/Api/FormApi.php src/Api/HeaderApi.php src/Api/PathApi.php src/Api/QueryApi.php +src/ApiException.php src/Configuration.php src/HeaderSelector.php src/Model/Bird.php diff --git a/samples/client/echo_api/php-nextgen/phpunit.xml.dist b/samples/client/echo_api/php-nextgen/phpunit.xml.dist index cba878f52707..1135449a8d9b 100644 --- a/samples/client/echo_api/php-nextgen/phpunit.xml.dist +++ b/samples/client/echo_api/php-nextgen/phpunit.xml.dist @@ -2,8 +2,8 @@ - ./src\/Api - ./src\/Model + ./src/Api + ./src/Model diff --git a/samples/client/echo_api/r/.openapi-generator/FILES b/samples/client/echo_api/r/.openapi-generator/FILES index 79f7452245e1..cf3034e39d0c 100644 --- a/samples/client/echo_api/r/.openapi-generator/FILES +++ b/samples/client/echo_api/r/.openapi-generator/FILES @@ -5,7 +5,6 @@ .travis.yml DESCRIPTION NAMESPACE -README.md R/api_client.R R/api_response.R R/auth_api.R @@ -26,6 +25,7 @@ R/tag.R R/test_form_object_multipart_request_marker.R R/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.R R/test_query_style_form_explode_true_array_string_query_object_parameter.R +README.md docs/AuthApi.md docs/Bird.md docs/BodyApi.md diff --git a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES index 03da4aaacabb..379998b2a2b8 100644 --- a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES @@ -5,7 +5,6 @@ .travis.yml DESCRIPTION NAMESPACE -README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -40,6 +39,7 @@ R/user.R R/user_api.R R/whale.R R/zebra.R +README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/R-httr2/.openapi-generator/FILES b/samples/client/petstore/R-httr2/.openapi-generator/FILES index af8bc6f011d8..07243c898d78 100644 --- a/samples/client/petstore/R-httr2/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2/.openapi-generator/FILES @@ -5,7 +5,6 @@ .travis.yml DESCRIPTION NAMESPACE -README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -39,6 +38,7 @@ R/user.R R/user_api.R R/whale.R R/zebra.R +README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/R/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index d5c00e7a92f3..43681d7ddb2c 100644 --- a/samples/client/petstore/R/.openapi-generator/FILES +++ b/samples/client/petstore/R/.openapi-generator/FILES @@ -5,7 +5,6 @@ .travis.yml DESCRIPTION NAMESPACE -README.md R/allof_tag_api_response.R R/animal.R R/any_of_pig.R @@ -39,6 +38,7 @@ R/user.R R/user_api.R R/whale.R R/zebra.R +README.md docs/AllofTagApiResponse.md docs/Animal.md docs/AnyOfPig.md diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Category.java index 2d96b4ae1e43..1bedcba64e4e 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Category.java @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 5babfa9c7c73..ddfadbcf4100 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -158,3 +158,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Order.java index a0d60790f2ed..b4fd65862e2f 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Order.java @@ -293,3 +293,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Pet.java index 76f7cf9ad73c..cc6ecbaceecc 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Pet.java @@ -323,3 +323,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Tag.java index 8dbe24f53689..488983ce94f3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/Tag.java @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/User.java index eb52b7e1339d..2e70b010de39 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/model/User.java @@ -320,3 +320,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Category.java index aee5f670c011..f90df1d1bf3e 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Category.java @@ -112,3 +112,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index d97eccb6651d..d66986b54787 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -143,3 +143,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Order.java index 980b9eb151f1..b6c0aec0c23d 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Order.java @@ -268,3 +268,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Pet.java index 79e2385dcf60..defd4504bc76 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Pet.java @@ -290,3 +290,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Tag.java index 9b3265fdd66c..283def00e3e8 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/Tag.java @@ -112,3 +112,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/User.java index 67af1789d141..26490077dd3e 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/model/User.java @@ -295,3 +295,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Category.java index f288f561181b..aa7007ad5d56 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Category.java @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ModelApiResponse.java index b1a8ea4f25e5..44eea59b3eeb 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Order.java index 6518f71fce6e..d378038fc30f 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Order.java @@ -243,3 +243,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Pet.java index 50d982f0be7f..822179523dc9 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Pet.java @@ -265,3 +265,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Tag.java index 09ed3b6f9750..fecc6943bff3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/Tag.java @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/User.java index 9dce754424ba..e4f99ba38d39 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/model/User.java @@ -248,3 +248,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Category.java index f288f561181b..aa7007ad5d56 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Category.java @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java index b1a8ea4f25e5..44eea59b3eeb 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Order.java index 6518f71fce6e..d378038fc30f 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Order.java @@ -243,3 +243,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Pet.java index 50d982f0be7f..822179523dc9 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Pet.java @@ -265,3 +265,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Tag.java index 09ed3b6f9750..fecc6943bff3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/Tag.java @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/User.java index 9dce754424ba..e4f99ba38d39 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/main/java/org/openapitools/client/model/User.java @@ -248,3 +248,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Category.java index 1613327e6cf9..d34db0dec2e9 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Category.java @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 3d3a88c183d1..bb7520afb0b9 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Order.java index d7d4a68d8863..204dc0ceb793 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Order.java @@ -243,3 +243,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Pet.java index c0d7cc69efaa..7e3a9e4330e5 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Pet.java @@ -263,3 +263,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Tag.java index 541d748c8825..31b194923087 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Tag.java @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/User.java index 243616b646d0..da9326887b10 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/User.java @@ -248,3 +248,4 @@ private static String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } + diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES index 8d58dbc93e12..ec822fdd8838 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES @@ -63,7 +63,6 @@ docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh phpunit.xml.dist -src/ApiException.php src/Api/AnotherFakeApi.php src/Api/DefaultApi.php src/Api/FakeApi.php @@ -71,6 +70,7 @@ src/Api/FakeClassnameTags123Api.php src/Api/PetApi.php src/Api/StoreApi.php src/Api/UserApi.php +src/ApiException.php src/Configuration.php src/HeaderSelector.php src/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist index cba878f52707..1135449a8d9b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phpunit.xml.dist @@ -2,8 +2,8 @@ - ./src\/Api - ./src\/Model + ./src/Api + ./src/Model diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index 64737d51568c..80ecc7a7237f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -60,7 +60,6 @@ docs/Model/Tag.md docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh -lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -68,6 +67,7 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php +lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php lib/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php/psr-18/.openapi-generator/FILES b/samples/client/petstore/php/psr-18/.openapi-generator/FILES index c3884202a79d..34aee01b39f6 100644 --- a/samples/client/petstore/php/psr-18/.openapi-generator/FILES +++ b/samples/client/petstore/php/psr-18/.openapi-generator/FILES @@ -60,7 +60,6 @@ docs/Model/Tag.md docs/Model/TestInlineFreeformAdditionalPropertiesRequest.md docs/Model/User.md git_push.sh -lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -68,6 +67,7 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php +lib/ApiException.php lib/Configuration.php lib/DebugPlugin.php lib/HeaderSelector.php diff --git a/samples/documentation/html2/index.html b/samples/documentation/html2/index.html index fb2e49b8649d..cf96ef7cc25e 100644 --- a/samples/documentation/html2/index.html +++ b/samples/documentation/html2/index.html @@ -9512,7 +9512,7 @@

- + diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs index 9aa7c62b8e82..d4230ca5a4c5 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonSerializer.Deserialize(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs index edb6042856df..2c52f026791d 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs index 98e67314721d..5a0951513f3d 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs index 64c652ea1875..fae01d29a624 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 5a197da3156e..7dded4e0f16a 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ public virtual IActionResult AddPet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -162,7 +162,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -198,7 +198,7 @@ public virtual IActionResult UpdatePet([FromBody]Pet pet) //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -248,7 +248,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index c57b5fb3bd16..b925426c761d 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order order) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 3277ae43fcfd..6d7094c81a9d 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs index 562ee1b0ff43..419bab14d099 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -86,7 +86,7 @@ public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Requ //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -117,7 +117,7 @@ public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "[ {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}, {\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n} ]"; + exampleJson = "[ {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}, {\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n} ]"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -151,7 +151,7 @@ public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; + exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; exampleJson = "\n 123456789\n \n 123456789\n aeiou\n \n doggie\n \n aeiou\n \n \n \n 123456789\n aeiou\n \n \n aeiou\n"; var example = exampleJson != null @@ -226,7 +226,7 @@ public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]lo //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; + exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index 8dc20ddadfc4..8e493e399264 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Require //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -127,7 +127,7 @@ public virtual IActionResult PlaceOrder([FromBody]Order body) //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; + exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs index d1d13530b839..6669f0418cee 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -127,7 +127,7 @@ public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Requi //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; + exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/scala-cask/.github/workflows/bulidAndPublish.yml b/samples/server/petstore/scala-cask/.github/workflows/bulidAndPublish.yml deleted file mode 100644 index fef794246b02..000000000000 --- a/samples/server/petstore/scala-cask/.github/workflows/bulidAndPublish.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Scala CI with sbt - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - build-and-publish: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - - name: Cache sbt dependencies - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - ~/.m2 - key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }} - restore-keys: | - ${{ runner.os }}-sbt- - - - name: Build with sbt - run: sbt clean compile - - - name: Test with sbt - run: sbt test - - - name: Publish to GitHub Packages - run: sbt publish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/samples/server/petstore/scala-cask/src/main/resources/openapi.json b/samples/server/petstore/scala-cask/src/main/resources/openapi.json deleted file mode 100644 index 5c3f8dec9aa7..000000000000 --- a/samples/server/petstore/scala-cask/src/main/resources/openapi.json +++ /dev/null @@ -1,1032 +0,0 @@ -{ - "openapi" : "3.0.0", - "info" : { - "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", - "license" : { - "name" : "Apache-2.0", - "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "title" : "OpenAPI Petstore", - "version" : "1.0.0" - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - }, - "servers" : [ { - "url" : "http://petstore.swagger.io/v2" - } ], - "tags" : [ { - "description" : "Everything about your Pets", - "name" : "pet" - }, { - "description" : "Access to Petstore orders", - "name" : "store" - }, { - "description" : "Operations about user", - "name" : "user" - } ], - "paths" : { - "/pet" : { - "post" : { - "description" : "", - "operationId" : "addPet", - "requestBody" : { - "$ref" : "#/components/requestBodies/Pet" - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Add a new pet to the store", - "tags" : [ "pet" ] - }, - "put" : { - "description" : "", - "externalDocs" : { - "description" : "API documentation for the updatePet operation", - "url" : "http://petstore.swagger.io/v2/doc/updatePet" - }, - "operationId" : "updatePet", - "requestBody" : { - "$ref" : "#/components/requestBodies/Pet" - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Update an existing pet", - "tags" : [ "pet" ] - } - }, - "/pet/findByStatus" : { - "get" : { - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "parameters" : [ { - "deprecated" : true, - "description" : "Status values that need to be considered for filter", - "explode" : false, - "in" : "query", - "name" : "status", - "required" : true, - "schema" : { - "items" : { - "default" : "available", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "read:pets" ] - } ], - "summary" : "Finds Pets by status", - "tags" : [ "pet" ] - } - }, - "/pet/findByTags" : { - "get" : { - "deprecated" : true, - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "parameters" : [ { - "description" : "Tags to filter by", - "explode" : false, - "in" : "query", - "name" : "tags", - "required" : true, - "schema" : { - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "read:pets" ] - } ], - "summary" : "Finds Pets by tags", - "tags" : [ "pet" ] - } - }, - "/pet/{petId}" : { - "delete" : { - "description" : "", - "operationId" : "deletePet", - "parameters" : [ { - "explode" : false, - "in" : "header", - "name" : "api_key", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "simple" - }, { - "description" : "Pet id to delete", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Deletes a pet", - "tags" : [ "pet" ] - }, - "get" : { - "description" : "Returns a single pet", - "operationId" : "getPetById", - "parameters" : [ { - "description" : "ID of pet to return", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Find pet by ID", - "tags" : [ "pet" ] - }, - "post" : { - "description" : "", - "operationId" : "updatePetWithForm", - "parameters" : [ { - "description" : "ID of pet that needs to be updated", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/updatePetWithForm_request" - } - } - } - }, - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Updates a pet in the store with form data", - "tags" : [ "pet" ] - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "description" : "", - "operationId" : "uploadFile", - "parameters" : [ { - "description" : "ID of pet to update", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "$ref" : "#/components/schemas/uploadFile_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ApiResponse" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "uploads an image", - "tags" : [ "pet" ] - } - }, - "/store/inventory" : { - "get" : { - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "additionalProperties" : { - "format" : "int32", - "type" : "integer" - }, - "type" : "object" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Returns pet inventories by status", - "tags" : [ "store" ] - } - }, - "/store/order" : { - "post" : { - "description" : "", - "operationId" : "placeOrder", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "order placed for purchasing the pet", - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid Order" - } - }, - "summary" : "Place an order for a pet", - "tags" : [ "store" ] - } - }, - "/store/order/{orderId}" : { - "delete" : { - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "parameters" : [ { - "description" : "ID of the order that needs to be deleted", - "explode" : false, - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "summary" : "Delete purchase order by ID", - "tags" : [ "store" ] - }, - "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", - "operationId" : "getOrderById", - "parameters" : [ { - "description" : "ID of pet that needs to be fetched", - "explode" : false, - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "format" : "int64", - "maximum" : 5, - "minimum" : 1, - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "summary" : "Find purchase order by ID", - "tags" : [ "store" ] - } - }, - "/user" : { - "post" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Created user object", - "required" : true - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Create user", - "tags" : [ "user" ] - } - }, - "/user/createWithArray" : { - "post" : { - "description" : "", - "operationId" : "createUsersWithArrayInput", - "requestBody" : { - "$ref" : "#/components/requestBodies/UserArray" - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ] - } - }, - "/user/createWithList" : { - "post" : { - "description" : "", - "operationId" : "createUsersWithListInput", - "requestBody" : { - "$ref" : "#/components/requestBodies/UserArray" - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ] - } - }, - "/user/login" : { - "get" : { - "description" : "", - "operationId" : "loginUser", - "parameters" : [ { - "description" : "The user name for login", - "explode" : true, - "in" : "query", - "name" : "username", - "required" : true, - "schema" : { - "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", - "type" : "string" - }, - "style" : "form" - }, { - "description" : "The password for login in clear text", - "explode" : true, - "in" : "query", - "name" : "password", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "successful operation", - "headers" : { - "Set-Cookie" : { - "description" : "Cookie authentication key for use with the `api_key` apiKey authentication.", - "explode" : false, - "schema" : { - "example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly", - "type" : "string" - }, - "style" : "simple" - }, - "X-Rate-Limit" : { - "description" : "calls per hour allowed by the user", - "explode" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "style" : "simple" - }, - "X-Expires-After" : { - "description" : "date in UTC when token expires", - "explode" : false, - "schema" : { - "format" : "date-time", - "type" : "string" - }, - "style" : "simple" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "summary" : "Logs user into the system", - "tags" : [ "user" ] - } - }, - "/user/logout" : { - "get" : { - "description" : "", - "operationId" : "logoutUser", - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Logs out current logged in user session", - "tags" : [ "user" ] - } - }, - "/user/{username}" : { - "delete" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "parameters" : [ { - "description" : "The name that needs to be deleted", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Delete user", - "tags" : [ "user" ] - }, - "get" : { - "description" : "", - "operationId" : "getUserByName", - "parameters" : [ { - "description" : "The name that needs to be fetched. Use user1 for testing.", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "summary" : "Get user by user name", - "tags" : [ "user" ] - }, - "put" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "parameters" : [ { - "description" : "name that need to be deleted", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Updated user object", - "required" : true - }, - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Updated user", - "tags" : [ "user" ] - } - } - }, - "components" : { - "requestBodies" : { - "UserArray" : { - "content" : { - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true - }, - "Pet" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "Pet object that needs to be added to the store", - "required" : true - } - }, - "schemas" : { - "Order" : { - "description" : "An order for a pets from the pet store", - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "petId" : { - "format" : "int64", - "type" : "integer" - }, - "quantity" : { - "format" : "int32", - "type" : "integer" - }, - "shipDate" : { - "format" : "date-time", - "type" : "string" - }, - "status" : { - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ], - "type" : "string" - }, - "complete" : { - "default" : false, - "type" : "boolean" - } - }, - "title" : "Pet Order", - "type" : "object", - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "description" : "A category for a pet", - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", - "type" : "string" - } - }, - "title" : "Pet category", - "type" : "object", - "xml" : { - "name" : "Category" - } - }, - "User" : { - "description" : "A User who is purchasing from the pet store", - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "description" : "User Status", - "format" : "int32", - "type" : "integer" - } - }, - "title" : "a User", - "type" : "object", - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "description" : "A tag for a pet", - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "type" : "object", - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "description" : "A pet for sale in the pet store", - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "category" : { - "$ref" : "#/components/schemas/Category" - }, - "name" : { - "example" : "doggie", - "type" : "string" - }, - "photoUrls" : { - "items" : { - "type" : "string" - }, - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - } - }, - "tags" : { - "items" : { - "$ref" : "#/components/schemas/Tag" - }, - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - } - }, - "status" : { - "deprecated" : true, - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - } - }, - "required" : [ "name", "photoUrls" ], - "title" : "a Pet", - "type" : "object", - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "description" : "Describes the result of uploading an image resource", - "properties" : { - "code" : { - "format" : "int32", - "type" : "integer" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "type" : "object" - }, - "updatePetWithForm_request" : { - "properties" : { - "name" : { - "description" : "Updated name of the pet", - "type" : "string" - }, - "status" : { - "description" : "Updated status of the pet", - "type" : "string" - } - }, - "type" : "object" - }, - "uploadFile_request" : { - "properties" : { - "additionalMetadata" : { - "description" : "Additional data to pass to server", - "type" : "string" - }, - "file" : { - "description" : "file to upload", - "format" : "binary", - "type" : "string" - } - }, - "type" : "object" - } - }, - "securitySchemes" : { - "petstore_auth" : { - "flows" : { - "implicit" : { - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - } - }, - "type" : "oauth2" - }, - "api_key" : { - "in" : "header", - "name" : "api_key", - "type" : "apiKey" - } - } - } -} \ No newline at end of file diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/AppRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/AppRoutes.scala deleted file mode 100644 index 365015573714..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/AppRoutes.scala +++ /dev/null @@ -1,52 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.9.2" -//> using lib "com.lihaoyi::scalatags:0.8.2" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// this file was generated from app.mustache -package cask.groupId.server - -import _root_.sample.cask.model.* -import _root_.sample.cask.api.* - -/** - * This trait encapsulates the business logic (services) and the - * http routes which handle the http requests sent to those services. - * - * There are default 'not implemented' implementations for the service. - * - * If you wanted fine-grained control over the routes and services, you could - * extend the cask.MainRoutes and mix in this trait by using this: - * - * \{\{\{ - * override def allRoutes = appRoutes - * \}\}\} - * - * More typically, however, you would extend the 'BaseApp' class - */ -trait AppRoutes { - def appPetService : PetService = PetService() - def routeForPet : PetRoutes = PetRoutes(appPetService) - def appStoreService : StoreService = StoreService() - def routeForStore : StoreRoutes = StoreRoutes(appStoreService) - def appUserService : UserService = UserService() - def routeForUser : UserRoutes = UserRoutes(appUserService) - - def appRoutes = Seq( - routeForPet , - routeForStore , - routeForUser - ) -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/BaseApp.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/BaseApp.scala deleted file mode 100644 index c854b216d20f..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/BaseApp.scala +++ /dev/null @@ -1,59 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.9.2" -//> using lib "com.lihaoyi::scalatags:0.8.2" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// this file was generated from app.mustache -package cask.groupId.server - -import _root_.sample.cask.model.* -import _root_.sample.cask.api.* - -/** - * This class was created with the intention of being extended by some runnable object, - * passing in the custom business logic services - */ -class BaseApp( - override val appPetService : PetService = PetService(), - - override val appStoreService : StoreService = StoreService(), - - override val appUserService : UserService = UserService(), - override val port : Int = sys.env.get("PORT").map(_.toInt).getOrElse(8080)) extends cask.MainRoutes with AppRoutes { - - /** routes for the UI - * Subclasses can override to turn this off - */ - def openApiRoute: Option[cask.Routes] = Option(OpenApiRoutes(port)) - - override def allRoutes = appRoutes ++ openApiRoute - - - override def host: String = "0.0.0.0" - - def start() = locally { - initialize() - println(box(s""" 🚀 browse to localhost:$port 🚀 - | host : $host - | port : $port - | verbose : $verbose - | debugMode : $debugMode - |""".stripMargin)) - - // if java.awt.Desktop.isDesktopSupported then { - // java.awt.Desktop.getDesktop.browse(new java.net.URI(s"http://localhost:${port}")) - // } - } -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/ExampleApp.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/ExampleApp.scala deleted file mode 100644 index 9c5e733b73e3..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/ExampleApp.scala +++ /dev/null @@ -1,31 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.9.2" -//> using lib "com.lihaoyi::scalatags:0.8.2" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// this file was generated from app.mustache -package cask.groupId.server - -import _root_.sample.cask.model.* -import _root_.sample.cask.api.* - -/** - * This is an example of how you might extends BaseApp for a runnable application. - * - * See the README.md for how to create your own app - */ -object ExampleApp extends BaseApp() { - start() -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/OpenApiRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/OpenApiRoutes.scala deleted file mode 100644 index a991ce2aaf45..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/OpenApiRoutes.scala +++ /dev/null @@ -1,128 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// generated from openapiRoute.mustache -package sample.cask.api - -import cask.model.Response - -import java.nio.file.{Files, Path, Paths} - -/** - * This code will try and download the swagger UI static files on startup - * - * That behaviour can be altered by: - * - setting the environment variable SWAGGER_ON to false - * - setting the environment variable SWAGGER_UI_URL to either the URL of a swagger UI zip or setting it to the empty string - * - */ -object OpenApiRoutes { - - def swaggerUIUrl: Option[String] = { - // flag to turn SWAGGER off - def useSwaggerUI = sys.env.get("SWAGGER_ON").map(_.toBoolean).getOrElse(true) - - val defaultUrl = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.11.9.zip" - Option(sys.env.getOrElse("SWAGGER_UI_URL", defaultUrl)) - .map(_.trim) - .filterNot(_.isEmpty) - .filter(_ => useSwaggerUI) - } - def apply(localPort: Int) = new OpenApiRoutes(localPort, swaggerUIUrl) -} - -class OpenApiRoutes(localPort: Int, swaggerUrl: Option[String]) extends cask.Routes { - - def openApiDir = "ui" - - @cask.get("/") - def index() = cask.Redirect("/ui/index.html") - - @cask.staticFiles("/ui") - def staticUI() = openApiDir - - @cask.staticResources("/openapi.json") - def staticOpenApi() = "openapi.json" - - /** This code will try and download the swagger UI artefacts to a local directory to serve up - */ - object extract { - - def openApiDirPath: Path = Paths.get(openApiDir) - def hasSwagger = Files.exists(openApiDirPath) && Files.isDirectory(openApiDirPath) - - import java.io.{BufferedInputStream, FileOutputStream, InputStream} - import java.net.URL - import java.util.zip.{ZipEntry, ZipInputStream} - import scala.util.Using - - def apply(url: String) = { - if !hasSwagger then downloadAndExtractZip(url, openApiDir) - } - - def downloadAndExtractZip(url: String, outputDir: String): Unit = { - val urlConn = new URL(url).openConnection() - urlConn.setRequestProperty("User-Agent", "Mozilla/5.0") - - Using(urlConn.getInputStream) { inputStream => - val zipIn = new ZipInputStream(new BufferedInputStream(inputStream)) - LazyList.continually(zipIn.getNextEntry).takeWhile(_ != null).foreach { entry => - - def isDist = entry.getName.contains("/dist/") - def isNotMap = !entry.getName.endsWith(".map") - - if (!entry.isDirectory && isDist && isNotMap) { - val fileName = entry.getName.split("/").last - extractFile(entry.getName, zipIn, s"$outputDir/$fileName") - } - zipIn.closeEntry() - } - } - } - - def extractFile(name: String, zipIn: ZipInputStream, filePath: String): Unit = { - val fullPath = Paths.get(filePath).toAbsolutePath - if !Files.exists(fullPath.getParent) then { - Files.createDirectories(fullPath.getParent) - } - - // config hack - we replace the default url from this swagger conf to use our localhost - // - if name.endsWith("swagger-initializer.js") then { - val textLines = scala.io.Source.fromInputStream(zipIn).getLines().map { - case line if line.contains("url:") => - s""" url: "http://localhost:$localPort/openapi.json",""" - case line => line - } - - // keeping this compatible for java 8, where this is from >= java 11: - // Files.writeString(fullPath, textLines.mkString("\n")) - scala.util.Using(new java.io.PrintWriter(fullPath.toFile))(_.write(textLines.mkString("\n"))) - } else { - Using(new FileOutputStream(filePath)) { outputStream => - val buffer = new Array[Byte](1024) - LazyList - .continually(zipIn.read(buffer)) - .takeWhile(_ != -1) - .foreach(outputStream.write(buffer, 0, _)) - } - } - } - } - - // extract the swagger UI resources to our local directory - swaggerUrl.foreach(url => extract(url)) - - initialize() -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetRoutes.scala deleted file mode 100644 index 75d4799d6e33..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetRoutes.scala +++ /dev/null @@ -1,218 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.8.3" -//> using lib "com.lihaoyi::scalatags:0.12.0" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// this is generated from apiRoutes.mustache -package sample.cask.api - -import sample.cask.model.* - -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -import sample.cask.model.ApiResponse -import java.io.File -import sample.cask.model.Pet - -class PetRoutes(service : PetService) extends cask.Routes { - - // route group for routeWorkAroundForPOSTPet - @cask.post("/pet", true) - def routeWorkAroundForPOSTPet(request: cask.Request) = { - request.remainingPathSegments match { - case Seq() => addPet(request) - case Seq(petId) => updatePetWithForm(petId.toLong,request) - case Seq(petId,"uploadImage") => uploadFile(petId.toLong,request) - case _ => cask.Response("Not Found", statusCode = 404) - } - } - // route group for routeWorkAroundForGETPet - @cask.get("/pet", true) - def routeWorkAroundForGETPet(request: cask.Request,status : Seq[String] = Nil,tags : Seq[String] = Nil) = { - request.remainingPathSegments match { - case Seq("findByStatus") => findPetsByStatus(request,status) - case Seq("findByTags") => findPetsByTags(request,tags) - case Seq(petId) => getPetById(petId.toLong,request) - case _ => cask.Response("Not Found", statusCode = 404) - } - } - - /** Add a new pet to the store - * - */ - // conflicts with [/pet/{petId}, /pet/{petId}/uploadImage, /pet] after/pet, ignoring @cask.post("/pet") - def addPet(request: cask.Request) = { - // auth method petstore_auth : oauth2, keyParamName: - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - petData <- Parsed.eval(PetData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as Pet from >${request.bodyAsString}< : ${e}") /* not array or map */ - pet <- Parsed.fromTry(petData.validated(failFast)) - result <- Parsed.eval(service.addPet(pet)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : Pet) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Deletes a pet - * - */ - @cask.delete("/pet/:petId") - def deletePet(petId : Long, request: cask.Request) = { - // auth method petstore_auth : oauth2, keyParamName: - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - petId <- Parsed(petId) - apiKey <- request.headerSingleValueOptional("apiKey") - result <- Parsed.eval(service.deletePet(petId, apiKey)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Finds Pets by status - * - */ - // conflicts with [/pet/{petId}, /pet/findByStatus, /pet/findByTags] after/pet, ignoring @cask.get("/pet/findByStatus") - def findPetsByStatus(request: cask.Request, status : Seq[String]) = { - // auth method petstore_auth : oauth2, keyParamName: - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - result <- Parsed.eval(service.findPetsByStatus(status)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : List[Pet]) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Finds Pets by tags - * - */ - // conflicts with [/pet/{petId}, /pet/findByStatus, /pet/findByTags] after/pet, ignoring @cask.get("/pet/findByTags") - def findPetsByTags(request: cask.Request, tags : Seq[String]) = { - // auth method petstore_auth : oauth2, keyParamName: - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - result <- Parsed.eval(service.findPetsByTags(tags)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : List[Pet]) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Find pet by ID - * - */ - // conflicts with [/pet/{petId}, /pet/findByStatus, /pet/findByTags] after/pet, ignoring @cask.get("/pet/:petId") - def getPetById(petId : Long, request: cask.Request) = { - // auth method api_key : apiKey, keyParamName: api_key - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - petId <- Parsed(petId) - result <- Parsed.eval(service.getPetById(petId)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : Pet) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Update an existing pet - * - */ - @cask.put("/pet") - def updatePet(request: cask.Request) = { - // auth method petstore_auth : oauth2, keyParamName: - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - petData <- Parsed.eval(PetData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as Pet from >${request.bodyAsString}< : ${e}") /* not array or map */ - pet <- Parsed.fromTry(petData.validated(failFast)) - result <- Parsed.eval(service.updatePet(pet)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : Pet) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Updates a pet in the store with form data - * - */ - // conflicts with [/pet/{petId}, /pet/{petId}/uploadImage, /pet] after/pet, ignoring @cask.post("/pet/:petId") - def updatePetWithForm(petId : Long, request: cask.Request) = { - // auth method petstore_auth : oauth2, keyParamName: - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - petId <- Parsed(petId) - name <- request.formSingleValueOptional("name") - status <- request.formSingleValueOptional("status") - result <- Parsed.eval(service.updatePetWithForm(petId, name, status)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** uploads an image - * - */ - // conflicts with [/pet/{petId}, /pet/{petId}/uploadImage, /pet] after/pet, ignoring @cask.post("/pet/:petId/uploadImage") - def uploadFile(petId : Long, request: cask.Request) = { - // auth method petstore_auth : oauth2, keyParamName: - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - petId <- Parsed(petId) - additionalMetadata <- request.formSingleValueOptional("additionalMetadata") - file <- request.formValueAsFileOptional("file") - result <- Parsed.eval(service.uploadFile(petId, additionalMetadata, file)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : ApiResponse) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - - initialize() -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetService.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetService.scala deleted file mode 100644 index 7bed5032e2c7..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/PetService.scala +++ /dev/null @@ -1,84 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.8.3" -//> using lib "com.lihaoyi::scalatags:0.12.0" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// generated from apiService.mustache -package sample.cask.api - -import _root_.sample.cask.model.ApiResponse -import _root_.java.io.File -import _root_.sample.cask.model.Pet - -import _root_.sample.cask.model.* - -object PetService { - def apply() : PetService = new PetService { - override def addPet(pet : Pet) : Pet = ??? - override def deletePet(petId : Long, apiKey : Option[String]) : Unit = ??? - override def findPetsByStatus(status : Seq[String]) : List[Pet] = ??? - override def findPetsByTags(tags : Seq[String]) : List[Pet] = ??? - override def getPetById(petId : Long) : Pet = ??? - override def updatePet(pet : Pet) : Pet = ??? - override def updatePetWithForm(petId : Long, name : Option[String], status : Option[String]) : Unit = ??? - override def uploadFile(petId : Long, additionalMetadata : Option[String], file : Option[File]) : ApiResponse = ??? - } -} - -/** - * The Pet business-logic - */ -trait PetService { - /** Add a new pet to the store - * - * @return Pet - */ - def addPet(pet : Pet) : Pet - /** Deletes a pet - * - * @return - */ - def deletePet(petId : Long, apiKey : Option[String]) : Unit - /** Finds Pets by status - * - * @return List[Pet] - */ - def findPetsByStatus(status : Seq[String]) : List[Pet] - /** Finds Pets by tags - * - * @return List[Pet] - */ - def findPetsByTags(tags : Seq[String]) : List[Pet] - /** Find pet by ID - * - * @return Pet - */ - def getPetById(petId : Long) : Pet - /** Update an existing pet - * - * @return Pet - */ - def updatePet(pet : Pet) : Pet - /** Updates a pet in the store with form data - * - * @return - */ - def updatePetWithForm(petId : Long, name : Option[String], status : Option[String]) : Unit - /** uploads an image - * - * @return ApiResponse - */ - def uploadFile(petId : Long, additionalMetadata : Option[String], file : Option[File]) : ApiResponse -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreRoutes.scala deleted file mode 100644 index ede98a18d8b3..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreRoutes.scala +++ /dev/null @@ -1,109 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.8.3" -//> using lib "com.lihaoyi::scalatags:0.12.0" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// this is generated from apiRoutes.mustache -package sample.cask.api - -import sample.cask.model.* - -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -import sample.cask.model.Order - -class StoreRoutes(service : StoreService) extends cask.Routes { - - - /** Delete purchase order by ID - * - */ - @cask.delete("/store/order/:orderId") - def deleteOrder(orderId : String, request: cask.Request) = { - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - orderId <- Parsed(orderId) - result <- Parsed.eval(service.deleteOrder(orderId)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Returns pet inventories by status - * - */ - @cask.get("/store/inventory") - def getInventory(request: cask.Request) = { - // auth method api_key : apiKey, keyParamName: api_key - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - result <- Parsed.eval(service.getInventory()) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : Map[String, Int]) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Find purchase order by ID - * - */ - @cask.get("/store/order/:orderId") - def getOrderById(orderId : Long, request: cask.Request) = { - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - orderId <- Parsed(orderId) - result <- Parsed.eval(service.getOrderById(orderId)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : Order) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Place an order for a pet - * - */ - @cask.post("/store/order") - def placeOrder(request: cask.Request) = { - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - orderData <- Parsed.eval(OrderData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as Order from >${request.bodyAsString}< : ${e}") /* not array or map */ - order <- Parsed.fromTry(orderData.validated(failFast)) - result <- Parsed.eval(service.placeOrder(order)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : Order) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - - initialize() -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreService.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreService.scala deleted file mode 100644 index 231f03fc3fe7..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/StoreService.scala +++ /dev/null @@ -1,58 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.8.3" -//> using lib "com.lihaoyi::scalatags:0.12.0" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// generated from apiService.mustache -package sample.cask.api - -import _root_.sample.cask.model.Order - -import _root_.sample.cask.model.* - -object StoreService { - def apply() : StoreService = new StoreService { - override def deleteOrder(orderId : String) : Unit = ??? - override def getInventory() : Map[String, Int] = ??? - override def getOrderById(orderId : Long) : Order = ??? - override def placeOrder(order : Order) : Order = ??? - } -} - -/** - * The Store business-logic - */ -trait StoreService { - /** Delete purchase order by ID - * - * @return - */ - def deleteOrder(orderId : String) : Unit - /** Returns pet inventories by status - * - * @return Map[String, Int] - */ - def getInventory() : Map[String, Int] - /** Find purchase order by ID - * - * @return Order - */ - def getOrderById(orderId : Long) : Order - /** Place an order for a pet - * - * @return Order - */ - def placeOrder(order : Order) : Order -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserRoutes.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserRoutes.scala deleted file mode 100644 index 3bd483d6b802..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserRoutes.scala +++ /dev/null @@ -1,197 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.8.3" -//> using lib "com.lihaoyi::scalatags:0.12.0" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// this is generated from apiRoutes.mustache -package sample.cask.api - -import sample.cask.model.* - -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -import java.time.OffsetDateTime -import sample.cask.model.User - -class UserRoutes(service : UserService) extends cask.Routes { - - // route group for routeWorkAroundForGETUser - @cask.get("/user", true) - def routeWorkAroundForGETUser(request: cask.Request,username : Option[String] = None,password : Option[String] = None) = { - request.remainingPathSegments match { - case Seq("login") => loginUser(request,username.getOrElse(""), password.getOrElse("")) - case Seq("logout") => logoutUser(request) - case Seq(username) => getUserByName(username,request) - case _ => cask.Response("Not Found", statusCode = 404) - } - } - - /** Create user - * - */ - @cask.post("/user") - def createUser(request: cask.Request) = { - // auth method api_key : apiKey, keyParamName: api_key - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - userData <- Parsed.eval(UserData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as User from >${request.bodyAsString}< : ${e}") /* not array or map */ - user <- Parsed.fromTry(userData.validated(failFast)) - result <- Parsed.eval(service.createUser(user)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Creates list of users with given input array - * - */ - @cask.post("/user/createWithArray") - def createUsersWithArrayInput(request: cask.Request) = { - // auth method api_key : apiKey, keyParamName: api_key - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - user <- Parsed.fromTry(UserData.manyFromJsonStringValidated(request.bodyAsString)).mapError(e => s"Error parsing json as an array of User from >${request.bodyAsString}< : ${e}") /* array */ - result <- Parsed.eval(service.createUsersWithArrayInput(user)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Creates list of users with given input array - * - */ - @cask.post("/user/createWithList") - def createUsersWithListInput(request: cask.Request) = { - // auth method api_key : apiKey, keyParamName: api_key - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - user <- Parsed.fromTry(UserData.manyFromJsonStringValidated(request.bodyAsString)).mapError(e => s"Error parsing json as an array of User from >${request.bodyAsString}< : ${e}") /* array */ - result <- Parsed.eval(service.createUsersWithListInput(user)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Delete user - * - */ - @cask.delete("/user/:username") - def deleteUser(username : String, request: cask.Request) = { - // auth method api_key : apiKey, keyParamName: api_key - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - username <- Parsed(username) - result <- Parsed.eval(service.deleteUser(username)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Get user by user name - * - */ - // conflicts with [/user/{username}, /user/login, /user/logout] after/user, ignoring @cask.get("/user/:username") - def getUserByName(username : String, request: cask.Request) = { - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - username <- Parsed(username) - result <- Parsed.eval(service.getUserByName(username)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : User) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Logs user into the system - * - */ - // conflicts with [/user/{username}, /user/login, /user/logout] after/user, ignoring @cask.get("/user/login") - def loginUser(request: cask.Request, username : String, password : String) = { - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - result <- Parsed.eval(service.loginUser(username, password)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(value : String) => cask.Response(data = write(value), 200, headers = Seq("Content-Type" -> "application/json")) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Logs out current logged in user session - * - */ - // conflicts with [/user/{username}, /user/login, /user/logout] after/user, ignoring @cask.get("/user/logout") - def logoutUser(request: cask.Request) = { - // auth method api_key : apiKey, keyParamName: api_key - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - result <- Parsed.eval(service.logoutUser()) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - /** Updated user - * - */ - @cask.put("/user/:username") - def updateUser(username : String, request: cask.Request) = { - // auth method api_key : apiKey, keyParamName: api_key - - def failFast = request.queryParams.keySet.contains("failFast") - - val result = for { - username <- Parsed(username) - userData <- Parsed.eval(UserData.fromJsonString(request.bodyAsString)).mapError(e => s"Error parsing json as User from >${request.bodyAsString}< : ${e}") /* not array or map */ - user <- Parsed.fromTry(userData.validated(failFast)) - result <- Parsed.eval(service.updateUser(username, user)) - } yield result - - result match { - case Left(error) => cask.Response(error, 500) - case Right(other) => cask.Response(s"$other", 200) - } - } - - initialize() -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserService.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserService.scala deleted file mode 100644 index 4872f31e3c7d..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/UserService.scala +++ /dev/null @@ -1,83 +0,0 @@ -//> using scala "3.3.1" -//> using lib "com.lihaoyi::cask:0.8.3" -//> using lib "com.lihaoyi::scalatags:0.12.0" -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - - -// generated from apiService.mustache -package sample.cask.api - -import _root_.java.time.OffsetDateTime -import _root_.sample.cask.model.User - -import _root_.sample.cask.model.* - -object UserService { - def apply() : UserService = new UserService { - override def createUser(user : User) : Unit = ??? - override def createUsersWithArrayInput(user : Seq[User]) : Unit = ??? - override def createUsersWithListInput(user : Seq[User]) : Unit = ??? - override def deleteUser(username : String) : Unit = ??? - override def getUserByName(username : String) : User = ??? - override def loginUser(username : String, password : String) : String = ??? - override def logoutUser() : Unit = ??? - override def updateUser(username : String, user : User) : Unit = ??? - } -} - -/** - * The User business-logic - */ -trait UserService { - /** Create user - * - * @return - */ - def createUser(user : User) : Unit - /** Creates list of users with given input array - * - * @return - */ - def createUsersWithArrayInput(user : Seq[User]) : Unit - /** Creates list of users with given input array - * - * @return - */ - def createUsersWithListInput(user : Seq[User]) : Unit - /** Delete user - * - * @return - */ - def deleteUser(username : String) : Unit - /** Get user by user name - * - * @return User - */ - def getUserByName(username : String) : User - /** Logs user into the system - * - * @return String - */ - def loginUser(username : String, password : String) : String - /** Logs out current logged in user session - * - * @return - */ - def logoutUser() : Unit - /** Updated user - * - * @return - */ - def updateUser(username : String, user : User) : Unit -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/package.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/package.scala deleted file mode 100644 index ab25a84875ab..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/api/package.scala +++ /dev/null @@ -1,167 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -package sample.cask.api - - -import cask.FormEntry -import io.undertow.server.handlers.form.{FormData, FormParserFactory} - -import java.io.File -import scala.jdk.CollectionConverters.* -import java.time.LocalDate -import java.util.UUID -import scala.reflect.ClassTag -import scala.util.* - -// needed for BigDecimal params -given cask.endpoints.QueryParamReader.SimpleParam[BigDecimal](BigDecimal.apply) - -// a parsed value from an HTTP request -opaque type Parsed[A] = Either[String, A] - -object Parsed { - def apply[A](value: A): Parsed[A] = Right(value) - - def eval[A](value: => A): Parsed[A] = Try(value) match { - case Failure(exp) => Left(s"Error: ${exp.getMessage}") - case Success(ok) => Right(ok) - } - - def fromTry[A](value : Try[A]) = value match { - case Failure(err) => Left(err.getMessage) - case Success(ok) => Right(ok) - } - - def fail[A](msg: String): Parsed[A] = Left(msg) - - def optionalValue(map: Map[String, collection.Seq[String]], key: String): Parsed[Option[String]] = { - map.get(key) match { - case Some(Seq(only: String)) => Parsed(Option(only)) - case Some(Seq()) => Parsed(None) - case Some(many) => Parsed.fail(s"${many.size} values set for '$key'") - case None => Parsed(None) - } - } - - def singleValue(map: Map[String, collection.Seq[String]], key : String): Parsed[String] = { - map.get(key) match { - case Some(Seq(only : String)) => Parsed(only) - case Some(Seq()) => Parsed("") - case Some(many) => Parsed.fail(s"${many.size} values set for '$key'") - case None => Parsed.fail(s"required '$key' was not set") - } - } - - def manyValues(map: Map[String, collection.Seq[String]], key : String, required: Boolean): Parsed[List[String]] = { - map.get(key) match { - case Some(many) => Parsed(many.toList) - case None if required => Parsed.fail(s"required '$key' was not set") - case None => Parsed(Nil) - } - } -} - -extension[A] (parsed: Parsed[A]) { - def toEither: Either[String, A] = parsed - - def asLong(using ev : A =:= String): Parsed[Long] = as[Long](_.toLongOption) - def asBoolean(using ev : A =:= String): Parsed[Boolean] = as[Boolean](_.toBooleanOption) - def asInt(using ev : A =:= String): Parsed[Int] = as[Int](_.toIntOption) - def asByte(using ev : A =:= String): Parsed[Byte] = as[Byte](_.toByteOption) - def asUuid(using ev : A =:= String): Parsed[UUID] = as[UUID](x => Try(UUID.fromString(x)).toOption) - def asFloat(using ev : A =:= String): Parsed[Float] = as[Float](_.toFloatOption) - def asDouble(using ev : A =:= String): Parsed[Double] = as[Double](_.toDoubleOption) - def asDate(using ev: A =:= String): Parsed[LocalDate] = as[LocalDate](x => Try(LocalDate.parse(x)).toOption) - - private def as[B : ClassTag](f : String => Option[B])(using ev : A =:= String): Parsed[B] = parsed.flatMap { str => - f(ev(str)) match { - case None => Parsed.fail(s"'$str' cannot be parsed as a ${implicitly[ClassTag[B]].runtimeClass}") - case Some(x) => Parsed(x) - } - } - - - def mapError(f : String => String) : Parsed[A] = parsed match { - case Left(msg) => Left(f(msg)) - case right => right - } - - def map[B](f: A => B): Parsed[B] = parsed match { - case Right(value) => Right(f(value)) - case Left(err) => Left(err) - } - def flatMap[B](f : A => Parsed[B]): Parsed[B] = parsed match { - case Right(value) => f(value) - case Left(err) => Left(err) - } -} - - -extension (request: cask.Request) { - - def formSingleValueRequired(paramName: String): Parsed[String] = { - val data = formDataForKey(paramName).map(_.getValue).toSeq - Parsed.singleValue(Map(paramName -> data), paramName) - } - def formSingleValueOptional(paramName: String): Parsed[Option[String]] = { - val data = formDataForKey(paramName).map(_.getValue).toSeq - Parsed.optionalValue(Map(paramName -> data), paramName) - } - - def formValueAsFileOptional(paramName: String): Parsed[Option[File]] = { - val data = formDataForKey(paramName) - data.map(_.getFileItem.getFile.toFile).toSeq match { - case Seq() => Parsed(None) - case Seq(file) => Parsed(Option(file)) - case many => Parsed.fail(s"${many.size} file values set for '$paramName'") - } - } - - def formValueAsFileRequired(paramName: String): Parsed[File] = { - val data = formDataForKey(paramName) - data.map(_.getFileItem.getFile.toFile).toSeq match { - case Seq() => Parsed.fail(s"No file form data was submitted for '$paramName'. The submitted form keys were: ${formDataKeys.mkString(",")}") - case Seq(file) => Parsed(file) - case many => Parsed.fail(s"${many.size} file values set for '$paramName'") - } - } - - def formManyValues(paramName: String, required: Boolean): Parsed[List[String]] = { - val data = formDataForKey(paramName).map(_.getValue).toSeq - Parsed.manyValues(Map(paramName -> data), paramName, required) - } - - def formData: FormData = FormParserFactory.builder().build().createParser(request.exchange).parseBlocking() - - def formDataKeys: Iterator[String] = formData.iterator().asScala - - def formDataForKey(paramName: String): Iterable[FormData.FormValue] = formData.get(paramName).asScala - - def headerSingleValueOptional(paramName: String): Parsed[Option[String]] = Parsed.optionalValue(request.headers, paramName) - def headerSingleValueRequired(paramName: String): Parsed[String] = Parsed.singleValue(request.headers, paramName) - - def headerManyValues(paramName: String, required: Boolean): Parsed[List[String]] = Parsed.manyValues(request.headers, paramName, required) - - def bodyAsString = new String(request.readAllBytes(), "UTF-8") - - def pathValue(index: Int, paramName: String, required : Boolean): Parsed[String] = { - request - .remainingPathSegments - .lift(index) match { - case Some(value) => Right(value) - case None if required => Left(s"'$paramName'' is a required path parameter at path position $index") - case None => Right("") - } - } -} diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponse.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponse.scala deleted file mode 100644 index ff5d8abaa145..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponse.scala +++ /dev/null @@ -1,55 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using model.mustache -package sample.cask.model -import scala.util.control.NonFatal - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -case class ApiResponse( - code: Option[Int] = None , - - `type`: Option[String] = None , - - message: Option[String] = None - - ) { - - def asJson: String = asData.asJson - - def asData : ApiResponseData = { - ApiResponseData( - code = code.getOrElse(0), - `type` = `type`.getOrElse(""), - message = message.getOrElse("") - ) - } - -} - -object ApiResponse{ - - given RW[ApiResponse] = ApiResponseData.readWriter.bimap[ApiResponse](_.asData, _.asModel) - - enum Fields(fieldName : String) extends Field(fieldName) { - case code extends Fields("code") - case `type` extends Fields("`type`") - case message extends Fields("message") - } - - -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponseData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponseData.scala deleted file mode 100644 index b93b7eb44ef8..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/ApiResponseData.scala +++ /dev/null @@ -1,171 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using modelData.mustache -package sample.cask.model -import scala.util.control.NonFatal -import scala.util.* - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -/** ApiResponseData a data transfer object, primarily for simple json serialisation. - * It has no validation - there may be nulls, values out of range, etc - */ -case class ApiResponseData( - code: Int = 0 , - - `type`: String = "" , - - message: String = "" - - ) { - - def asJson: String = write(this) - - def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { - val errors = scala.collection.mutable.ListBuffer[ValidationError]() - // ================== - // code - - - - - - - - - - - - - - - - - // ================== - // `type` - - - - - - - - - - - - - - - - - // ================== - // message - - - - - - - - - - - - - - - - - errors.toSeq - } - - def validated(failFast : Boolean = false) : scala.util.Try[ApiResponse] = { - validationErrors(Vector(), failFast) match { - case Seq() => Success(asModel) - case first +: theRest => Failure(ValidationErrors(first, theRest)) - } - } - - /** use 'validated' to check validation */ - def asModel : ApiResponse = { - ApiResponse( - code = Option( - code - ) - , - `type` = Option( - `type` - ) - , - message = Option( - message - ) - - ) - } -} - -object ApiResponseData { - - given readWriter : RW[ApiResponseData] = macroRW - - def fromJsonString(jason : String) : ApiResponseData = try { - read[ApiResponseData](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") - } - - def manyFromJsonString(jason : String) : Seq[ApiResponseData] = try { - read[List[ApiResponseData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") - } - - def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[ApiResponse]] = { - Try(manyFromJsonString(jason)).flatMap { list => - list.zipWithIndex.foldLeft(Try(Vector[ApiResponse]())) { - case (Success(list), (next, i)) => - next.validated(failFast) match { - case Success(ok) => Success(list :+ ok) - case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } - - def mapFromJsonString(jason : String) : Map[String, ApiResponseData] = try { - read[Map[String, ApiResponseData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") - } - - - def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, ApiResponse]] = { - Try(mapFromJsonString(jason)).flatMap { map => - map.foldLeft(Try(Map[String, ApiResponse]())) { - case (Success(map), (key, next)) => - next.validated(failFast) match { - case Success(ok) => Success(map.updated(key, ok)) - case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Category.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Category.scala deleted file mode 100644 index d0bf01a2861f..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Category.scala +++ /dev/null @@ -1,51 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using model.mustache -package sample.cask.model -import scala.util.control.NonFatal - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -case class Category( - id: Option[Long] = None , - - name: Option[String] = None - - ) { - - def asJson: String = asData.asJson - - def asData : CategoryData = { - CategoryData( - id = id.getOrElse(0), - name = name.getOrElse("") - ) - } - -} - -object Category{ - - given RW[Category] = CategoryData.readWriter.bimap[Category](_.asData, _.asModel) - - enum Fields(fieldName : String) extends Field(fieldName) { - case id extends Fields("id") - case name extends Fields("name") - } - - -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/CategoryData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/CategoryData.scala deleted file mode 100644 index 77a834683a8a..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/CategoryData.scala +++ /dev/null @@ -1,153 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using modelData.mustache -package sample.cask.model -import scala.util.control.NonFatal -import scala.util.* - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -/** CategoryData a data transfer object, primarily for simple json serialisation. - * It has no validation - there may be nulls, values out of range, etc - */ -case class CategoryData( - id: Long = 0 , - - name: String = "" - - ) { - - def asJson: String = write(this) - - def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { - val errors = scala.collection.mutable.ListBuffer[ValidationError]() - // ================== - // id - - - - - - - - - - - - - - - - - // ================== - // name - // validate against pattern '^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$' - if (errors.isEmpty || !failFast) { - val regex = """^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$""" - if name == null || !regex.r.matches(name) then - errors += ValidationError(path :+ Category.Fields.name, s"value '$name' doesn't match pattern $regex") - } - - - - - - - - - - - - - - - - - errors.toSeq - } - - def validated(failFast : Boolean = false) : scala.util.Try[Category] = { - validationErrors(Vector(), failFast) match { - case Seq() => Success(asModel) - case first +: theRest => Failure(ValidationErrors(first, theRest)) - } - } - - /** use 'validated' to check validation */ - def asModel : Category = { - Category( - id = Option( - id - ) - , - name = Option( - name - ) - - ) - } -} - -object CategoryData { - - given readWriter : RW[CategoryData] = macroRW - - def fromJsonString(jason : String) : CategoryData = try { - read[CategoryData](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") - } - - def manyFromJsonString(jason : String) : Seq[CategoryData] = try { - read[List[CategoryData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") - } - - def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[Category]] = { - Try(manyFromJsonString(jason)).flatMap { list => - list.zipWithIndex.foldLeft(Try(Vector[Category]())) { - case (Success(list), (next, i)) => - next.validated(failFast) match { - case Success(ok) => Success(list :+ ok) - case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } - - def mapFromJsonString(jason : String) : Map[String, CategoryData] = try { - read[Map[String, CategoryData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") - } - - - def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, Category]] = { - Try(mapFromJsonString(jason)).flatMap { map => - map.foldLeft(Try(Map[String, Category]())) { - case (Success(map), (key, next)) => - next.validated(failFast) match { - case Success(ok) => Success(map.updated(key, ok)) - case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Order.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Order.scala deleted file mode 100644 index 85bda97b8152..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Order.scala +++ /dev/null @@ -1,76 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using model.mustache -package sample.cask.model -import java.time.OffsetDateTime -import scala.util.control.NonFatal - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -case class Order( - id: Option[Long] = None , - - petId: Option[Long] = None , - - quantity: Option[Int] = None , - - shipDate: Option[OffsetDateTime] = None , - - /* Order Status */ - status: Option[Order.StatusEnum] = None , - - complete: Option[Boolean] = None - - ) { - - def asJson: String = asData.asJson - - def asData : OrderData = { - OrderData( - id = id.getOrElse(0), - petId = petId.getOrElse(0), - quantity = quantity.getOrElse(0), - shipDate = shipDate.getOrElse(null), - status = status.getOrElse(null), - complete = complete.getOrElse(false) - ) - } - -} - -object Order{ - - given RW[Order] = OrderData.readWriter.bimap[Order](_.asData, _.asModel) - - enum Fields(fieldName : String) extends Field(fieldName) { - case id extends Fields("id") - case petId extends Fields("petId") - case quantity extends Fields("quantity") - case shipDate extends Fields("shipDate") - case status extends Fields("status") - case complete extends Fields("complete") - } - - // baseName=status - // nameInCamelCase = status - enum StatusEnum derives ReadWriter { - case placed - case approved - case delivered - } - -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/OrderData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/OrderData.scala deleted file mode 100644 index 0de58a7f0b3b..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/OrderData.scala +++ /dev/null @@ -1,245 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using modelData.mustache -package sample.cask.model -import java.time.OffsetDateTime -import scala.util.control.NonFatal -import scala.util.* - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -/** OrderData a data transfer object, primarily for simple json serialisation. - * It has no validation - there may be nulls, values out of range, etc - */ -case class OrderData( - id: Long = 0 , - - petId: Long = 0 , - - quantity: Int = 0 , - - shipDate: OffsetDateTime = null , - - /* Order Status */ - status: Order.StatusEnum = null , - - complete: Boolean = false - - ) { - - def asJson: String = write(this) - - def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { - val errors = scala.collection.mutable.ListBuffer[ValidationError]() - // ================== - // id - - - - - - - - - - - - - - - - - // ================== - // petId - - - - - - - - - - - - - - - - - // ================== - // quantity - - - - - - - - - - - - - - - - - // ================== - // shipDate - - - - - - - - - - - - - - - - - // ================== - // status - - - - - - - - - - - - - - - - - // ================== - // complete - - - - - - - - - - - - - - - - - errors.toSeq - } - - def validated(failFast : Boolean = false) : scala.util.Try[Order] = { - validationErrors(Vector(), failFast) match { - case Seq() => Success(asModel) - case first +: theRest => Failure(ValidationErrors(first, theRest)) - } - } - - /** use 'validated' to check validation */ - def asModel : Order = { - Order( - id = Option( - id - ) - , - petId = Option( - petId - ) - , - quantity = Option( - quantity - ) - , - shipDate = Option( - shipDate - ) - , - status = Option( - status - ) - , - complete = Option( - complete - ) - - ) - } -} - -object OrderData { - - given readWriter : RW[OrderData] = macroRW - - def fromJsonString(jason : String) : OrderData = try { - read[OrderData](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") - } - - def manyFromJsonString(jason : String) : Seq[OrderData] = try { - read[List[OrderData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") - } - - def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[Order]] = { - Try(manyFromJsonString(jason)).flatMap { list => - list.zipWithIndex.foldLeft(Try(Vector[Order]())) { - case (Success(list), (next, i)) => - next.validated(failFast) match { - case Success(ok) => Success(list :+ ok) - case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } - - def mapFromJsonString(jason : String) : Map[String, OrderData] = try { - read[Map[String, OrderData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") - } - - - def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, Order]] = { - Try(mapFromJsonString(jason)).flatMap { map => - map.foldLeft(Try(Map[String, Order]())) { - case (Success(map), (key, next)) => - next.validated(failFast) match { - case Success(ok) => Success(map.updated(key, ok)) - case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Pet.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Pet.scala deleted file mode 100644 index 068f593303c4..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Pet.scala +++ /dev/null @@ -1,77 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using model.mustache -package sample.cask.model -import sample.cask.model.Category -import sample.cask.model.Tag -import scala.util.control.NonFatal - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -case class Pet( - id: Option[Long] = None , - - category: Option[Category] = None , - - name: String, - - photoUrls: Seq[String], - - tags: Seq[Tag] = Nil , - - /* pet status in the store */ - status: Option[Pet.StatusEnum] = None - - ) { - - def asJson: String = asData.asJson - - def asData : PetData = { - PetData( - id = id.getOrElse(0), - category = category.map(_.asData).getOrElse(null), - name = name, - photoUrls = photoUrls, - tags = tags.map(_.asData), - status = status.getOrElse(null) - ) - } - -} - -object Pet{ - - given RW[Pet] = PetData.readWriter.bimap[Pet](_.asData, _.asModel) - - enum Fields(fieldName : String) extends Field(fieldName) { - case id extends Fields("id") - case category extends Fields("category") - case name extends Fields("name") - case photoUrls extends Fields("photoUrls") - case tags extends Fields("tags") - case status extends Fields("status") - } - - // baseName=status - // nameInCamelCase = status - enum StatusEnum derives ReadWriter { - case available - case pending - case sold - } - -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/PetData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/PetData.scala deleted file mode 100644 index db6a3e1a5124..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/PetData.scala +++ /dev/null @@ -1,262 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using modelData.mustache -package sample.cask.model -import sample.cask.model.Category -import sample.cask.model.Tag -import scala.util.control.NonFatal -import scala.util.* - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -/** PetData a data transfer object, primarily for simple json serialisation. - * It has no validation - there may be nulls, values out of range, etc - */ -case class PetData( - id: Long = 0 , - - category: CategoryData = null , - - name: String, - - photoUrls: Seq[String], - - tags: Seq[TagData] = Nil , - - /* pet status in the store */ - status: Pet.StatusEnum = null - - ) { - - def asJson: String = write(this) - - def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { - val errors = scala.collection.mutable.ListBuffer[ValidationError]() - // ================== - // id - - - - - - - - - - - - - - - - - // ================== - // category - - - - - - - - - - - - - - - - // validating category - if (errors.isEmpty || !failFast) { - if category != null then errors ++= category.validationErrors(path :+ Pet.Fields.category, failFast) - } - - // ================== - // name - - - - - - - - - - - - - - - - - // ================== - // photoUrls - - - - - - - - - - - - - - - - - // ================== - // tags - - - - - - - - - - - - - - - - if (errors.isEmpty || !failFast) { - if (tags != null) { - tags.zipWithIndex.foreach { - case (value, i) if errors.isEmpty || !failFast => - errors ++= value.validationErrors( - path :+ Pet.Fields.tags :+ Field(i.toString), - failFast) - case (value, i) => - } - } - } - - - // ================== - // status - - - - - - - - - - - - - - - - - errors.toSeq - } - - def validated(failFast : Boolean = false) : scala.util.Try[Pet] = { - validationErrors(Vector(), failFast) match { - case Seq() => Success(asModel) - case first +: theRest => Failure(ValidationErrors(first, theRest)) - } - } - - /** use 'validated' to check validation */ - def asModel : Pet = { - Pet( - id = Option( - id - ) - , - category = Option( - category - ) - .map(_.asModel), - name = - name - - , - photoUrls = - photoUrls - - , - tags = - tags - - .map(_.asModel), - status = Option( - status - ) - - ) - } -} - -object PetData { - - given readWriter : RW[PetData] = macroRW - - def fromJsonString(jason : String) : PetData = try { - read[PetData](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") - } - - def manyFromJsonString(jason : String) : Seq[PetData] = try { - read[List[PetData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") - } - - def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[Pet]] = { - Try(manyFromJsonString(jason)).flatMap { list => - list.zipWithIndex.foldLeft(Try(Vector[Pet]())) { - case (Success(list), (next, i)) => - next.validated(failFast) match { - case Success(ok) => Success(list :+ ok) - case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } - - def mapFromJsonString(jason : String) : Map[String, PetData] = try { - read[Map[String, PetData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") - } - - - def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, Pet]] = { - Try(mapFromJsonString(jason)).flatMap { map => - map.foldLeft(Try(Map[String, Pet]())) { - case (Success(map), (key, next)) => - next.validated(failFast) match { - case Success(ok) => Success(map.updated(key, ok)) - case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Tag.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Tag.scala deleted file mode 100644 index a8bd2a358669..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/Tag.scala +++ /dev/null @@ -1,51 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using model.mustache -package sample.cask.model -import scala.util.control.NonFatal - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -case class Tag( - id: Option[Long] = None , - - name: Option[String] = None - - ) { - - def asJson: String = asData.asJson - - def asData : TagData = { - TagData( - id = id.getOrElse(0), - name = name.getOrElse("") - ) - } - -} - -object Tag{ - - given RW[Tag] = TagData.readWriter.bimap[Tag](_.asData, _.asModel) - - enum Fields(fieldName : String) extends Field(fieldName) { - case id extends Fields("id") - case name extends Fields("name") - } - - -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/TagData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/TagData.scala deleted file mode 100644 index e8c66334bcb3..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/TagData.scala +++ /dev/null @@ -1,147 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using modelData.mustache -package sample.cask.model -import scala.util.control.NonFatal -import scala.util.* - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -/** TagData a data transfer object, primarily for simple json serialisation. - * It has no validation - there may be nulls, values out of range, etc - */ -case class TagData( - id: Long = 0 , - - name: String = "" - - ) { - - def asJson: String = write(this) - - def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { - val errors = scala.collection.mutable.ListBuffer[ValidationError]() - // ================== - // id - - - - - - - - - - - - - - - - - // ================== - // name - - - - - - - - - - - - - - - - - errors.toSeq - } - - def validated(failFast : Boolean = false) : scala.util.Try[Tag] = { - validationErrors(Vector(), failFast) match { - case Seq() => Success(asModel) - case first +: theRest => Failure(ValidationErrors(first, theRest)) - } - } - - /** use 'validated' to check validation */ - def asModel : Tag = { - Tag( - id = Option( - id - ) - , - name = Option( - name - ) - - ) - } -} - -object TagData { - - given readWriter : RW[TagData] = macroRW - - def fromJsonString(jason : String) : TagData = try { - read[TagData](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") - } - - def manyFromJsonString(jason : String) : Seq[TagData] = try { - read[List[TagData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") - } - - def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[Tag]] = { - Try(manyFromJsonString(jason)).flatMap { list => - list.zipWithIndex.foldLeft(Try(Vector[Tag]())) { - case (Success(list), (next, i)) => - next.validated(failFast) match { - case Success(ok) => Success(list :+ ok) - case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } - - def mapFromJsonString(jason : String) : Map[String, TagData] = try { - read[Map[String, TagData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") - } - - - def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, Tag]] = { - Try(mapFromJsonString(jason)).flatMap { map => - map.foldLeft(Try(Map[String, Tag]())) { - case (Success(map), (key, next)) => - next.validated(failFast) match { - case Success(ok) => Success(map.updated(key, ok)) - case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/User.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/User.scala deleted file mode 100644 index 286cdb3b6528..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/User.scala +++ /dev/null @@ -1,76 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using model.mustache -package sample.cask.model -import scala.util.control.NonFatal - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -case class User( - id: Option[Long] = None , - - username: Option[String] = None , - - firstName: Option[String] = None , - - lastName: Option[String] = None , - - email: Option[String] = None , - - password: Option[String] = None , - - phone: Option[String] = None , - - /* User Status */ - userStatus: Option[Int] = None - - ) { - - def asJson: String = asData.asJson - - def asData : UserData = { - UserData( - id = id.getOrElse(0), - username = username.getOrElse(""), - firstName = firstName.getOrElse(""), - lastName = lastName.getOrElse(""), - email = email.getOrElse(""), - password = password.getOrElse(""), - phone = phone.getOrElse(""), - userStatus = userStatus.getOrElse(0) - ) - } - -} - -object User{ - - given RW[User] = UserData.readWriter.bimap[User](_.asData, _.asModel) - - enum Fields(fieldName : String) extends Field(fieldName) { - case id extends Fields("id") - case username extends Fields("username") - case firstName extends Fields("firstName") - case lastName extends Fields("lastName") - case email extends Fields("email") - case password extends Fields("password") - case phone extends Fields("phone") - case userStatus extends Fields("userStatus") - } - - -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/UserData.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/UserData.scala deleted file mode 100644 index 8b8ca7908abf..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/UserData.scala +++ /dev/null @@ -1,292 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -// this model was generated using modelData.mustache -package sample.cask.model -import scala.util.control.NonFatal -import scala.util.* - -// see https://com-lihaoyi.github.io/upickle/ -import upickle.default.{ReadWriter => RW, macroRW} -import upickle.default.* - -/** UserData a data transfer object, primarily for simple json serialisation. - * It has no validation - there may be nulls, values out of range, etc - */ -case class UserData( - id: Long = 0 , - - username: String = "" , - - firstName: String = "" , - - lastName: String = "" , - - email: String = "" , - - password: String = "" , - - phone: String = "" , - - /* User Status */ - userStatus: Int = 0 - - ) { - - def asJson: String = write(this) - - def validationErrors(path : Seq[Field], failFast : Boolean) : Seq[ValidationError] = { - val errors = scala.collection.mutable.ListBuffer[ValidationError]() - // ================== - // id - - - - - - - - - - - - - - - - - // ================== - // username - - - - - - - - - - - - - - - - - // ================== - // firstName - - - - - - - - - - - - - - - - - // ================== - // lastName - - - - - - - - - - - - - - - - - // ================== - // email - - - - - - - - - - - - - - - - - // ================== - // password - - - - - - - - - - - - - - - - - // ================== - // phone - - - - - - - - - - - - - - - - - // ================== - // userStatus - - - - - - - - - - - - - - - - - errors.toSeq - } - - def validated(failFast : Boolean = false) : scala.util.Try[User] = { - validationErrors(Vector(), failFast) match { - case Seq() => Success(asModel) - case first +: theRest => Failure(ValidationErrors(first, theRest)) - } - } - - /** use 'validated' to check validation */ - def asModel : User = { - User( - id = Option( - id - ) - , - username = Option( - username - ) - , - firstName = Option( - firstName - ) - , - lastName = Option( - lastName - ) - , - email = Option( - email - ) - , - password = Option( - password - ) - , - phone = Option( - phone - ) - , - userStatus = Option( - userStatus - ) - - ) - } -} - -object UserData { - - given readWriter : RW[UserData] = macroRW - - def fromJsonString(jason : String) : UserData = try { - read[UserData](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason': $e") - } - - def manyFromJsonString(jason : String) : Seq[UserData] = try { - read[List[UserData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as list: $e") - } - - def manyFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Seq[User]] = { - Try(manyFromJsonString(jason)).flatMap { list => - list.zipWithIndex.foldLeft(Try(Vector[User]())) { - case (Success(list), (next, i)) => - next.validated(failFast) match { - case Success(ok) => Success(list :+ ok) - case Failure(err) => Failure(new Exception(s"Validation error on element $i: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } - - def mapFromJsonString(jason : String) : Map[String, UserData] = try { - read[Map[String, UserData]](jason) - } catch { - case NonFatal(e) => sys.error(s"Error parsing json '$jason' as map: $e") - } - - - def mapFromJsonStringValidated(jason : String, failFast : Boolean = false) : Try[Map[String, User]] = { - Try(mapFromJsonString(jason)).flatMap { map => - map.foldLeft(Try(Map[String, User]())) { - case (Success(map), (key, next)) => - next.validated(failFast) match { - case Success(ok) => Success(map.updated(key, ok)) - case Failure(err) => Failure(new Exception(s"Validation error on element $key: ${err.getMessage}", err)) - } - case (fail, _) => fail - } - } - } -} - diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/package.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/package.scala deleted file mode 100644 index b0c893da6715..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/model/package.scala +++ /dev/null @@ -1,65 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -package sample.cask.model - -// model package -import upickle.default._ -import java.time.* -import java.time.format.DateTimeFormatter - -/** - * This base class lets us refer to fields in exceptions - */ -class Field(val name : String) - -final case class ValidationErrors( - first: ValidationError, - remaining: Seq[ValidationError], - message: String -) extends Exception(message) - -object ValidationErrors { - def apply(first: ValidationError, remaining: Seq[ValidationError]) = { - val noun = if remaining.isEmpty then "error" else "errors" - new ValidationErrors( - first, - remaining, - remaining.mkString(s"${remaining.size + 1} $noun found: ${first}", "\n\t", "") - ) - } -} - - -final case class ValidationError(path : Seq[Field], message : String) extends Exception(message) { - override def toString = s"ValidationError for ${path.mkString(".")}: $message" -} - -given ReadWriter[ZonedDateTime] = readwriter[String].bimap[ZonedDateTime]( - zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), - str => ZonedDateTime.parse(str, DateTimeFormatter.ISO_INSTANT)) - -given ReadWriter[LocalDateTime] = readwriter[String].bimap[LocalDateTime]( - zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), - str => LocalDateTime.parse(str, DateTimeFormatter.ISO_INSTANT)) - -given ReadWriter[LocalDate] = readwriter[String].bimap[LocalDate]( - zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), - str => LocalDate.parse(str, DateTimeFormatter.ISO_INSTANT)) - -given ReadWriter[OffsetDateTime] = readwriter[String].bimap[OffsetDateTime]( - zonedDateTime => DateTimeFormatter.ISO_INSTANT.format(zonedDateTime), - str => scala.util.Try(OffsetDateTime.parse(str, DateTimeFormatter.ISO_DATE_TIME)).getOrElse( - OffsetDateTime.parse(str, DateTimeFormatter.ISO_INSTANT) - ) -) \ No newline at end of file diff --git a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/package.scala b/samples/server/petstore/scala-cask/src/main/scala/sample/cask/package.scala deleted file mode 100644 index f4c86e310e04..000000000000 --- a/samples/server/petstore/scala-cask/src/main/scala/sample/cask/package.scala +++ /dev/null @@ -1,24 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by OpenAPI Generator. - * - * https://openapi-generator.tech - */ - -package cask.groupId.server - -def box(str: String): String = { - val lines = str.linesIterator.toList - val maxLen = (0 +: lines.map(_.length)).max - val boxed = lines.map { line => - s" | ${line.padTo(maxLen, ' ')} |" - } - val bar = " +-" + ("-" * maxLen) + "-+" - (bar +: boxed :+ bar).mkString("\n") -} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/ApiResponseTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/ApiResponseTest.scala deleted file mode 100644 index 18906d1f3842..000000000000 --- a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/ApiResponseTest.scala +++ /dev/null @@ -1,33 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - */ - -// this model was generated using modelTest.mustache -package sample.cask.model - -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec -import scala.util.* - -class ApiResponseTest extends AnyWordSpec with Matchers { - - "ApiResponse.fromJson" should { - """not parse invalid json""" in { - val Failure(err) = Try(ApiResponseData.fromJsonString("invalid jason")) - err.getMessage should startWith ("Error parsing json 'invalid jason'") - } - """parse """ ignore { - val Failure(err : ValidationErrors) = ApiResponseData.fromJsonString("""""").validated() - - sys.error("TODO") - } - } - -} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/CategoryTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/CategoryTest.scala deleted file mode 100644 index a2d9d6c6251f..000000000000 --- a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/CategoryTest.scala +++ /dev/null @@ -1,33 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - */ - -// this model was generated using modelTest.mustache -package sample.cask.model - -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec -import scala.util.* - -class CategoryTest extends AnyWordSpec with Matchers { - - "Category.fromJson" should { - """not parse invalid json""" in { - val Failure(err) = Try(CategoryData.fromJsonString("invalid jason")) - err.getMessage should startWith ("Error parsing json 'invalid jason'") - } - """parse """ ignore { - val Failure(err : ValidationErrors) = CategoryData.fromJsonString("""""").validated() - - sys.error("TODO") - } - } - -} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/OrderTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/OrderTest.scala deleted file mode 100644 index 3f5360101130..000000000000 --- a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/OrderTest.scala +++ /dev/null @@ -1,34 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - */ - -// this model was generated using modelTest.mustache -package sample.cask.model -import java.time.OffsetDateTime - -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec -import scala.util.* - -class OrderTest extends AnyWordSpec with Matchers { - - "Order.fromJson" should { - """not parse invalid json""" in { - val Failure(err) = Try(OrderData.fromJsonString("invalid jason")) - err.getMessage should startWith ("Error parsing json 'invalid jason'") - } - """parse """ ignore { - val Failure(err : ValidationErrors) = OrderData.fromJsonString("""""").validated() - - sys.error("TODO") - } - } - -} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/PetTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/PetTest.scala deleted file mode 100644 index 1ab24f2e9269..000000000000 --- a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/PetTest.scala +++ /dev/null @@ -1,35 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - */ - -// this model was generated using modelTest.mustache -package sample.cask.model -import sample.cask.model.Category -import sample.cask.model.Tag - -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec -import scala.util.* - -class PetTest extends AnyWordSpec with Matchers { - - "Pet.fromJson" should { - """not parse invalid json""" in { - val Failure(err) = Try(PetData.fromJsonString("invalid jason")) - err.getMessage should startWith ("Error parsing json 'invalid jason'") - } - """parse """ ignore { - val Failure(err : ValidationErrors) = PetData.fromJsonString("""""").validated() - - sys.error("TODO") - } - } - -} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/TagTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/TagTest.scala deleted file mode 100644 index 664e43e63c9c..000000000000 --- a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/TagTest.scala +++ /dev/null @@ -1,33 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - */ - -// this model was generated using modelTest.mustache -package sample.cask.model - -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec -import scala.util.* - -class TagTest extends AnyWordSpec with Matchers { - - "Tag.fromJson" should { - """not parse invalid json""" in { - val Failure(err) = Try(TagData.fromJsonString("invalid jason")) - err.getMessage should startWith ("Error parsing json 'invalid jason'") - } - """parse """ ignore { - val Failure(err : ValidationErrors) = TagData.fromJsonString("""""").validated() - - sys.error("TODO") - } - } - -} diff --git a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/UserTest.scala b/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/UserTest.scala deleted file mode 100644 index 622fad87b0da..000000000000 --- a/samples/server/petstore/scala-cask/src/test/scala/sample/cask/model/UserTest.scala +++ /dev/null @@ -1,33 +0,0 @@ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: team@openapitools.org - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - */ - -// this model was generated using modelTest.mustache -package sample.cask.model - -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec -import scala.util.* - -class UserTest extends AnyWordSpec with Matchers { - - "User.fromJson" should { - """not parse invalid json""" in { - val Failure(err) = Try(UserData.fromJsonString("invalid jason")) - err.getMessage should startWith ("Error parsing json 'invalid jason'") - } - """parse """ ignore { - val Failure(err : ValidationErrors) = UserData.fromJsonString("""""").validated() - - sys.error("TODO") - } - } - -} From b3c230fea74ee8f668505ecfcc7e2cd957d33f58 Mon Sep 17 00:00:00 2001 From: jpfinne Date: Wed, 24 Apr 2024 18:35:54 +0200 Subject: [PATCH 3/5] Rename generateConstructorWithAllArgs and use x- in vendorExtensions --- bin/configs/java-resttemplate-jakarta.yaml | 2 +- bin/configs/java-resttemplate.yaml | 2 +- bin/configs/spring-boot-3.yaml | 2 +- bin/configs/spring-boot-delegate.yaml | 2 +- bin/configs/spring-boot-lombok-data.yaml | 2 +- docs/generators/java-camel.md | 1 + docs/generators/java-helidon-client.md | 1 + docs/generators/java-helidon-server.md | 1 + docs/generators/java-inflector.md | 3 +- docs/generators/java-micronaut-client.md | 1 + docs/generators/java-micronaut-server.md | 1 + docs/generators/java-msf4j.md | 1 + docs/generators/java-pkmst.md | 1 + docs/generators/java-play-framework.md | 1 + docs/generators/java-undertow-server.md | 1 + docs/generators/java-vertx-web.md | 1 + docs/generators/java-vertx.md | 1 + docs/generators/java-wiremock.md | 1 + docs/generators/java.md | 1 + docs/generators/jaxrs-cxf-cdi.md | 1 + docs/generators/jaxrs-cxf-client.md | 3 +- docs/generators/jaxrs-cxf-extended.md | 1 + docs/generators/jaxrs-cxf.md | 1 + docs/generators/jaxrs-jersey.md | 1 + docs/generators/jaxrs-resteasy-eap.md | 1 + docs/generators/jaxrs-resteasy.md | 1 + docs/generators/jaxrs-spec.md | 1 + docs/generators/spring.md | 1 + .../languages/AbstractJavaCodegen.java | 28 +++++++++---------- .../src/main/resources/Java/pojo.mustache | 8 +++--- .../main/resources/JavaSpring/pojo.mustache | 8 +++--- .../java/spring/SpringCodegenTest.java | 7 +++++ .../info.md | 1 + 33 files changed, 60 insertions(+), 29 deletions(-) diff --git a/bin/configs/java-resttemplate-jakarta.yaml b/bin/configs/java-resttemplate-jakarta.yaml index 4caa56047764..88b094e18ece 100644 --- a/bin/configs/java-resttemplate-jakarta.yaml +++ b/bin/configs/java-resttemplate-jakarta.yaml @@ -8,4 +8,4 @@ additionalProperties: hideGenerationTimestamp: "true" java8: true useJakartaEe: true - generatedConstructorWithAllArgs: true + generateConstructorWithAllArgs: true diff --git a/bin/configs/java-resttemplate.yaml b/bin/configs/java-resttemplate.yaml index d0a43ad8cdf6..cedcc574dbb3 100644 --- a/bin/configs/java-resttemplate.yaml +++ b/bin/configs/java-resttemplate.yaml @@ -8,4 +8,4 @@ additionalProperties: hideGenerationTimestamp: "true" java8: true containerDefaultToNull: true - generatedConstructorWithAllArgs: true + generateConstructorWithAllArgs: true diff --git a/bin/configs/spring-boot-3.yaml b/bin/configs/spring-boot-3.yaml index 091d9b767348..6096b1a50e10 100644 --- a/bin/configs/spring-boot-3.yaml +++ b/bin/configs/spring-boot-3.yaml @@ -11,4 +11,4 @@ additionalProperties: useBeanValidation: true withXml: true hideGenerationTimestamp: "true" - generatedConstructorWithAllArgs: true + generateConstructorWithAllArgs: true diff --git a/bin/configs/spring-boot-delegate.yaml b/bin/configs/spring-boot-delegate.yaml index 21f612a35a85..cf5e016cdbf8 100644 --- a/bin/configs/spring-boot-delegate.yaml +++ b/bin/configs/spring-boot-delegate.yaml @@ -8,4 +8,4 @@ additionalProperties: hideGenerationTimestamp: "true" java8: true delegatePattern: "true" - generatedConstructorWithAllArgs: true + generateConstructorWithAllArgs: true diff --git a/bin/configs/spring-boot-lombok-data.yaml b/bin/configs/spring-boot-lombok-data.yaml index 3d4110fc1fe2..51939d31d54d 100644 --- a/bin/configs/spring-boot-lombok-data.yaml +++ b/bin/configs/spring-boot-lombok-data.yaml @@ -7,4 +7,4 @@ additionalProperties: artifactId: springboot-lombok-data hideGenerationTimestamp: "true" additionalModelTypeAnnotations: "@lombok.Data;@lombok.Builder;@lombok.NoArgsConstructor;@lombok.AllArgsConstructor" - generatedConstructorWithAllArgs: true + generateConstructorWithAllArgs: true diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index a46b87970da5..e1b5c883da21 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springfox**
Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |generatedConstructorWithRequiredArgs|Whether to generate constructors with required args for models| |true| |groupId|groupId in generated pom.xml| |org.openapitools| |hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md index 484df2e51152..0e88003e8603 100644 --- a/docs/generators/java-helidon-client.md +++ b/docs/generators/java-helidon-client.md @@ -38,6 +38,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |fullProject|If set to true, it will generate all files; if set to false, it will only generate API files. If unspecified, the behavior depends on whether a project exists or not: if it does not, same as true; if it does, same as false. Note that test files are never overwritten.| || +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |helidonVersion|Helidon version for generated code| |3.0.1| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md index 3c2e448a9137..bb21f053b44f 100644 --- a/docs/generators/java-helidon-server.md +++ b/docs/generators/java-helidon-server.md @@ -37,6 +37,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |fullProject|If set to true, it will generate all files; if set to false, it will only generate API files. If unspecified, the behavior depends on whether a project exists or not: if it does not, same as true; if it does, same as false. Note that test files are never overwritten.| || +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |gradleProject|Whether to generate gradle project instead of maven.| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |helidonVersion|Helidon version for generated code| |3.0.1| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 93bcc5e03d4a..080426a26a5a 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| @@ -63,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/gen/java| +|sourceFolder|source folder for generated code| |src\gen\java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index c83bce61bad1..b9c864351015 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -52,6 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |generateOperationOnlyForFirstTag|When false, the operation method will be duplicated in each of the tags if multiple tags are assigned to this operation. If true, each operation will be generated only once in the first assigned tag.| |false| |generateSwaggerAnnotations|Specify if you want to generate swagger annotations and which version|
**swagger2**
Use io.swagger.core.v3:swagger-annotations for annotating operations and schemas
**true**
Equivalent to "swagger2"
**false**
Do not generate swagger annotations
**swagger1**
Use io.swagger:swagger-annotations for annotating operations and schemas
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index fce177a46979..e78da4908500 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |generateOperationOnlyForFirstTag|When false, the operation method will be duplicated in each of the tags if multiple tags are assigned to this operation. If true, each operation will be generated only once in the first assigned tag.| |true| |generateOperationsToReturnNotImplemented|Return HTTP 501 Not Implemented instead of an empty response in the generated controller methods.| |true| |generateSwaggerAnnotations|Specify if you want to generate swagger annotations and which version|
**swagger2**
Use io.swagger.core.v3:swagger-annotations for annotating operations and schemas
**true**
Equivalent to "swagger2"
**false**
Do not generate swagger annotations
**swagger1**
Use io.swagger:swagger-annotations for annotating operations and schemas
|swagger2| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 624040df9beb..ee7ede5d0829 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 20345fb4a23c..074ba58ea946 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -43,6 +43,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |eurekaUri|Eureka URI| |null| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |com.prokarma| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index c83e4827e31a..91206d35863c 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -44,6 +44,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 8556f93afc7c..7bbf2cc6f183 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index aa29fbbc514b..65af14ea9dc6 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 08672146b4cb..8456d54beaab 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-wiremock.md b/docs/generators/java-wiremock.md index 26cf0167653b..91d46a8c3cb4 100644 --- a/docs/generators/java-wiremock.md +++ b/docs/generators/java-wiremock.md @@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java.md b/docs/generators/java.md index e08e5d2a6f60..d8981aa886e7 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -49,6 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |errorObjectType|Error Object type. (This option is for okhttp-gson-next-gen only)| |null| |generateClientAsBean|For resttemplate, configure whether to create `ApiClient.java` and Apis clients as bean (with `@Component` annotation).| |false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |gradleProperties|Append additional Gradle properties to the gradle.properties file| |null| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 1de80c28200a..41f75d2664f5 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -43,6 +43,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |generateBuilders|Whether to generate builders for models.| |false| |generatePom|Whether to generate pom.xml if the file does not already exist.| |true| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 203688c5302a..af0282fee6c8 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| @@ -63,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/gen/java| +|sourceFolder|source folder for generated code| |src\gen\java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false| |useBeanValidation|Use BeanValidation API annotations| |false| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 08a0fe67750e..4813d974db94 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -47,6 +47,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |generateOperationBody|Generate fully functional operation bodies| |false| |generateSpringApplication|Generate Spring application| |false| |generateSpringBootApplication|Generate Spring Boot application| |false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 975ba1a05797..212276c90741 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -46,6 +46,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |generateNonSpringApplication|Generate non-Spring application| |false| |generateSpringApplication|Generate Spring application| |false| |generateSpringBootApplication|Generate Spring Boot application| |false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 1565d04f0d47..81af0a811e18 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index ce8e83b65180..64cce7cc7de4 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -42,6 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index b7613483d24c..f3e8481aa2aa 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -42,6 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 87563f7c6bee..67939bfa431f 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -43,6 +43,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |generateBuilders|Whether to generate builders for models.| |false| |generatePom|Whether to generate pom.xml if the file does not already exist.| |true| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 9e426fb0f04e..9bf9b50cfda0 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -48,6 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springfox**
Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| |generatedConstructorWithRequiredArgs|Whether to generate constructors with required args for models| |true| |groupId|groupId in generated pom.xml| |org.openapitools| |hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index a12d35674bf5..7e8a93d919f0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -94,7 +94,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code public static final String USE_ONE_OF_INTERFACES = "useOneOfInterfaces"; public static final String LOMBOK = "lombok"; public static final String DEFAULT_TEST_FOLDER = "${project.build.directory}/generated-test-sources/openapi"; - public static final String GENERATE_CONSTRUCTOR_WITH_ALL_ARGS = "generatedConstructorWithAllArgs"; + public static final String GENERATE_CONSTRUCTOR_WITH_ALL_ARGS = "generateConstructorWithAllArgs"; protected String dateLibrary = "java8"; protected boolean supportAsync = false; @@ -144,7 +144,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code protected boolean camelCaseDollarSign = false; protected boolean useJakartaEe = false; protected boolean containerDefaultToNull = false; - protected boolean generatedConstructorWithAllArgs = false; + protected boolean generateConstructorWithAllArgs = false; private Map schemaKeyToModelNameCache = new HashMap<>(); public AbstractJavaCodegen() { @@ -359,9 +359,9 @@ public void processOpts() { } if (additionalProperties.containsKey(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS)) { - this.setGeneratedConstructorWithAllArgs(convertPropertyToBoolean(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS)); + this.setgenerateConstructorWithAllArgs(convertPropertyToBoolean(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS)); } - writePropertyBack(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, generatedConstructorWithAllArgs); + writePropertyBack(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, generateConstructorWithAllArgs); if (StringUtils.isEmpty(System.getenv("JAVA_POST_PROCESS_FILE"))) { LOGGER.info("Environment variable JAVA_POST_PROCESS_FILE not defined so the Java code may not be properly formatted. To define it, try 'export JAVA_POST_PROCESS_FILE=\"/usr/local/bin/clang-format -i\"' (Linux/Mac)"); @@ -684,12 +684,12 @@ public void processOpts() { }); } - public void setGeneratedConstructorWithAllArgs(boolean aValue) { - this.generatedConstructorWithAllArgs = aValue; + public void setgenerateConstructorWithAllArgs(boolean aValue) { + this.generateConstructorWithAllArgs = aValue; } - public boolean isGeneratedConstructorWithAllArgs() { - return generatedConstructorWithAllArgs; + public boolean isgenerateConstructorWithAllArgs() { + return generateConstructorWithAllArgs; } /** @@ -777,18 +777,18 @@ public Map postProcessAllModels(Map objs) } } - if (isGeneratedConstructorWithAllArgs()) { + if (isgenerateConstructorWithAllArgs()) { // conditionally force the generation of all args constructor. for (CodegenModel cm : allModels.values()) { if (isConstructorWithAllArgsAllowed(cm)) { - cm.vendorExtensions.put("generatedConstructorWithAllArgs", true); + cm.vendorExtensions.put("x-java-all-args-constructor", true); List constructorArgs = new ArrayList<>(); - // vendorExtensions.allArgsConstructorVars should be equivalent to allVars - // but it is not reliable if openapiNormalizer.REFACTOR_ALLOF_WITH_PROPERTIES_ONLY is disabled + // vendorExtensions.x-java-all-args-constructor-vars should be equivalent to allVars + // but it is not reliable when openapiNormalizer.REFACTOR_ALLOF_WITH_PROPERTIES_ONLY is disabled + cm.vendorExtensions.put("x-java-all-args-constructor-vars", constructorArgs); if (cm.vars.size() + cm.parentVars.size() != cm.allVars.size()) { once(LOGGER).warn("Unexpected allVars for {} expecting:{} vars. actual:{} vars", cm.name, cm.vars.size() + cm.parentVars.size(), cm.allVars.size()); } - cm.vendorExtensions.put("allArgsConstructorVars", constructorArgs); constructorArgs.addAll(cm.vars); constructorArgs.addAll(cm.parentVars); } @@ -816,7 +816,7 @@ private List getParentModelList(CodegenModel codegenModel) { */ protected boolean isConstructorWithAllArgsAllowed(CodegenModel codegenModel) { // implementation detail: allVars is not reliable if openapiNormalizer.REFACTOR_ALLOF_WITH_PROPERTIES_ONLY is disabled - return (this.generatedConstructorWithAllArgs && + return (this.generateConstructorWithAllArgs && (!codegenModel.vars.isEmpty() || codegenModel.parentVars.isEmpty())); } diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache index c02a76d07dd0..8cee0ac5a565 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache @@ -115,7 +115,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vendorExtensions.x-has-readonly-properties}} {{^withXml}} /** - * Constructor with only readonly parameters{{#generatedConstructorWithAllArgs}}{{^vendorExtensions.generatedConstructorWithAllArgs}} and all parameters{{/vendorExtensions.generatedConstructorWithAllArgs}}{{/generatedConstructorWithAllArgs}} + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} */ {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} public {{classname}}( @@ -130,12 +130,12 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens } {{/withXml}} {{/vendorExtensions.x-has-readonly-properties}} -{{#vendorExtensions.generatedConstructorWithAllArgs}} +{{#vendorExtensions.x-java-all-args-constructor}} /** * Constructor with all args parameters */ - public {{classname}}({{#vendorExtensions.allArgsConstructorVars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.allArgsConstructorVars}}) { + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { {{#parent}} super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); {{/parent}} @@ -143,7 +143,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; {{/vars}} } -{{/vendorExtensions.generatedConstructorWithAllArgs}} +{{/vendorExtensions.x-java-all-args-constructor}} {{#vars}} {{^isReadOnly}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 60cf035c1d74..db03e875533a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -105,7 +105,7 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}} {{/lombok.NoArgsConstructor}} /** - * Constructor with only required parameters{{#generatedConstructorWithAllArgs}}{{^vendorExtensions.generatedConstructorWithAllArgs}} and all parameters{{/vendorExtensions.generatedConstructorWithAllArgs}}{{/generatedConstructorWithAllArgs}} + * Constructor with only required parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} */ public {{classname}}({{#requiredVars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/requiredVars}}) { {{#parent}} @@ -125,12 +125,12 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}} {{/hasRequired}} {{/generatedConstructorWithRequiredArgs}} {{/lombok.RequiredArgsConstructor}} - {{#vendorExtensions.generatedConstructorWithAllArgs}} + {{#vendorExtensions.x-java-all-args-constructor}} /** * Constructor with all args parameters */ - public {{classname}}({{#vendorExtensions.allArgsConstructorVars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.allArgsConstructorVars}}) { + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { {{#parent}} super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); {{/parent}} @@ -143,7 +143,7 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}} {{/openApiNullable}} {{/vars}} } - {{/vendorExtensions.generatedConstructorWithAllArgs}} + {{/vendorExtensions.x-java-all-args-constructor}} {{/lombok.Data}} {{#vars}} {{^lombok.Data}} 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 2ff39fe6d4f6..4b7389638e2f 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 @@ -4649,6 +4649,13 @@ public void generateAllArgsConstructor() throws IOException { .hasParameter("count").toConstructor(); } + @Test + public void allOfDuplicatedProperties() throws IOException { + final Map additionalProperties = new HashMap<>(); + + Map output = generateFromContract("src/test/resources/3_0/allOfDuplicatedProperties.yaml", SPRING_BOOT, Map.of(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, true)); + + } @Test public void testLombokAnnotations() throws IOException { final Map additionalProperties = new HashMap<>(); diff --git a/samples/client/echo_api/java/okhttp-gson-user-defined-templates/info.md b/samples/client/echo_api/java/okhttp-gson-user-defined-templates/info.md index 5f1571afb2eb..ce5e47055f5c 100644 --- a/samples/client/echo_api/java/okhttp-gson-user-defined-templates/info.md +++ b/samples/client/echo_api/java/okhttp-gson-user-defined-templates/info.md @@ -705,6 +705,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [REST United](https://restunited.com) - [Robocorp](https://www.robocorp.com) - [Robotinfra](https://www.robotinfra.com) +- [SearchApi](https://www.searchapi.io/) - [SmartHR](https://smarthr.co.jp/) - [Sony Interactive Entertainment](https://www.sie.com/en/index.html) - [Splitit](https://www.splitit.com/) From 641ae495013dd6017f996d24e7ba15355bad0e3a Mon Sep 17 00:00:00 2001 From: jpfinne Date: Fri, 26 Apr 2024 15:23:45 +0200 Subject: [PATCH 4/5] Test issue #18340 --- .../codegen/DefaultCodegenTest.java | 29 +++++++++++++++++++ .../java/spring/SpringCodegenTest.java | 2 ++ .../resources/3_0/spring/issue_18340.yaml | 28 ++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 modules/openapi-generator/src/test/resources/3_0/spring/issue_18340.yaml diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 0b1f9f17d4ad..0d93a15bc717 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -40,6 +40,7 @@ import io.swagger.v3.parser.core.models.ParseOptions; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.config.GlobalSettings; +import org.openapitools.codegen.languages.SpringCodegen; import org.openapitools.codegen.model.ModelMap; import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.templating.mustache.*; @@ -4913,4 +4914,32 @@ public void testWebhooks() throws IOException { Assert.assertEquals(co.operationId, "newPetGet"); } + @Test + public void testAllVars_issue_18340() { + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/spring/issue_18340.yaml"); + new OpenAPINormalizer(openAPI, Map.of("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", " true")) + .normalize(); + Schema catModel = ModelUtils.getSchema(openAPI, "Cat"); + DefaultCodegen defaultCodegen = new DefaultCodegen(); + defaultCodegen.setOpenAPI(openAPI); + CodegenModel defaultCat = defaultCodegen.fromModel("Cat", catModel); + assertThat(getNames(defaultCat.allVars)).isEqualTo(List.of("name", "petType")); + + // same model gives an invalid var when using SpringCodegen. name is missing + SpringCodegen springCodegen = new SpringCodegen(); + springCodegen.setOpenAPI(openAPI); + CodegenModel springCat = springCodegen.fromModel("Cat", catModel); + assertThat(getNames(springCat.allVars)).isEqualTo(List.of("petType")); // should be name,petType + + // Prove that supportsInheritance is the culprit + SpringCodegen springCodegenNoSupportInheritance = new SpringCodegen() { + { + this.supportsInheritance = false; + } + }; + springCodegenNoSupportInheritance.setOpenAPI(openAPI); + CodegenModel springCatNoSupportInheritance = springCodegenNoSupportInheritance.fromModel("Cat", catModel); + assertThat(getNames(springCatNoSupportInheritance.allVars)).isEqualTo(List.of("name", "petType")); + } + } 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 4b7389638e2f..29ac5199d74d 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 @@ -4654,6 +4654,8 @@ public void allOfDuplicatedProperties() throws IOException { final Map additionalProperties = new HashMap<>(); Map output = generateFromContract("src/test/resources/3_0/allOfDuplicatedProperties.yaml", SPRING_BOOT, Map.of(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, true)); + JavaFileAssert.assertThat(output.get("ModelC.java")) + .assertConstructor("String", "Integer", "Integer", "String", "String"); } @Test diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/issue_18340.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/issue_18340.yaml new file mode 100644 index 000000000000..46f6ea63da5b --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/spring/issue_18340.yaml @@ -0,0 +1,28 @@ +openapi: 3.0.1 +info: + title: OpenAPI definition + version: '1.0' +paths: + /pets: + get: + summary: Get all pets + operationId: getAllPets + responses: + default: + description: ok +components: + schemas: + Pet: + type: object + properties: + petType: + type: string + discriminator: + propertyName: petType + Cat: + allOf: + - $ref: '#/components/schemas/Pet' + type: object + properties: + name: + type: string From 4fdfb236309d320f4950baa844d13992d1efaa19 Mon Sep 17 00:00:00 2001 From: jpfinne Date: Fri, 26 Apr 2024 16:05:22 +0200 Subject: [PATCH 5/5] Add evidences for allVars issue (#18340) --- .../java/org/openapitools/codegen/DefaultCodegenTest.java | 3 +++ .../src/test/resources/3_0/spring/issue_18340.yaml | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 0d93a15bc717..8ef2ae4d61e8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -4920,6 +4920,7 @@ public void testAllVars_issue_18340() { new OpenAPINormalizer(openAPI, Map.of("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", " true")) .normalize(); Schema catModel = ModelUtils.getSchema(openAPI, "Cat"); + Schema cat2Model = ModelUtils.getSchema(openAPI, "Cat2"); DefaultCodegen defaultCodegen = new DefaultCodegen(); defaultCodegen.setOpenAPI(openAPI); CodegenModel defaultCat = defaultCodegen.fromModel("Cat", catModel); @@ -4930,6 +4931,8 @@ public void testAllVars_issue_18340() { springCodegen.setOpenAPI(openAPI); CodegenModel springCat = springCodegen.fromModel("Cat", catModel); assertThat(getNames(springCat.allVars)).isEqualTo(List.of("petType")); // should be name,petType + CodegenModel springCat2 = springCodegen.fromModel("Cat2", cat2Model); + assertThat(getNames(springCat2.allVars)).isEqualTo(List.of("petType", "name")); // Prove that supportsInheritance is the culprit SpringCodegen springCodegenNoSupportInheritance = new SpringCodegen() { diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/issue_18340.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/issue_18340.yaml index 46f6ea63da5b..c60e5ee24aeb 100644 --- a/modules/openapi-generator/src/test/resources/3_0/spring/issue_18340.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/spring/issue_18340.yaml @@ -26,3 +26,10 @@ components: properties: name: type: string + Cat2: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + name: + type: string
Description
SetMinusCookieSetDashCookie String Cookie authentication key for use with the `api_key` apiKey authentication. Description
SetDashCookieSetMinusCookie String Cookie authentication key for use with the `api_key` apiKey authentication.