From cee8aef38402fa8a795f24d8478c1f29f92ce1ba Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 21 Apr 2022 09:27:57 -0700 Subject: [PATCH 01/10] Adds getUseInlineModelResolver and uses it --- .../openapitools/codegen/CodegenConfig.java | 2 ++ .../openapitools/codegen/DefaultCodegen.java | 3 +++ .../codegen/DefaultGenerator.java | 6 ++++-- .../PythonExperimentalClientCodegen.java | 19 +++++++++++++++++-- 4 files changed, 26 insertions(+), 4 deletions(-) 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 2c8dcdb681fa..f0a7b3a5cc24 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 @@ -319,4 +319,6 @@ public interface CodegenConfig { String generatorLanguageVersion(); List getSupportedVendorExtensions(); + + boolean getUseInlineModelResolver(); } 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 1dc1cd8713b5..f324a3567284 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 @@ -7429,4 +7429,7 @@ public String generatorLanguageVersion() { public List getSupportedVendorExtensions() { return new ArrayList<>(); } + + @Override + public boolean getUseInlineModelResolver() { return true; } } 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 520a4a196a3b..7030c75c1a1d 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 @@ -872,8 +872,10 @@ public List generate() { } // resolve inline models - InlineModelResolver inlineModelResolver = new InlineModelResolver(); - inlineModelResolver.flatten(openAPI); + if (config.getUseInlineModelResolver()) { + InlineModelResolver inlineModelResolver = new InlineModelResolver(); + inlineModelResolver.flatten(openAPI); + } configureGeneratorProperties(); configureOpenAPIInfo(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 97e5b650ee7a..c99d062aa04a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -70,11 +70,13 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen { // nose is a python testing framework, we use pytest if USE_NOSE is unset public static final String USE_NOSE = "useNose"; public static final String RECURSION_LIMIT = "recursionLimit"; + public static final String USE_INLINE_MODEL_RESOLVER = "useInlineModelResolver"; protected String packageUrl; protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; - protected boolean useNose = Boolean.FALSE; + protected boolean useNose = false; + protected boolean useInlineModelResolver = false; protected Map regexModifiers; @@ -192,6 +194,8 @@ public PythonExperimentalClientCodegen() { cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework"). defaultValue(Boolean.FALSE.toString())); cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value.")); + cliOptions.add(CliOption.newBoolean(USE_INLINE_MODEL_RESOLVER, "use the inline model resolver, if true inline complex models will be extracted into components and $refs to them will be used"). + defaultValue(Boolean.FALSE.toString())); supportedLibraries.put("urllib3", "urllib3-based client"); CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: urllib3"); @@ -260,7 +264,7 @@ public void processOpts() { } modelTemplateFiles.put("model." + templateExtension, ".py"); - apiTemplateFiles.put("api." + templateExtension, ".py"); + apiTemplateFiles.put("api." + templateExtension, ".py"); modelTestTemplateFiles.put("model_test." + templateExtension, ".py"); apiTestTemplateFiles.put("api_test." + templateExtension, ".py"); modelDocTemplateFiles.put("model_doc." + templateExtension, ".md"); @@ -321,6 +325,10 @@ public void processOpts() { setUseNose((String) additionalProperties.get(USE_NOSE)); } + if (additionalProperties.containsKey(USE_INLINE_MODEL_RESOLVER)) { + setUseInlineModelResolver((String) additionalProperties.get(USE_INLINE_MODEL_RESOLVER)); + } + // check to see if setRecursionLimit is set and whether it's an integer if (additionalProperties.containsKey(RECURSION_LIMIT)) { try { @@ -2237,6 +2245,13 @@ public void setUseNose(String val) { this.useNose = Boolean.parseBoolean(val); } + @Override + public boolean getUseInlineModelResolver() { return useInlineModelResolver; } + + public void setUseInlineModelResolver(String val) { + this.useInlineModelResolver = Boolean.parseBoolean(val); + } + public void setPackageUrl(String packageUrl) { this.packageUrl = packageUrl; } From 2af4603397207d0cf1aac390e8c4373a8eb7f441 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 21 Apr 2022 09:41:43 -0700 Subject: [PATCH 02/10] Regenerates python-exp samples --- .../.openapi-generator/FILES | 22 -------- .../petstore/python-experimental/README.md | 11 ---- .../python-experimental/docs/DefaultApi.md | 14 ++--- .../python-experimental/docs/FakeApi.md | 10 ++-- .../ObjectWithInlineCompositionProperty.md | 2 +- .../api/default_api_endpoints/foo_get.py | 29 ++++++++++- .../fake_api_endpoints/inline_composition.py | 52 ++++++++++++++++--- .../api/fake_api_endpoints/object_in_query.py | 2 +- .../petstore_api/model/cat.py | 25 ++++++++- .../petstore_api/model/child_cat.py | 25 ++++++++- .../model/complex_quadrilateral.py | 39 +++++++++++++- .../petstore_api/model/dog.py | 25 ++++++++- .../model/equilateral_triangle.py | 39 +++++++++++++- .../petstore_api/model/isosceles_triangle.py | 39 +++++++++++++- ...object_with_inline_composition_property.py | 50 ++++++++++++++++-- .../petstore_api/model/scalene_triangle.py | 39 +++++++++++++- .../model/simple_quadrilateral.py | 39 +++++++++++++- .../petstore_api/models/__init__.py | 11 ---- 18 files changed, 387 insertions(+), 86 deletions(-) diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES index b2acef46f4f2..af47fddb5386 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES @@ -26,14 +26,11 @@ docs/Boolean.md docs/BooleanEnum.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ChildCat.md -docs/ChildCatAllOf.md docs/ClassModel.md docs/Client.md docs/ComplexQuadrilateral.md -docs/ComplexQuadrilateralAllOf.md docs/ComposedAnyOfDifferentTypesNoValidations.md docs/ComposedArray.md docs/ComposedBool.md @@ -42,7 +39,6 @@ docs/ComposedNumber.md docs/ComposedObject.md docs/ComposedOneOfDifferentTypes.md docs/ComposedString.md -docs/CompositionInProperty.md docs/Currency.md docs/DanishPig.md docs/DateTimeTest.md @@ -51,13 +47,11 @@ docs/DateWithValidations.md docs/DecimalPayload.md docs/DefaultApi.md docs/Dog.md -docs/DogAllOf.md docs/Drawing.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md docs/EquilateralTriangle.md -docs/EquilateralTriangleAllOf.md docs/FakeApi.md docs/FakeClassnameTags123Api.md docs/File.md @@ -70,7 +64,6 @@ docs/GmFruit.md docs/GrandparentAnimal.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md -docs/InlineResponseDefault.md docs/IntegerEnum.md docs/IntegerEnumBig.md docs/IntegerEnumOneValue.md @@ -78,9 +71,7 @@ docs/IntegerEnumWithDefaultValue.md docs/IntegerMax10.md docs/IntegerMin15.md docs/IsoscelesTriangle.md -docs/IsoscelesTriangleAllOf.md docs/Mammal.md -docs/MapBean.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -110,11 +101,9 @@ docs/Quadrilateral.md docs/QuadrilateralInterface.md docs/ReadOnlyFirst.md docs/ScaleneTriangle.md -docs/ScaleneTriangleAllOf.md docs/Shape.md docs/ShapeOrNull.md docs/SimpleQuadrilateral.md -docs/SimpleQuadrilateralAllOf.md docs/SomeObject.md docs/SpecialModelName.md docs/StoreApi.md @@ -169,14 +158,11 @@ petstore_api/model/boolean.py petstore_api/model/boolean_enum.py petstore_api/model/capitalization.py petstore_api/model/cat.py -petstore_api/model/cat_all_of.py petstore_api/model/category.py petstore_api/model/child_cat.py -petstore_api/model/child_cat_all_of.py petstore_api/model/class_model.py petstore_api/model/client.py petstore_api/model/complex_quadrilateral.py -petstore_api/model/complex_quadrilateral_all_of.py petstore_api/model/composed_any_of_different_types_no_validations.py petstore_api/model/composed_array.py petstore_api/model/composed_bool.py @@ -185,7 +171,6 @@ petstore_api/model/composed_number.py petstore_api/model/composed_object.py petstore_api/model/composed_one_of_different_types.py petstore_api/model/composed_string.py -petstore_api/model/composition_in_property.py petstore_api/model/currency.py petstore_api/model/danish_pig.py petstore_api/model/date_time_test.py @@ -193,13 +178,11 @@ petstore_api/model/date_time_with_validations.py petstore_api/model/date_with_validations.py petstore_api/model/decimal_payload.py petstore_api/model/dog.py -petstore_api/model/dog_all_of.py petstore_api/model/drawing.py petstore_api/model/enum_arrays.py petstore_api/model/enum_class.py petstore_api/model/enum_test.py petstore_api/model/equilateral_triangle.py -petstore_api/model/equilateral_triangle_all_of.py petstore_api/model/file.py petstore_api/model/file_schema_test_class.py petstore_api/model/foo.py @@ -210,7 +193,6 @@ petstore_api/model/gm_fruit.py petstore_api/model/grandparent_animal.py petstore_api/model/has_only_read_only.py petstore_api/model/health_check_result.py -petstore_api/model/inline_response_default.py petstore_api/model/integer_enum.py petstore_api/model/integer_enum_big.py petstore_api/model/integer_enum_one_value.py @@ -218,9 +200,7 @@ petstore_api/model/integer_enum_with_default_value.py petstore_api/model/integer_max10.py petstore_api/model/integer_min15.py petstore_api/model/isosceles_triangle.py -petstore_api/model/isosceles_triangle_all_of.py petstore_api/model/mammal.py -petstore_api/model/map_bean.py petstore_api/model/map_test.py petstore_api/model/mixed_properties_and_additional_properties_class.py petstore_api/model/model200_response.py @@ -249,11 +229,9 @@ petstore_api/model/quadrilateral.py petstore_api/model/quadrilateral_interface.py petstore_api/model/read_only_first.py petstore_api/model/scalene_triangle.py -petstore_api/model/scalene_triangle_all_of.py petstore_api/model/shape.py petstore_api/model/shape_or_null.py petstore_api/model/simple_quadrilateral.py -petstore_api/model/simple_quadrilateral_all_of.py petstore_api/model/some_object.py petstore_api/model/special_model_name.py petstore_api/model/string.py diff --git a/samples/openapi3/client/petstore/python-experimental/README.md b/samples/openapi3/client/petstore/python-experimental/README.md index f6b927f9a77b..19c6f9a6933e 100644 --- a/samples/openapi3/client/petstore/python-experimental/README.md +++ b/samples/openapi3/client/petstore/python-experimental/README.md @@ -162,14 +162,11 @@ Class | Method | HTTP request | Description - [BooleanEnum](docs/BooleanEnum.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ChildCat](docs/ChildCat.md) - - [ChildCatAllOf](docs/ChildCatAllOf.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [ComplexQuadrilateral](docs/ComplexQuadrilateral.md) - - [ComplexQuadrilateralAllOf](docs/ComplexQuadrilateralAllOf.md) - [ComposedAnyOfDifferentTypesNoValidations](docs/ComposedAnyOfDifferentTypesNoValidations.md) - [ComposedArray](docs/ComposedArray.md) - [ComposedBool](docs/ComposedBool.md) @@ -178,7 +175,6 @@ Class | Method | HTTP request | Description - [ComposedObject](docs/ComposedObject.md) - [ComposedOneOfDifferentTypes](docs/ComposedOneOfDifferentTypes.md) - [ComposedString](docs/ComposedString.md) - - [CompositionInProperty](docs/CompositionInProperty.md) - [Currency](docs/Currency.md) - [DanishPig](docs/DanishPig.md) - [DateTimeTest](docs/DateTimeTest.md) @@ -186,13 +182,11 @@ Class | Method | HTTP request | Description - [DateWithValidations](docs/DateWithValidations.md) - [DecimalPayload](docs/DecimalPayload.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [Drawing](docs/Drawing.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) - [EquilateralTriangle](docs/EquilateralTriangle.md) - - [EquilateralTriangleAllOf](docs/EquilateralTriangleAllOf.md) - [File](docs/File.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - [Foo](docs/Foo.md) @@ -203,7 +197,6 @@ Class | Method | HTTP request | Description - [GrandparentAnimal](docs/GrandparentAnimal.md) - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [HealthCheckResult](docs/HealthCheckResult.md) - - [InlineResponseDefault](docs/InlineResponseDefault.md) - [IntegerEnum](docs/IntegerEnum.md) - [IntegerEnumBig](docs/IntegerEnumBig.md) - [IntegerEnumOneValue](docs/IntegerEnumOneValue.md) @@ -211,9 +204,7 @@ Class | Method | HTTP request | Description - [IntegerMax10](docs/IntegerMax10.md) - [IntegerMin15](docs/IntegerMin15.md) - [IsoscelesTriangle](docs/IsoscelesTriangle.md) - - [IsoscelesTriangleAllOf](docs/IsoscelesTriangleAllOf.md) - [Mammal](docs/Mammal.md) - - [MapBean](docs/MapBean.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -242,11 +233,9 @@ Class | Method | HTTP request | Description - [QuadrilateralInterface](docs/QuadrilateralInterface.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [ScaleneTriangle](docs/ScaleneTriangle.md) - - [ScaleneTriangleAllOf](docs/ScaleneTriangleAllOf.md) - [Shape](docs/Shape.md) - [ShapeOrNull](docs/ShapeOrNull.md) - [SimpleQuadrilateral](docs/SimpleQuadrilateral.md) - - [SimpleQuadrilateralAllOf](docs/SimpleQuadrilateralAllOf.md) - [SomeObject](docs/SomeObject.md) - [SpecialModelName](docs/SpecialModelName.md) - [String](docs/String.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md index 71f36c7bc6b3..c001abdb9f23 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**foo_get**](DefaultApi.md#foo_get) | **GET** /foo | # **foo_get** -> InlineResponseDefault foo_get() +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} foo_get() @@ -16,7 +16,7 @@ Method | HTTP request | Description ```python import petstore_api from petstore_api.api import default_api -from petstore_api.model.inline_response_default import InlineResponseDefault +from petstore_api.model.foo import Foo from pprint import pprint # Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 # See configuration.py for a list of all supported configuration parameters. @@ -54,13 +54,15 @@ body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | #### SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InlineResponseDefault**](InlineResponseDefault.md) | | +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | [**Foo**](Foo.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] -[**InlineResponseDefault**](InlineResponseDefault.md) +**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** ### Authorization diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 626f18ba6df6..96bccb0c1a9e 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -1422,7 +1422,7 @@ testing composed schemas at inline locations ```python import petstore_api from petstore_api.api import fake_api -from petstore_api.model.composition_in_property import CompositionInProperty +from petstore_api.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType from pprint import pprint # Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 # See configuration.py for a list of all supported configuration parameters. @@ -1439,7 +1439,7 @@ with petstore_api.ApiClient(configuration) as api_client: query_params = { 'compositionAtRoot': None, 'compositionInProperty': dict( - some_prop="some_prop_example", + some_prop=None, ), } body = None @@ -1501,7 +1501,7 @@ Name | Type | Description | Notes #### CompositionInPropertySchema Type | Description | Notes ------------- | ------------- | ------------- -[**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](CompositionInProperty.md) | | +[**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**]({str: (bool, date, datetime, dict, float, int, list, str, none_type)}.md) | | ### Return Types, Responses @@ -1882,7 +1882,7 @@ user list ```python import petstore_api from petstore_api.api import fake_api -from petstore_api.model.map_bean import MapBean +from petstore_api.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType from pprint import pprint # Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 # See configuration.py for a list of all supported configuration parameters. @@ -1929,7 +1929,7 @@ mapBean | MapBeanSchema | | optional #### MapBeanSchema Type | Description | Notes ------------- | ------------- | ------------- -[**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](MapBean.md) | | +[**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**]({str: (bool, date, datetime, dict, float, int, list, str, none_type)}.md) | | ### Return Types, Responses diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md index a74c35a74b77..f83f69a567d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md @@ -3,7 +3,7 @@ #### Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProp** | **str** | | [optional] +**someProp** | **object** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py index 3e9e2852a166..96ac62e86fbd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py @@ -63,11 +63,36 @@ _SchemaEnumMaker ) -from petstore_api.model.inline_response_default import InlineResponseDefault +from petstore_api.model.foo import Foo _path = '/foo' _method = 'GET' -SchemaFor0ResponseBodyApplicationJson = InlineResponseDefault + + +class SchemaFor0ResponseBodyApplicationJson( + DictSchema +): + + @classmethod + @property + def string(cls) -> typing.Type['Foo']: + return Foo + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + string: typing.Union['Foo', Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'SchemaFor0ResponseBodyApplicationJson': + return super().__new__( + cls, + *args, + string=string, + _configuration=_configuration, + **kwargs, + ) @dataclass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py index c1a2a4fe64b6..dcd077afd991 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py @@ -63,7 +63,7 @@ _SchemaEnumMaker ) -from petstore_api.model.composition_in_property import CompositionInProperty +from petstore_api.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType # query params @@ -123,12 +123,52 @@ class CompositionInPropertySchema( class someProp( - _SchemaValidator( - min_length=1, - ), - StrSchema + ComposedSchema ): - pass + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + + + class allOf_0( + _SchemaValidator( + min_length=1, + ), + StrSchema + ): + pass + return { + 'allOf': [ + allOf_0, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + None + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'someProp': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py index 73b6d14e6746..e556c654bc79 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py @@ -62,7 +62,7 @@ _SchemaEnumMaker ) -from petstore_api.model.map_bean import MapBean +from petstore_api.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType # query params diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py index 0c9cb8c83bfb..2a5c336b66c0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py @@ -84,10 +84,32 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + declawed = BoolSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + declawed: typing.Union[declawed, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + declawed=declawed, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ Animal, - CatAllOf, + allOf_1, ], 'oneOf': [ ], @@ -111,4 +133,3 @@ def __new__( ) from petstore_api.model.animal import Animal -from petstore_api.model.cat_all_of import CatAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py index 09a40446524a..6630557e40d3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py @@ -84,10 +84,32 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + name = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + name: typing.Union[name, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + name=name, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ ParentPet, - ChildCatAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +132,4 @@ def __new__( **kwargs, ) -from petstore_api.model.child_cat_all_of import ChildCatAllOf from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py index 5dd9f537e9b3..894f9387bad3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py @@ -84,10 +84,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class quadrilateralType( + _SchemaEnumMaker( + enum_value_to_name={ + "ComplexQuadrilateral": "COMPLEXQUADRILATERAL", + } + ), + StrSchema + ): + + @classmethod + @property + def COMPLEXQUADRILATERAL(cls): + return cls("ComplexQuadrilateral") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + quadrilateralType=quadrilateralType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ QuadrilateralInterface, - ComplexQuadrilateralAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +146,4 @@ def __new__( **kwargs, ) -from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf from petstore_api.model.quadrilateral_interface import QuadrilateralInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py index b3848ee7a542..768e61012457 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py @@ -84,10 +84,32 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + breed = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + breed: typing.Union[breed, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + breed=breed, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ Animal, - DogAllOf, + allOf_1, ], 'oneOf': [ ], @@ -111,4 +133,3 @@ def __new__( ) from petstore_api.model.animal import Animal -from petstore_api.model.dog_all_of import DogAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py index e190cfad35f9..56edf6fc76e1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py @@ -84,10 +84,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "EquilateralTriangle": "EQUILATERALTRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def EQUILATERALTRIANGLE(cls): + return cls("EquilateralTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + triangleType=triangleType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ TriangleInterface, - EquilateralTriangleAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +146,4 @@ def __new__( **kwargs, ) -from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py index a5a8dfe379bb..493cb0191d2e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py @@ -84,10 +84,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "IsoscelesTriangle": "ISOSCELESTRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def ISOSCELESTRIANGLE(cls): + return cls("IsoscelesTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + triangleType=triangleType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ TriangleInterface, - IsoscelesTriangleAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +146,4 @@ def __new__( **kwargs, ) -from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py index 35e659da7db4..0f20e1022417 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py @@ -76,12 +76,52 @@ class ObjectWithInlineCompositionProperty( class someProp( - _SchemaValidator( - min_length=1, - ), - StrSchema + ComposedSchema ): - pass + + @classmethod + @property + def _composed_schemas(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + + + class allOf_0( + _SchemaValidator( + min_length=1, + ), + StrSchema + ): + pass + return { + 'allOf': [ + allOf_0, + ], + 'oneOf': [ + ], + 'anyOf': [ + ], + 'not': + None + } + + def __new__( + cls, + *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'someProp': + return super().__new__( + cls, + *args, + _configuration=_configuration, + **kwargs, + ) def __new__( diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py index b6dcf5a3180c..f9df39945ed2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py @@ -84,10 +84,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "ScaleneTriangle": "SCALENETRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def SCALENETRIANGLE(cls): + return cls("ScaleneTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + triangleType=triangleType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ TriangleInterface, - ScaleneTriangleAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +146,4 @@ def __new__( **kwargs, ) -from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py index ac25d65da037..1f81d0341163 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py @@ -84,10 +84,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class quadrilateralType( + _SchemaEnumMaker( + enum_value_to_name={ + "SimpleQuadrilateral": "SIMPLEQUADRILATERAL", + } + ), + StrSchema + ): + + @classmethod + @property + def SIMPLEQUADRILATERAL(cls): + return cls("SimpleQuadrilateral") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + quadrilateralType=quadrilateralType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ QuadrilateralInterface, - SimpleQuadrilateralAllOf, + allOf_1, ], 'oneOf': [ ], @@ -111,4 +147,3 @@ def __new__( ) from petstore_api.model.quadrilateral_interface import QuadrilateralInterface -from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py index 0872c91c8092..48f6957f02cb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py @@ -34,14 +34,11 @@ from petstore_api.model.boolean_enum import BooleanEnum from petstore_api.model.capitalization import Capitalization from petstore_api.model.cat import Cat -from petstore_api.model.cat_all_of import CatAllOf from petstore_api.model.category import Category from petstore_api.model.child_cat import ChildCat -from petstore_api.model.child_cat_all_of import ChildCatAllOf from petstore_api.model.class_model import ClassModel from petstore_api.model.client import Client from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral -from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf from petstore_api.model.composed_any_of_different_types_no_validations import ComposedAnyOfDifferentTypesNoValidations from petstore_api.model.composed_array import ComposedArray from petstore_api.model.composed_bool import ComposedBool @@ -50,7 +47,6 @@ from petstore_api.model.composed_object import ComposedObject from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes from petstore_api.model.composed_string import ComposedString -from petstore_api.model.composition_in_property import CompositionInProperty from petstore_api.model.currency import Currency from petstore_api.model.danish_pig import DanishPig from petstore_api.model.date_time_test import DateTimeTest @@ -58,13 +54,11 @@ from petstore_api.model.date_with_validations import DateWithValidations from petstore_api.model.decimal_payload import DecimalPayload from petstore_api.model.dog import Dog -from petstore_api.model.dog_all_of import DogAllOf from petstore_api.model.drawing import Drawing from petstore_api.model.enum_arrays import EnumArrays from petstore_api.model.enum_class import EnumClass from petstore_api.model.enum_test import EnumTest from petstore_api.model.equilateral_triangle import EquilateralTriangle -from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf from petstore_api.model.file import File from petstore_api.model.file_schema_test_class import FileSchemaTestClass from petstore_api.model.foo import Foo @@ -75,7 +69,6 @@ from petstore_api.model.grandparent_animal import GrandparentAnimal from petstore_api.model.has_only_read_only import HasOnlyReadOnly from petstore_api.model.health_check_result import HealthCheckResult -from petstore_api.model.inline_response_default import InlineResponseDefault from petstore_api.model.integer_enum import IntegerEnum from petstore_api.model.integer_enum_big import IntegerEnumBig from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue @@ -83,9 +76,7 @@ from petstore_api.model.integer_max10 import IntegerMax10 from petstore_api.model.integer_min15 import IntegerMin15 from petstore_api.model.isosceles_triangle import IsoscelesTriangle -from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf from petstore_api.model.mammal import Mammal -from petstore_api.model.map_bean import MapBean from petstore_api.model.map_test import MapTest from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass from petstore_api.model.model200_response import Model200Response @@ -114,11 +105,9 @@ from petstore_api.model.quadrilateral_interface import QuadrilateralInterface from petstore_api.model.read_only_first import ReadOnlyFirst from petstore_api.model.scalene_triangle import ScaleneTriangle -from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf from petstore_api.model.shape import Shape from petstore_api.model.shape_or_null import ShapeOrNull from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral -from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf from petstore_api.model.some_object import SomeObject from petstore_api.model.special_model_name import SpecialModelName from petstore_api.model.string import String From 6299f29bb766eb12da39a5e36adb3f8a38280367 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 21 Apr 2022 09:52:31 -0700 Subject: [PATCH 03/10] Regenerates docs --- docs/generators/python-experimental.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 25ac019fa939..ab5862d321b9 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |packageVersion|python package version.| |1.0.0| |projectName|python project name in setup.py (e.g. petstore-api).| |null| |recursionLimit|Set the recursion limit. If not set, use the system default value.| |null| +|useInlineModelResolver|use the inline model resolver, if true inline complex models will be extracted into components and $refs to them will be used| |false| |useNose|use the nose test framework| |false| ## IMPORT MAPPING From 5a0ef75f0a4d882d8bf5eab3311a8a590ab026ea Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 21 Apr 2022 10:09:32 -0700 Subject: [PATCH 04/10] Samples regenerated --- .../.openapi-generator/FILES | 118 +++++++++++++++++ .../python-experimental/docs/CatAllOf.md | 10 -- .../python-experimental/docs/ChildCatAllOf.md | 10 -- .../docs/ComplexQuadrilateralAllOf.md | 10 -- .../docs/CompositionInProperty.md | 10 -- .../python-experimental/docs/DogAllOf.md | 10 -- .../docs/EquilateralTriangleAllOf.md | 10 -- .../docs/InlineResponseDefault.md | 10 -- .../docs/IsoscelesTriangleAllOf.md | 10 -- .../python-experimental/docs/MapBean.md | 10 -- .../docs/Model_200Response.md | 13 -- .../python-experimental/docs/Model_Return.md | 12 -- ...ctWithInlineCompositionPropertySomeProp.md | 9 -- .../docs/ScaleneTriangleAllOf.md | 10 -- .../docs/SimpleQuadrilateralAllOf.md | 10 -- .../petstore_api/model/cat_all_of.py | 92 -------------- .../petstore_api/model/child_cat_all_of.py | 92 -------------- .../model/complex_quadrilateral_all_of.py | 106 ---------------- .../model/composition_in_property.py | 100 --------------- .../petstore_api/model/dog_all_of.py | 92 -------------- .../model/equilateral_triangle_all_of.py | 106 ---------------- .../model/inline_response_default.py | 98 --------------- .../model/isosceles_triangle_all_of.py | 106 ---------------- .../petstore_api/model/map_bean.py | 92 -------------- .../petstore_api/model/model_200_response.py | 94 -------------- ...h_inline_composition_property_some_prop.py | 119 ------------------ .../model/scalene_triangle_all_of.py | 106 ---------------- .../model/simple_quadrilateral_all_of.py | 106 ---------------- .../test/test_cat_all_of.py | 35 ------ .../test/test_child_cat_all_of.py | 35 ------ .../test/test_complex_quadrilateral_all_of.py | 35 ------ .../test/test_composition_in_property.py | 35 ------ .../test/test_dog_all_of.py | 35 ------ .../test/test_equilateral_triangle_all_of.py | 35 ------ .../python-experimental/test/test_fake_api.py | 28 +++++ .../test/test_inline_response_default.py | 35 ------ .../test/test_isosceles_triangle_all_of.py | 35 ------ .../python-experimental/test/test_map_bean.py | 35 ------ .../test/test_model_200_response.py | 35 ------ ...h_inline_composition_property_some_prop.py | 35 ------ .../test/test_scalene_triangle_all_of.py | 35 ------ .../test/test_simple_quadrilateral_all_of.py | 35 ------ 42 files changed, 146 insertions(+), 1908 deletions(-) delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/CatAllOf.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateralAllOf.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/CompositionInProperty.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/MapBean.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionPropertySomeProp.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property_some_prop.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_composition_in_property.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py delete mode 100644 samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES index af47fddb5386..4cb950191512 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES @@ -255,4 +255,122 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_additional_properties_class.py +test/test_additional_properties_with_array_of_enums.py +test/test_address.py +test/test_animal.py +test/test_animal_farm.py +test/test_another_fake_api.py +test/test_any_type_not_string.py +test/test_api_response.py +test/test_apple.py +test/test_apple_req.py +test/test_array_holding_any_type.py +test/test_array_of_array_of_number_only.py +test/test_array_of_enums.py +test/test_array_of_number_only.py +test/test_array_test.py +test/test_array_with_validations_in_items.py +test/test_banana.py +test/test_banana_req.py +test/test_bar.py +test/test_basque_pig.py +test/test_boolean.py +test/test_boolean_enum.py +test/test_capitalization.py +test/test_cat.py +test/test_category.py +test/test_child_cat.py +test/test_class_model.py +test/test_client.py +test/test_complex_quadrilateral.py +test/test_composed_any_of_different_types_no_validations.py +test/test_composed_array.py +test/test_composed_bool.py +test/test_composed_none.py +test/test_composed_number.py +test/test_composed_object.py +test/test_composed_one_of_different_types.py +test/test_composed_string.py +test/test_currency.py +test/test_danish_pig.py +test/test_date_time_test.py +test/test_date_time_with_validations.py +test/test_date_with_validations.py +test/test_decimal_payload.py +test/test_default_api.py +test/test_dog.py +test/test_drawing.py +test/test_enum_arrays.py +test/test_enum_class.py +test/test_enum_test.py +test/test_equilateral_triangle.py +test/test_fake_api.py +test/test_fake_classname_tags123_api.py +test/test_file.py +test/test_file_schema_test_class.py +test/test_foo.py +test/test_format_test.py +test/test_fruit.py +test/test_fruit_req.py +test/test_gm_fruit.py +test/test_grandparent_animal.py +test/test_has_only_read_only.py +test/test_health_check_result.py +test/test_integer_enum.py +test/test_integer_enum_big.py +test/test_integer_enum_one_value.py +test/test_integer_enum_with_default_value.py +test/test_integer_max10.py +test/test_integer_min15.py +test/test_isosceles_triangle.py +test/test_mammal.py +test/test_map_test.py +test/test_mixed_properties_and_additional_properties_class.py +test/test_model200_response.py +test/test_model_return.py +test/test_money.py +test/test_name.py +test/test_no_additional_properties.py +test/test_nullable_class.py +test/test_nullable_shape.py +test/test_nullable_string.py +test/test_number.py +test/test_number_only.py +test/test_number_with_validations.py +test/test_object_interface.py +test/test_object_model_with_ref_props.py +test/test_object_with_decimal_properties.py +test/test_object_with_difficultly_named_props.py +test/test_object_with_inline_composition_property.py +test/test_object_with_validations.py +test/test_order.py +test/test_parent_pet.py +test/test_pet.py +test/test_pet_api.py +test/test_pig.py +test/test_player.py +test/test_quadrilateral.py +test/test_quadrilateral_interface.py +test/test_read_only_first.py +test/test_scalene_triangle.py +test/test_shape.py +test/test_shape_or_null.py +test/test_simple_quadrilateral.py +test/test_some_object.py +test/test_special_model_name.py +test/test_store_api.py +test/test_string.py +test/test_string_boolean_map.py +test/test_string_enum.py +test/test_string_enum_with_default_value.py +test/test_string_with_validation.py +test/test_tag.py +test/test_triangle.py +test/test_triangle_interface.py +test/test_user.py +test/test_user_api.py +test/test_uuid_string.py +test/test_whale.py +test/test_zebra.py tox.ini diff --git a/samples/openapi3/client/petstore/python-experimental/docs/CatAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/CatAllOf.md deleted file mode 100644 index f2a9f7d35b7f..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md deleted file mode 100644 index 1e0f07a36283..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChildCatAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateralAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateralAllOf.md deleted file mode 100644 index d2cb47a3c42d..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateralAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# ComplexQuadrilateralAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**quadrilateralType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/CompositionInProperty.md b/samples/openapi3/client/petstore/python-experimental/docs/CompositionInProperty.md deleted file mode 100644 index 923b00a2185a..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/CompositionInProperty.md +++ /dev/null @@ -1,10 +0,0 @@ -# CompositionInProperty - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**someProp** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md deleted file mode 100644 index 8dfd16400b64..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md deleted file mode 100644 index 8e151789e012..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# EquilateralTriangleAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**triangleType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md deleted file mode 100644 index d28a65a74d9f..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponseDefault - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md deleted file mode 100644 index 12881c0177ab..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# IsoscelesTriangleAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**triangleType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md b/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md deleted file mode 100644 index ef98f7ce8e94..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md +++ /dev/null @@ -1,10 +0,0 @@ -# MapBean - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**keyword** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md b/samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md deleted file mode 100644 index 279ea183d9bb..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# Model_200Response - -model with an invalid class name for python, starts with a number - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **int** | | [optional] -**class** | **str** | this is a reserved python keyword | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md b/samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md deleted file mode 100644 index f81000f580e5..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md +++ /dev/null @@ -1,12 +0,0 @@ -# Model_Return - -Model for testing reserved words - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**return** | **int** | this is a reserved python keyword | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionPropertySomeProp.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionPropertySomeProp.md deleted file mode 100644 index 143ed732ea92..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionPropertySomeProp.md +++ /dev/null @@ -1,9 +0,0 @@ -# ObjectWithInlineCompositionPropertySomeProp - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md deleted file mode 100644 index 3ac4ed161258..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# ScaleneTriangleAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**triangleType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md deleted file mode 100644 index e8bf2861915a..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SimpleQuadrilateralAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**quadrilateralType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py deleted file mode 100644 index 5b2f5c1da1d9..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class CatAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - declawed = BoolSchema - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - declawed: typing.Union[declawed, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'CatAllOf': - return super().__new__( - cls, - *args, - declawed=declawed, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py deleted file mode 100644 index 2ac33135589e..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class ChildCatAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - name = StrSchema - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - name: typing.Union[name, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'ChildCatAllOf': - return super().__new__( - cls, - *args, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py deleted file mode 100644 index 1442efce783d..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class ComplexQuadrilateralAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class quadrilateralType( - _SchemaEnumMaker( - enum_value_to_name={ - "ComplexQuadrilateral": "COMPLEXQUADRILATERAL", - } - ), - StrSchema - ): - - @classmethod - @property - def COMPLEXQUADRILATERAL(cls): - return cls("ComplexQuadrilateral") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'ComplexQuadrilateralAllOf': - return super().__new__( - cls, - *args, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py deleted file mode 100644 index fe30b52eb528..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class CompositionInProperty( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class someProp( - _SchemaValidator( - min_length=1, - ), - StrSchema - ): - pass - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - someProp: typing.Union[someProp, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'CompositionInProperty': - return super().__new__( - cls, - *args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py deleted file mode 100644 index 82cee4c2f86b..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class DogAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - breed = StrSchema - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - breed: typing.Union[breed, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'DogAllOf': - return super().__new__( - cls, - *args, - breed=breed, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py deleted file mode 100644 index 080dcc90d276..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class EquilateralTriangleAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class triangleType( - _SchemaEnumMaker( - enum_value_to_name={ - "EquilateralTriangle": "EQUILATERALTRIANGLE", - } - ), - StrSchema - ): - - @classmethod - @property - def EQUILATERALTRIANGLE(cls): - return cls("EquilateralTriangle") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - triangleType: typing.Union[triangleType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'EquilateralTriangleAllOf': - return super().__new__( - cls, - *args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py deleted file mode 100644 index 68e9c325c84d..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class InlineResponseDefault( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @classmethod - @property - def string(cls) -> typing.Type['Foo']: - return Foo - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - string: typing.Union['Foo', Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'InlineResponseDefault': - return super().__new__( - cls, - *args, - string=string, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.foo import Foo diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py deleted file mode 100644 index b166abba12be..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class IsoscelesTriangleAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class triangleType( - _SchemaEnumMaker( - enum_value_to_name={ - "IsoscelesTriangle": "ISOSCELESTRIANGLE", - } - ), - StrSchema - ): - - @classmethod - @property - def ISOSCELESTRIANGLE(cls): - return cls("IsoscelesTriangle") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - triangleType: typing.Union[triangleType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'IsoscelesTriangleAllOf': - return super().__new__( - cls, - *args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py deleted file mode 100644 index f5356269e7ba..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class MapBean( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - keyword = StrSchema - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - keyword: typing.Union[keyword, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'MapBean': - return super().__new__( - cls, - *args, - keyword=keyword, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py deleted file mode 100644 index 828b96198341..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class Model_200Response( - AnyTypeSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - model with an invalid class name for python, starts with a number - """ - name = Int32Schema - _class = StrSchema - locals()['class'] = _class - del locals()['_class'] - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - name: typing.Union[name, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'Model_200Response': - return super().__new__( - cls, - *args, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property_some_prop.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property_some_prop.py deleted file mode 100644 index 4007c64efc31..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property_some_prop.py +++ /dev/null @@ -1,119 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class ObjectWithInlineCompositionPropertySomeProp( - ComposedSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @classmethod - @property - def _composed_schemas(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - - - class allOf_0( - _SchemaValidator( - min_length=1, - ), - StrSchema - ): - pass - return { - 'allOf': [ - allOf_0, - ], - 'oneOf': [ - ], - 'anyOf': [ - ], - 'not': - None - } - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'ObjectWithInlineCompositionPropertySomeProp': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py deleted file mode 100644 index 257d28bb7c6b..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class ScaleneTriangleAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class triangleType( - _SchemaEnumMaker( - enum_value_to_name={ - "ScaleneTriangle": "SCALENETRIANGLE", - } - ), - StrSchema - ): - - @classmethod - @property - def SCALENETRIANGLE(cls): - return cls("ScaleneTriangle") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - triangleType: typing.Union[triangleType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'ScaleneTriangleAllOf': - return super().__new__( - cls, - *args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py deleted file mode 100644 index ae5179cb5b14..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class SimpleQuadrilateralAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class quadrilateralType( - _SchemaEnumMaker( - enum_value_to_name={ - "SimpleQuadrilateral": "SIMPLEQUADRILATERAL", - } - ), - StrSchema - ): - - @classmethod - @property - def SIMPLEQUADRILATERAL(cls): - return cls("SimpleQuadrilateral") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'SimpleQuadrilateralAllOf': - return super().__new__( - cls, - *args, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py deleted file mode 100644 index fc203c2dbaad..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.cat_all_of import CatAllOf - - -class TestCatAllOf(unittest.TestCase): - """CatAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_CatAllOf(self): - """Test CatAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = CatAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py deleted file mode 100644 index 98839fa67486..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.child_cat_all_of import ChildCatAllOf - - -class TestChildCatAllOf(unittest.TestCase): - """ChildCatAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ChildCatAllOf(self): - """Test ChildCatAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = ChildCatAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py deleted file mode 100644 index d6d7fa4cba4f..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf - - -class TestComplexQuadrilateralAllOf(unittest.TestCase): - """ComplexQuadrilateralAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ComplexQuadrilateralAllOf(self): - """Test ComplexQuadrilateralAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = ComplexQuadrilateralAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composition_in_property.py b/samples/openapi3/client/petstore/python-experimental/test/test_composition_in_property.py deleted file mode 100644 index adddcae8b758..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composition_in_property.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composition_in_property import CompositionInProperty - - -class TestCompositionInProperty(unittest.TestCase): - """CompositionInProperty unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_CompositionInProperty(self): - """Test CompositionInProperty""" - # FIXME: construct object with mandatory attributes with example values - # model = CompositionInProperty() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py deleted file mode 100644 index 3a11693e9b15..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.dog_all_of import DogAllOf - - -class TestDogAllOf(unittest.TestCase): - """DogAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_DogAllOf(self): - """Test DogAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = DogAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py deleted file mode 100644 index 8ff85083ffde..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf - - -class TestEquilateralTriangleAllOf(unittest.TestCase): - """EquilateralTriangleAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_EquilateralTriangleAllOf(self): - """Test EquilateralTriangleAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = EquilateralTriangleAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py index ecf7f950429d..22a984c5ea8f 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py @@ -130,6 +130,13 @@ def test_json_form_data(self): """ pass + def test_json_with_charset(self): + """Test case for json_with_charset + + json with charset tx and rx # noqa: E501 + """ + pass + def test_mammal(self): """Test case for mammal @@ -142,6 +149,13 @@ def test_number_with_validations(self): """ pass + def test_object_in_query(self): + """Test case for object_in_query + + user list # noqa: E501 + """ + pass + def test_object_model_with_ref_props(self): """Test case for object_model_with_ref_props @@ -161,6 +175,20 @@ def test_query_parameter_collection_format(self): """ pass + def test_ref_object_in_query(self): + """Test case for ref_object_in_query + + user list # noqa: E501 + """ + pass + + def test_response_without_schema(self): + """Test case for response_without_schema + + receives a response without schema # noqa: E501 + """ + pass + def test_string(self): """Test case for string diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py deleted file mode 100644 index 19408e88f662..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.inline_response_default import InlineResponseDefault - - -class TestInlineResponseDefault(unittest.TestCase): - """InlineResponseDefault unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_InlineResponseDefault(self): - """Test InlineResponseDefault""" - # FIXME: construct object with mandatory attributes with example values - # model = InlineResponseDefault() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py deleted file mode 100644 index a9a8903953b6..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf - - -class TestIsoscelesTriangleAllOf(unittest.TestCase): - """IsoscelesTriangleAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_IsoscelesTriangleAllOf(self): - """Test IsoscelesTriangleAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = IsoscelesTriangleAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py b/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py deleted file mode 100644 index 06ae68186c2d..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.map_bean import MapBean - - -class TestMapBean(unittest.TestCase): - """MapBean unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_MapBean(self): - """Test MapBean""" - # FIXME: construct object with mandatory attributes with example values - # model = MapBean() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py deleted file mode 100644 index eade978083f6..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.model_200_response import Model_200Response - - -class TestModel_200Response(unittest.TestCase): - """Model_200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_Model_200Response(self): - """Test Model_200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = Model_200Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py deleted file mode 100644 index cc3e7fe25525..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_inline_composition_property_some_prop import ObjectWithInlineCompositionPropertySomeProp - - -class TestObjectWithInlineCompositionPropertySomeProp(unittest.TestCase): - """ObjectWithInlineCompositionPropertySomeProp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ObjectWithInlineCompositionPropertySomeProp(self): - """Test ObjectWithInlineCompositionPropertySomeProp""" - # FIXME: construct object with mandatory attributes with example values - # model = ObjectWithInlineCompositionPropertySomeProp() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py deleted file mode 100644 index 8907e705a985..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf - - -class TestScaleneTriangleAllOf(unittest.TestCase): - """ScaleneTriangleAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ScaleneTriangleAllOf(self): - """Test ScaleneTriangleAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = ScaleneTriangleAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py deleted file mode 100644 index af618a805178..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf - - -class TestSimpleQuadrilateralAllOf(unittest.TestCase): - """SimpleQuadrilateralAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_SimpleQuadrilateralAllOf(self): - """Test SimpleQuadrilateralAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = SimpleQuadrilateralAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() From 02ccca5201bc9f6e6bcb44fde19cd3b974f9e344 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 25 Apr 2022 09:46:04 -0700 Subject: [PATCH 05/10] Moves codegenProperty.complexType setting --- .../openapitools/codegen/DefaultCodegen.java | 6 +- .../.openapi-generator/FILES | 118 ------------------ .../.openapi-generator/VERSION | 2 +- 3 files changed, 4 insertions(+), 122 deletions(-) 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 f324a3567284..0055956f21bb 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 @@ -4713,12 +4713,12 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) String parameterDataType = this.getParameterDataType(parameter, parameterSchema); if (parameterDataType != null) { codegenParameter.dataType = parameterDataType; + if (ModelUtils.isObjectSchema(parameterSchema)) { + codegenProperty.complexType = codegenParameter.dataType; + } } else { codegenParameter.dataType = codegenProperty.dataType; } - if (ModelUtils.isObjectSchema(parameterSchema)) { - codegenProperty.complexType = codegenParameter.dataType; - } if (ModelUtils.isSet(parameterSchema)) { imports.add(codegenProperty.baseType); } diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES index 4cb950191512..af47fddb5386 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES @@ -255,122 +255,4 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_additional_properties_class.py -test/test_additional_properties_with_array_of_enums.py -test/test_address.py -test/test_animal.py -test/test_animal_farm.py -test/test_another_fake_api.py -test/test_any_type_not_string.py -test/test_api_response.py -test/test_apple.py -test/test_apple_req.py -test/test_array_holding_any_type.py -test/test_array_of_array_of_number_only.py -test/test_array_of_enums.py -test/test_array_of_number_only.py -test/test_array_test.py -test/test_array_with_validations_in_items.py -test/test_banana.py -test/test_banana_req.py -test/test_bar.py -test/test_basque_pig.py -test/test_boolean.py -test/test_boolean_enum.py -test/test_capitalization.py -test/test_cat.py -test/test_category.py -test/test_child_cat.py -test/test_class_model.py -test/test_client.py -test/test_complex_quadrilateral.py -test/test_composed_any_of_different_types_no_validations.py -test/test_composed_array.py -test/test_composed_bool.py -test/test_composed_none.py -test/test_composed_number.py -test/test_composed_object.py -test/test_composed_one_of_different_types.py -test/test_composed_string.py -test/test_currency.py -test/test_danish_pig.py -test/test_date_time_test.py -test/test_date_time_with_validations.py -test/test_date_with_validations.py -test/test_decimal_payload.py -test/test_default_api.py -test/test_dog.py -test/test_drawing.py -test/test_enum_arrays.py -test/test_enum_class.py -test/test_enum_test.py -test/test_equilateral_triangle.py -test/test_fake_api.py -test/test_fake_classname_tags123_api.py -test/test_file.py -test/test_file_schema_test_class.py -test/test_foo.py -test/test_format_test.py -test/test_fruit.py -test/test_fruit_req.py -test/test_gm_fruit.py -test/test_grandparent_animal.py -test/test_has_only_read_only.py -test/test_health_check_result.py -test/test_integer_enum.py -test/test_integer_enum_big.py -test/test_integer_enum_one_value.py -test/test_integer_enum_with_default_value.py -test/test_integer_max10.py -test/test_integer_min15.py -test/test_isosceles_triangle.py -test/test_mammal.py -test/test_map_test.py -test/test_mixed_properties_and_additional_properties_class.py -test/test_model200_response.py -test/test_model_return.py -test/test_money.py -test/test_name.py -test/test_no_additional_properties.py -test/test_nullable_class.py -test/test_nullable_shape.py -test/test_nullable_string.py -test/test_number.py -test/test_number_only.py -test/test_number_with_validations.py -test/test_object_interface.py -test/test_object_model_with_ref_props.py -test/test_object_with_decimal_properties.py -test/test_object_with_difficultly_named_props.py -test/test_object_with_inline_composition_property.py -test/test_object_with_validations.py -test/test_order.py -test/test_parent_pet.py -test/test_pet.py -test/test_pet_api.py -test/test_pig.py -test/test_player.py -test/test_quadrilateral.py -test/test_quadrilateral_interface.py -test/test_read_only_first.py -test/test_scalene_triangle.py -test/test_shape.py -test/test_shape_or_null.py -test/test_simple_quadrilateral.py -test/test_some_object.py -test/test_special_model_name.py -test/test_store_api.py -test/test_string.py -test/test_string_boolean_map.py -test/test_string_enum.py -test/test_string_enum_with_default_value.py -test/test_string_with_validation.py -test/test_tag.py -test/test_triangle.py -test/test_triangle_interface.py -test/test_user.py -test/test_user_api.py -test/test_uuid_string.py -test/test_whale.py -test/test_zebra.py tox.ini diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION index 5f68295fc196..717311e32e3c 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -6.0.0-SNAPSHOT \ No newline at end of file +unset \ No newline at end of file From 66673c28fefa45585a67962de583dddc4636a1f4 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 25 Apr 2022 10:18:06 -0700 Subject: [PATCH 06/10] Fixes python-experimental tests --- .../python-experimental/endpoint.handlebars | 1 + .../python-experimental/model.handlebars | 1 + .../composed_schemas.handlebars | 1 + .../python-experimental/docs/FakeApi.md | 18 ++++++++++-------- .../call_123_test_special_tags.py | 1 + .../api/default_api_endpoints/foo_get.py | 1 + ...dditional_properties_with_array_of_enums.py | 1 + .../api/fake_api_endpoints/array_model.py | 1 + .../api/fake_api_endpoints/array_of_enums.py | 1 + .../body_with_file_schema.py | 1 + .../body_with_query_params.py | 1 + .../api/fake_api_endpoints/boolean.py | 1 + .../case_sensitive_params.py | 1 + .../api/fake_api_endpoints/client_model.py | 1 + .../composed_one_of_different_types.py | 1 + .../fake_api_endpoints/endpoint_parameters.py | 1 + .../api/fake_api_endpoints/enum_parameters.py | 1 + .../api/fake_api_endpoints/fake_health_get.py | 1 + .../api/fake_api_endpoints/group_parameters.py | 1 + .../inline_additional_properties.py | 1 + .../fake_api_endpoints/inline_composition.py | 9 +++++++-- .../api/fake_api_endpoints/json_form_data.py | 1 + .../fake_api_endpoints/json_with_charset.py | 1 + .../api/fake_api_endpoints/mammal.py | 1 + .../number_with_validations.py | 1 + .../api/fake_api_endpoints/object_in_query.py | 3 +-- .../object_model_with_ref_props.py | 1 + .../fake_api_endpoints/parameter_collisions.py | 1 + .../query_parameter_collection_format.py | 1 + .../fake_api_endpoints/ref_object_in_query.py | 1 + .../response_without_schema.py | 1 + .../api/fake_api_endpoints/string.py | 1 + .../api/fake_api_endpoints/string_enum.py | 1 + .../fake_api_endpoints/upload_download_file.py | 1 + .../api/fake_api_endpoints/upload_file.py | 1 + .../api/fake_api_endpoints/upload_files.py | 1 + .../classname.py | 1 + .../api/pet_api_endpoints/add_pet.py | 1 + .../api/pet_api_endpoints/delete_pet.py | 1 + .../pet_api_endpoints/find_pets_by_status.py | 1 + .../api/pet_api_endpoints/find_pets_by_tags.py | 1 + .../api/pet_api_endpoints/get_pet_by_id.py | 1 + .../api/pet_api_endpoints/update_pet.py | 1 + .../pet_api_endpoints/update_pet_with_form.py | 1 + .../upload_file_with_required_file.py | 1 + .../api/pet_api_endpoints/upload_image.py | 1 + .../api/store_api_endpoints/delete_order.py | 1 + .../api/store_api_endpoints/get_inventory.py | 1 + .../api/store_api_endpoints/get_order_by_id.py | 1 + .../api/store_api_endpoints/place_order.py | 1 + .../api/user_api_endpoints/create_user.py | 1 + .../create_users_with_array_input.py | 1 + .../create_users_with_list_input.py | 1 + .../api/user_api_endpoints/delete_user.py | 1 + .../api/user_api_endpoints/get_user_by_name.py | 1 + .../api/user_api_endpoints/login_user.py | 1 + .../api/user_api_endpoints/logout_user.py | 1 + .../api/user_api_endpoints/update_user.py | 1 + .../model/additional_properties_class.py | 1 + ...dditional_properties_with_array_of_enums.py | 1 + .../petstore_api/model/address.py | 1 + .../petstore_api/model/animal.py | 1 + .../petstore_api/model/animal_farm.py | 1 + .../petstore_api/model/any_type_not_string.py | 2 ++ .../petstore_api/model/api_response.py | 1 + .../petstore_api/model/apple.py | 1 + .../petstore_api/model/apple_req.py | 1 + .../model/array_holding_any_type.py | 1 + .../model/array_of_array_of_number_only.py | 1 + .../petstore_api/model/array_of_enums.py | 1 + .../petstore_api/model/array_of_number_only.py | 1 + .../petstore_api/model/array_test.py | 1 + .../model/array_with_validations_in_items.py | 1 + .../petstore_api/model/banana.py | 1 + .../petstore_api/model/banana_req.py | 1 + .../petstore_api/model/bar.py | 1 + .../petstore_api/model/basque_pig.py | 1 + .../petstore_api/model/boolean.py | 1 + .../petstore_api/model/boolean_enum.py | 1 + .../petstore_api/model/capitalization.py | 1 + .../petstore_api/model/cat.py | 2 ++ .../petstore_api/model/category.py | 1 + .../petstore_api/model/child_cat.py | 2 ++ .../petstore_api/model/class_model.py | 1 + .../petstore_api/model/client.py | 1 + .../model/complex_quadrilateral.py | 2 ++ ...ed_any_of_different_types_no_validations.py | 2 ++ .../petstore_api/model/composed_array.py | 1 + .../petstore_api/model/composed_bool.py | 2 ++ .../petstore_api/model/composed_none.py | 2 ++ .../petstore_api/model/composed_number.py | 2 ++ .../petstore_api/model/composed_object.py | 2 ++ .../model/composed_one_of_different_types.py | 2 ++ .../petstore_api/model/composed_string.py | 2 ++ .../petstore_api/model/currency.py | 1 + .../petstore_api/model/danish_pig.py | 1 + .../petstore_api/model/date_time_test.py | 1 + .../model/date_time_with_validations.py | 1 + .../model/date_with_validations.py | 1 + .../petstore_api/model/decimal_payload.py | 1 + .../petstore_api/model/dog.py | 2 ++ .../petstore_api/model/drawing.py | 1 + .../petstore_api/model/enum_arrays.py | 1 + .../petstore_api/model/enum_class.py | 1 + .../petstore_api/model/enum_test.py | 1 + .../petstore_api/model/equilateral_triangle.py | 2 ++ .../petstore_api/model/file.py | 1 + .../model/file_schema_test_class.py | 1 + .../petstore_api/model/foo.py | 1 + .../petstore_api/model/format_test.py | 1 + .../petstore_api/model/fruit.py | 2 ++ .../petstore_api/model/fruit_req.py | 2 ++ .../petstore_api/model/gm_fruit.py | 2 ++ .../petstore_api/model/grandparent_animal.py | 1 + .../petstore_api/model/has_only_read_only.py | 1 + .../petstore_api/model/health_check_result.py | 1 + .../petstore_api/model/integer_enum.py | 1 + .../petstore_api/model/integer_enum_big.py | 1 + .../model/integer_enum_one_value.py | 1 + .../model/integer_enum_with_default_value.py | 1 + .../petstore_api/model/integer_max10.py | 1 + .../petstore_api/model/integer_min15.py | 1 + .../petstore_api/model/isosceles_triangle.py | 2 ++ .../petstore_api/model/mammal.py | 2 ++ .../petstore_api/model/map_test.py | 1 + ...operties_and_additional_properties_class.py | 1 + .../petstore_api/model/model200_response.py | 1 + .../petstore_api/model/model_return.py | 1 + .../petstore_api/model/money.py | 1 + .../petstore_api/model/name.py | 1 + .../model/no_additional_properties.py | 1 + .../petstore_api/model/nullable_class.py | 1 + .../petstore_api/model/nullable_shape.py | 2 ++ .../petstore_api/model/nullable_string.py | 1 + .../petstore_api/model/number.py | 1 + .../petstore_api/model/number_only.py | 1 + .../model/number_with_validations.py | 1 + .../petstore_api/model/object_interface.py | 1 + .../model/object_model_with_ref_props.py | 1 + .../model/object_with_decimal_properties.py | 1 + .../object_with_difficultly_named_props.py | 1 + .../object_with_inline_composition_property.py | 2 ++ .../model/object_with_validations.py | 1 + .../petstore_api/model/order.py | 1 + .../petstore_api/model/parent_pet.py | 2 ++ .../petstore_api/model/pet.py | 1 + .../petstore_api/model/pig.py | 2 ++ .../petstore_api/model/player.py | 1 + .../petstore_api/model/quadrilateral.py | 2 ++ .../model/quadrilateral_interface.py | 1 + .../petstore_api/model/read_only_first.py | 1 + .../petstore_api/model/scalene_triangle.py | 2 ++ .../petstore_api/model/shape.py | 2 ++ .../petstore_api/model/shape_or_null.py | 2 ++ .../petstore_api/model/simple_quadrilateral.py | 2 ++ .../petstore_api/model/some_object.py | 2 ++ .../petstore_api/model/special_model_name.py | 1 + .../petstore_api/model/string.py | 1 + .../petstore_api/model/string_boolean_map.py | 1 + .../petstore_api/model/string_enum.py | 1 + .../model/string_enum_with_default_value.py | 1 + .../model/string_with_validation.py | 1 + .../petstore_api/model/tag.py | 1 + .../petstore_api/model/triangle.py | 2 ++ .../petstore_api/model/triangle_interface.py | 1 + .../petstore_api/model/user.py | 2 ++ .../petstore_api/model/uuid_string.py | 1 + .../petstore_api/model/whale.py | 1 + .../petstore_api/model/zebra.py | 1 + .../tests_manual/test_animal.py | 11 ++++------- .../tests_manual/test_validate.py | 9 +-------- 171 files changed, 219 insertions(+), 27 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars index bb060d0799aa..eec855c368f3 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/endpoint.handlebars @@ -7,6 +7,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 {{#with operation}} {{#or headerParams bodyParam produces}} from urllib3._collections import HTTPHeaderDict diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model.handlebars index d8c1e63ae4d4..03f72a86b822 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model.handlebars @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars index 17a77ff9f363..8fa99842e1b6 100644 --- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/composed_schemas.handlebars @@ -1,5 +1,6 @@ @classmethod @property +@functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 96bccb0c1a9e..808d58bbb12e 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -1422,7 +1422,6 @@ testing composed schemas at inline locations ```python import petstore_api from petstore_api.api import fake_api -from petstore_api.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType from pprint import pprint # Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 # See configuration.py for a list of all supported configuration parameters. @@ -1499,10 +1498,12 @@ Name | Type | Description | Notes **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] #### CompositionInPropertySchema -Type | Description | Notes -------------- | ------------- | ------------- -[**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**]({str: (bool, date, datetime, dict, float, int, list, str, none_type)}.md) | | +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**someProp** | **object** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] ### Return Types, Responses @@ -1882,7 +1883,6 @@ user list ```python import petstore_api from petstore_api.api import fake_api -from petstore_api.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType from pprint import pprint # Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 # See configuration.py for a list of all supported configuration parameters. @@ -1927,10 +1927,12 @@ mapBean | MapBeanSchema | | optional #### MapBeanSchema -Type | Description | Notes -------------- | ------------- | ------------- -[**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**]({str: (bool, date, datetime, dict, float, int, list, str, none_type)}.md) | | +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keyword** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] ### Return Types, Responses diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py index 1e7d5354fd4b..56af9d5ca2bd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py index 96ac62e86fbd..d671e247cb84 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py index 8ca397016011..7ff42a0ec8c0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py index 611ab3daf784..e011b7055fd0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py index 71c91efd5329..8caf1316be60 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py index dde001190c70..f8e55f9d062d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py index 6f5e3caaaccd..845c9c4327b6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py index 78767b2fbd6b..860b0e83a945 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py index 7bacd80c11a0..d82ce87b9f5d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py index 5dca29adefbf..3ab153fac40a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py index dfaf495bc3a5..a88e6edf20de 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py index 0a216079896a..fbe686c3d13e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py index 289f5210680d..9e7fcd818071 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py index 3204f18df65c..ba01a663ef82 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py index b6b4f59f5b1f..1c2362b929db 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py index f2607c324c57..27f281927f80 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py index dcd077afd991..352df0a9d79d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions @@ -63,8 +64,6 @@ _SchemaEnumMaker ) -from petstore_api.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType - # query params @@ -74,6 +73,7 @@ class CompositionAtRootSchema( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -128,6 +128,7 @@ class someProp( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -225,6 +226,7 @@ class SchemaForRequestBodyApplicationJson( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -279,6 +281,7 @@ class someProp( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -356,6 +359,7 @@ class SchemaFor200ResponseBodyApplicationJson( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -410,6 +414,7 @@ class someProp( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py index e441d4136c4e..acd9f45f01d7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py index 3f7bb730be3a..9c6fbd690341 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py index 4ea35cb0b75f..204bbbe2a27c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py index c0168e471e01..62c561b954c7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py index e556c654bc79..674c383d599f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 @@ -62,8 +63,6 @@ _SchemaEnumMaker ) -from petstore_api.model.str_bool_date_datetime_dict_float_int_list_str_none_type import StrBoolDateDatetimeDictFloatIntListStrNoneType - # query params diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py index de0ae7c01551..9e0d6feab28b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py index 5b9813bb3c2a..12c0aa0f3478 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py index 66b8ffeb5030..a699b9cc2490 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py index 23cbe2dbd24e..7d3870b10ae5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py index 448f8397fde1..6eed5a523cc7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py index 2cdc192effea..e14f80853bed 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py index 27981dea7eab..3ed9a3b291e9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py index f87fe3dd9955..2d5f58120bff 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py index 02f2eb70a893..66a2e5dcd469 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py index 0d41fccc4f44..a9461e803a48 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py index 4eec66c1e23f..741d34f0d6ab 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py index 244e606a0497..9a03737b99d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py index a79e75ec889a..5b17fd295834 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py index 42fe59410bae..0a2963d69c60 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py index 57b6876bfe50..613545c92f90 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py index 0cafed897082..527154463f21 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py index 67c4a60a52bc..0912f57656ee 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py index d1a00b38d45c..47012f008d1f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py index 5ee4d68cdf36..26629273ee0c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py index 2eafa03b4377..80ed3f149bef 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py index 12e6be849ab2..85e0c391f74a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py index 7806b609430a..eaab273e3517 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py index 5aa3d3cc9899..d2b2c89b07b3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py index c2a4a6bda698..34e71ff92420 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py index 13f3918c29b4..b3cf5e03ed2f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py index efe52c782a9f..5ed7daaea2bc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py index 6dd9f2e70561..9d6a3d34de47 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py index 7b02652c6792..964d6d3c968a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py index e23d17f17883..adb22afe7c7c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py index f4902dc1ddbb..f1f38546d102 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py index 9ed4ab9ba7f1..d6e61bb2f1a8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py index aaf700010f51..04e29018fac7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py index 72d149623d03..5ccf44cceb0a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py index ef41c29ee0fd..f7e9ee933676 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py index 5277c2baec46..c9ba9a4dc32a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py index 81432c292c64..92b478614a3a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py index b71b750c2076..31ab2facb71e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py index 550938873c5c..45915e64206f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class AnyTypeNotString( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py index b492f2f619fb..669e8c14366a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py index bc3255016400..107b8ad0c56a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py index 894a7637dcdd..71519bb0ee06 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py index 109255ce635d..ea1353a02c5e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py index 96d70497a9e0..3f73c652b89a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py index 50c11fbe216e..a541336f645f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py index 6a220ce9e3a1..2e32429c76f1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py index a2af10f84c45..ccb8e8364e37 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py index 78ef8439e749..5534b804c81a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py index 8207dcbacbd3..32fd6d33aba7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py index 540b1675c26c..eef932bcc170 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py index 6c4ee7034bcb..b6955c0c38ad 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py index c61420c182df..1be687ece164 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py index 49e7156f9758..db84ecedc303 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py index 228d6f5b0b7a..f3f6bb200539 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py index bc276507ae52..698d6b5eb3bc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py index 2a5c336b66c0..e43e618a4419 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class Cat( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py index a2e0278986de..9cf45a54e988 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py index 6630557e40d3..381628a1d706 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class ChildCat( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py index ae74da474bd4..a79a2afefce9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py index e4a0bd303f2c..976072a8b311 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py index 894f9387bad3..e5a46fb124d2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class ComplexQuadrilateral( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py index e6436681f7bf..c113226e096c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class ComposedAnyOfDifferentTypesNoValidations( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py index 3a546a53c70f..248d470db972 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py index cb9d41450a8c..8cb6de2269e9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedBool( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py index 45ab7081386e..4a6dca2dfcd3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedNone( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py index 1b825daf4838..81140f5a8adf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedNumber( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py index bf352b410160..9f5f707b20d6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedObject( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py index 0401b8fc51f7..3dcf8d990cb4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -78,6 +79,7 @@ class ComposedOneOfDifferentTypes( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py index c3925d8dfa87..5925aa1b14a8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedString( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py index 2b0afd273650..5d6fa533e1d1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py index 0c900458d907..ec281c4eff69 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py index e69d1bed68cd..2b9c4a1fb34f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py index abd34a7a1d82..c7236b7e93d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py index f90fff654dc7..701dceec4bd0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py index 7b79cd07a059..02d99b636e1f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py index 768e61012457..ff4331001290 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class Dog( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py index 05ccaa5f9b6b..54083c970497 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py index be3c95609587..7061dcbac014 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py index 5062446c15ae..7d12b8cb99b8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py index a294d590bb80..965f861eb53f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py index 56edf6fc76e1..82a9ae642782 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class EquilateralTriangle( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py index cb84c0c1f7e7..0d39c45d8e5b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py index be2511cec921..659e0a552c04 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py index 806d8e8ffbf4..7a8df9110230 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py index f7de7f9b6d10..f9b32e23273f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py index 1031f8302ade..6d8f255c5b0a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class Fruit( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py index b1737345c31c..5729f1625ad1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class FruitReq( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py index 73e441074a88..f591a7ff3ee7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class GmFruit( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py index b29175ff9b08..a8b0106897f0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py index de7b2ae5fa20..ca6317b2457e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py index 1f9b1f7346e9..7f67db6e2318 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py index b55bb1bb1dd8..515755e788fb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py index f7c5f87db593..5d92610f1acb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py index d0b73258d090..f934e35f25aa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py index b79bee62ba7b..401cd77dd569 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py index 8f32a44b6ccb..3c515835a496 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py index f4796d80769b..d7d070c22205 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py index 493cb0191d2e..178878c06d63 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class IsoscelesTriangle( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py index 7c9c2b54c6c8..33af6e183f61 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -87,6 +88,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py index 180be2c14494..68ff2efbf01d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py index 979d365b83cc..8ed67fef179c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py index 261e8e22c6c9..8d1c230153e6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py index ea6632b190c0..f963afda001f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py index c4ef5aa02dde..1569585e7a86 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py index 0c5ad0377293..1fcc02437f5d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py index c1f887be25db..0ea307c5ce9e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py index 9066c714ee39..cecd3781163f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py index 007bdfb71826..95b354fbb1f6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -78,6 +79,7 @@ class NullableShape( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py index 249dadf8ad72..a2aeca7fa845 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py index f31e355362e5..0008b50857ea 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py index fb8f6d4fd8e4..9f5613e28d04 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py index f762950bf5a8..96d1f661df40 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py index df415574612f..be1f174ae81b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py index abc6a7f119db..148779aa9885 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py index 409bfc5d4f96..d19b61f8d689 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py index 57b8b24963fc..a657bead0601 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py index 0f20e1022417..4b0017d3af4c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -81,6 +82,7 @@ class someProp( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py index 3717ae6bc9a0..812aea156aa4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py index dbf535def294..6c2ec31a9376 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py index cf8e85bca108..bcb200fd763e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -86,6 +87,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py index 14f783ee2fda..18a2feaf8012 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py index 408620d59677..410dd496ae34 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -86,6 +87,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py index 836c81189b34..d4b2cb288cf5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py index 657f3ebe30bb..aef042f053b7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -86,6 +87,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py index 9560bc5a5483..70c2ce8b0601 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py index 2a3b06dcd334..0896f3db9c94 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py index f9df39945ed2..cd193e90d849 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class ScaleneTriangle( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py index 9b1382f32902..777d40b64104 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -86,6 +87,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py index 44cb1815023e..91aef06addbc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -88,6 +89,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py index 1f81d0341163..3e375e3f562e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class SimpleQuadrilateral( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py index 8481ed59d6ed..2d8e71360af0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class SomeObject( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py index f9870a39623c..5325437bd127 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py index bad8f8fed86b..a36e15506995 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py index ef02720321b5..2b4b5435f600 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py index 800ee5a3baf0..93ff20769122 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py index 91bfd93fad44..6ab987f43efa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py index 5b6ab6047ec5..b82088d24f4f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py index c19aeb33a5ac..6d166baafafa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py index ddc61be69d6a..0d02cfba1edf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -87,6 +88,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py index 7949415fe153..f0241962c07e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py index 38876f70fa8b..bf1320556ac2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -112,6 +113,7 @@ class anyTypeExceptNullProp( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py index 1a0e1a55be56..fb4c32c0dc22 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py index 1e126220ef97..78a28fa763ce 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py index 0d6ad534ca6f..649555d548af 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py index e3443becb141..c5dd6cb2ca9a 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py @@ -10,14 +10,11 @@ """ -import sys import unittest import petstore_api from petstore_api.model.cat import Cat -from petstore_api.model.cat_all_of import CatAllOf from petstore_api.model.dog import Dog -from petstore_api.model.dog_all_of import DogAllOf from petstore_api.model.animal import Animal from petstore_api.schemas import StrSchema, BoolSchema, frozendict @@ -45,7 +42,7 @@ def testAnimal(self): assert isinstance(animal, Animal) assert isinstance(animal, frozendict) assert isinstance(animal, Cat) - assert isinstance(animal, CatAllOf) + assert isinstance(animal, Cat._composed_schemas['allOf'][1]) assert set(animal.keys()) == {'className', 'color'} assert animal.className == 'Cat' assert animal.color == 'black' @@ -57,7 +54,7 @@ def testAnimal(self): assert isinstance(animal, Animal) assert isinstance(animal, frozendict) assert isinstance(animal, Cat) - assert isinstance(animal, CatAllOf) + assert isinstance(animal, Cat._composed_schemas['allOf'][1]) assert set(animal.keys()) == {'className', 'color', 'declawed'} assert animal.className == 'Cat' assert animal.color == 'black' @@ -71,7 +68,7 @@ def testAnimal(self): assert isinstance(animal, Animal) assert isinstance(animal, frozendict) assert isinstance(animal, Dog) - assert isinstance(animal, DogAllOf) + assert isinstance(animal, Dog._composed_schemas['allOf'][1]) assert set(animal.keys()) == {'className', 'color'} assert animal.className == 'Dog' assert animal.color == 'black' @@ -83,7 +80,7 @@ def testAnimal(self): assert isinstance(animal, Animal) assert isinstance(animal, frozendict) assert isinstance(animal, Dog) - assert isinstance(animal, DogAllOf) + assert isinstance(animal, Dog._composed_schemas['allOf'][1]) assert set(animal.keys()) == {'className', 'color', 'breed'} assert animal.className == 'Dog' assert animal.color == 'black' diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py index c628ddfb76dc..cc62ccff3cc3 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py @@ -2,7 +2,6 @@ from collections import defaultdict from decimal import Decimal -import sys import typing from unittest.mock import patch import unittest @@ -18,7 +17,6 @@ from petstore_api.model.foo import Foo from petstore_api.model.animal import Animal from petstore_api.model.dog import Dog -from petstore_api.model.dog_all_of import DogAllOf from petstore_api.model.boolean_enum import BooleanEnum from petstore_api.model.pig import Pig from petstore_api.model.danish_pig import DanishPig @@ -32,11 +30,6 @@ NumberSchema, Schema, ValidationMetadata, - Int64Schema, - StrBase, - NumberBase, - DictBase, - ListBase, frozendict, ) @@ -105,7 +98,7 @@ def test_discriminated_dict_validate(self): frozendict(className="Dog", color="black"), validation_metadata=vm ) assert path_to_schemas == { - ("args[0]",): set([Animal, Dog, DogAllOf, frozendict]), + ("args[0]",): set([Animal, Dog, Dog._composed_schemas['allOf'][1], frozendict]), ("args[0]", "className"): set([StrSchema, AnyTypeSchema, str]), ("args[0]", "color"): set([StrSchema, AnyTypeSchema, str]), } From f499799a9228bb6fe2e7bca57985007c9e2e3a97 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 25 Apr 2022 10:26:28 -0700 Subject: [PATCH 07/10] Reverts vesion file change --- .../petstore/python-experimental/.openapi-generator/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION index 717311e32e3c..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -unset \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file From 0dcd020ae60f9e1f4b4427b1c9bb84c09936da13 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 25 Apr 2022 11:46:27 -0700 Subject: [PATCH 08/10] Improves type setting code for python-exp --- .../PythonExperimentalClientCodegen.java | 28 +++++++++++++------ .../.openapi-generator/VERSION | 2 +- .../docs/AdditionalPropertiesClass.md | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index c99d062aa04a..343637b758f5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -1269,13 +1269,24 @@ private String getTypeString(Schema p, String prefix, String suffix, List Date: Mon, 25 Apr 2022 21:13:34 -0700 Subject: [PATCH 09/10] Fixes AnyType type hint --- .../codegen/languages/PythonExperimentalClientCodegen.java | 2 +- .../docs/ObjectWithInlineCompositionProperty.md | 2 +- .../openapi3/client/petstore/python-experimental/docs/User.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 343637b758f5..13e748c5ca60 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -1262,7 +1262,7 @@ private String getTypeString(Schema p, String prefix, String suffix, List Date: Mon, 25 Apr 2022 21:22:50 -0700 Subject: [PATCH 10/10] Samples regenerated --- .../python-experimental/.openapi-generator/VERSION | 2 +- .../petstore/python-experimental/docs/FakeApi.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION index 717311e32e3c..5f68295fc196 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -unset \ No newline at end of file +6.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 808d58bbb12e..961e2a4cf30f 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -1413,7 +1413,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) # **inline_composition** -> object inline_composition() +> bool, date, datetime, dict, float, int, list, str, none_type inline_composition() testing composed schemas at inline locations @@ -1478,7 +1478,7 @@ Name | Type | Description | Notes #### Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProp** | **object** | | [optional] +**someProp** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] ### query_params @@ -1502,7 +1502,7 @@ Name | Type | Description | Notes #### Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProp** | **object** | | [optional] +**someProp** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] ### Return Types, Responses @@ -1531,11 +1531,11 @@ Name | Type | Description | Notes #### Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProp** | **object** | | [optional] +**someProp** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] -**object** +**bool, date, datetime, dict, float, int, list, str, none_type** ### Authorization