diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 25ac019fa9..ab5862d321 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 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 2c8dcdb681..f0a7b3a5cc 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 1d9d27eb47..fdf55a2b83 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 class DefaultCodegen implements CodegenConfig { 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); } @@ -7429,4 +7429,7 @@ public class DefaultCodegen implements CodegenConfig { 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 520a4a196a..7030c75c1a 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 class DefaultGenerator implements Generator { } // 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 97e5b650ee..13e748c5ca 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 class PythonExperimentalClientCodegen extends AbstractPythonCodegen { 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 class PythonExperimentalClientCodegen extends AbstractPythonCodegen { } 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 class PythonExperimentalClientCodegen extends AbstractPythonCodegen { 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 { @@ -1254,20 +1262,31 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen { return prefix + modelName + fullSuffix; } } - if (isAnyTypeSchema(p)) { + if (ModelUtils.isAnyType(p)) { return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + suffix; } // Resolve $ref because ModelUtils.isXYZ methods do not automatically resolve references. if (ModelUtils.isNullable(ModelUtils.getReferencedSchema(this.openAPI, p))) { fullSuffix = ", none_type" + suffix; } - if (isFreeFormObject(p) && getAdditionalProperties(p) == null) { - return prefix + "bool, date, datetime, dict, float, int, list, str" + fullSuffix; - } else if (ModelUtils.isNumberSchema(p)) { + if (ModelUtils.isNumberSchema(p)) { return prefix + "int, float" + fullSuffix; - } else if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && getAdditionalProperties(p) != null) { - Schema inner = getAdditionalProperties(p); - return prefix + "{str: " + getTypeString(inner, "(", ")", referencedModelNames) + "}" + fullSuffix; + } else if (ModelUtils.isTypeObjectSchema(p)) { + if (p.getAdditionalProperties() != null && p.getAdditionalProperties().equals(false)) { + if (p.getProperties() == null) { + // type object with no properties and additionalProperties = false, empty dict only + return prefix + "{str: typing.Any}" + fullSuffix; + } else { + // properties only + // TODO add type hints for those properties only as values + return prefix + "{str: typing.Any}" + fullSuffix; + } + } else { + // additionalProperties exists + Schema inner = getAdditionalProperties(p); + return prefix + "{str: " + getTypeString(inner, "(", ")", referencedModelNames) + "}" + fullSuffix; + // TODO add code here to add property values too if they exist + } } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; Schema inner = ap.getItems(); @@ -1284,8 +1303,7 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen { } else { return prefix + getTypeString(inner, "[", "]", referencedModelNames) + fullSuffix; } - } - if (ModelUtils.isFileSchema(p)) { + } else if (ModelUtils.isFileSchema(p)) { return prefix + "file_type" + fullSuffix; } String baseType = getSchemaType(p); @@ -1302,7 +1320,7 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen { public String getTypeDeclaration(Schema p) { // this is used to set dataType, which defines a python tuple of classes // in Python we will wrap this in () to make it a tuple but here we - // will omit the parens so the generated documentaion will not include + // will omit the parens so the generated documentation will not include // them return getTypeString(p, "", "", null); } @@ -2237,6 +2255,13 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen { 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; } 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 bb060d0799..eec855c368 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 d8c1e63ae4..03f72a86b8 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 17a77ff9f3..8fa99842e1 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/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES index b2acef46f4..af47fddb53 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 f6b927f9a7..19c6f9a693 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/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index cf88f5b25d..9e727e732d 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **map_with_undeclared_properties_anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] **map_with_undeclared_properties_anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] **map_with_undeclared_properties_anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**empty_map** | **bool, date, datetime, dict, float, int, list, str** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] +**empty_map** | **{str: typing.Any}** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] **map_with_undeclared_properties_string** | **{str: (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] 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 f2a9f7d35b..0000000000 --- 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 1e0f07a362..0000000000 --- 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 d2cb47a3c4..0000000000 --- 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 923b00a218..0000000000 --- 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/DefaultApi.md b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md index 71f36c7bc6..c001abdb9f 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/DogAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md deleted file mode 100644 index 8dfd16400b..0000000000 --- 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 8e151789e0..0000000000 --- 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/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 626f18ba6d..961e2a4cf3 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 @@ -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.composition_in_property import CompositionInProperty 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 +1438,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 @@ -1479,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 @@ -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)}**](CompositionInProperty.md) | | +#### Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 @@ -1530,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 @@ -1882,7 +1883,6 @@ user list ```python import petstore_api from petstore_api.api import fake_api -from petstore_api.model.map_bean import MapBean 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)}**](MapBean.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/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md deleted file mode 100644 index d28a65a74d..0000000000 --- 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 12881c0177..0000000000 --- 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 ef98f7ce8e..0000000000 --- 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 279ea183d9..0000000000 --- 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 f81000f580..0000000000 --- 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/ObjectWithInlineCompositionProperty.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md index a74c35a74b..fbd037b732 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** | **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] [[Back to Model list]](../README.md#documentation-for-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 143ed732ea..0000000000 --- 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 3ac4ed1612..0000000000 --- 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 e8bf286191..0000000000 --- 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/docs/User.md b/samples/openapi3/client/petstore/python-experimental/docs/User.md index 1083391d7c..58f817c0cf 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/User.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/User.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **objectWithNoDeclaredProps** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] **objectWithNoDeclaredPropsNullable** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] **anyTypeProp** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] -**anyTypeExceptNullProp** | **object** | any type except 'null' Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. | [optional] +**anyTypeExceptNullProp** | **bool, date, datetime, dict, float, int, list, str, none_type** | any type except 'null' Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. | [optional] **anyTypePropNullable** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [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] 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 1e7d5354fd..56af9d5ca2 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 re # noqa: F401 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 3e9e2852a1..d671e247cb 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 re # noqa: F401 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,11 +64,36 @@ from petstore_api.schemas import ( # noqa: F401 _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/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 8ca3970160..7ff42a0ec8 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 re # noqa: F401 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 611ab3daf7..e011b7055f 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 re # noqa: F401 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 71c91efd53..8caf1316be 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 re # noqa: F401 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 dde001190c..f8e55f9d06 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 re # noqa: F401 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 6f5e3caaac..845c9c4327 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 re # noqa: F401 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 78767b2fbd..860b0e83a9 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 re # noqa: F401 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 7bacd80c11..d82ce87b9f 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 re # noqa: F401 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 5dca29adef..3ab153fac4 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 re # noqa: F401 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 dfaf495bc3..a88e6edf20 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 re # noqa: F401 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 0a21607989..fbe686c3d1 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 re # noqa: F401 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 289f521068..9e7fcd8180 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 re # noqa: F401 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 3204f18df6..ba01a663ef 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 re # noqa: F401 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 b6b4f59f5b..1c2362b929 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 re # noqa: F401 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 f2607c324c..27f281927f 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 re # noqa: F401 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 c1a2a4fe64..352df0a9d7 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 re # noqa: F401 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 @@ from petstore_api.schemas import ( # noqa: F401 _SchemaEnumMaker ) -from petstore_api.model.composition_in_property import CompositionInProperty - # 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 @@ -123,12 +123,53 @@ class CompositionInPropertySchema( class someProp( - _SchemaValidator( - min_length=1, - ), - StrSchema + ComposedSchema ): - pass + + @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 + # 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__( @@ -185,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 @@ -239,6 +281,7 @@ class SchemaForRequestBodyMultipartFormData( @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 @@ -316,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 @@ -370,6 +414,7 @@ class SchemaFor200ResponseBodyMultipartFormData( @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 e441d4136c..acd9f45f01 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 re # noqa: F401 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 3f7bb730be..9c6fbd6903 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 re # noqa: F401 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 4ea35cb0b7..204bbbe2a2 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 re # noqa: F401 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 c0168e471e..62c561b954 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 re # noqa: F401 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 73b6d14e67..674c383d59 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 re # noqa: F401 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 @@ from petstore_api.schemas import ( # noqa: F401 _SchemaEnumMaker ) -from petstore_api.model.map_bean import MapBean - # 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 de0ae7c015..9e0d6feab2 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 re # noqa: F401 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 5b9813bb3c..12c0aa0f34 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 re # noqa: F401 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 66b8ffeb50..a699b9cc24 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 re # noqa: F401 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 23cbe2dbd2..7d3870b10a 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 re # noqa: F401 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 448f8397fd..6eed5a523c 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 re # noqa: F401 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 2cdc192eff..e14f80853b 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 re # noqa: F401 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 27981dea7e..3ed9a3b291 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 re # noqa: F401 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 f87fe3dd99..2d5f58120b 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 re # noqa: F401 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 02f2eb70a8..66a2e5dcd4 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 re # noqa: F401 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 0d41fccc4f..a9461e803a 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 re # noqa: F401 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 4eec66c1e2..741d34f0d6 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 re # noqa: F401 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 244e606a04..9a03737b99 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 re # noqa: F401 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 a79e75ec88..5b17fd2958 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 re # noqa: F401 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 42fe59410b..0a2963d69c 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 re # noqa: F401 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 57b6876bfe..613545c92f 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 re # noqa: F401 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 0cafed8970..527154463f 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 re # noqa: F401 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 67c4a60a52..0912f57656 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 re # noqa: F401 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 d1a00b38d4..47012f008d 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 re # noqa: F401 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 5ee4d68cdf..26629273ee 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 re # noqa: F401 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 2eafa03b43..80ed3f149b 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 re # noqa: F401 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 12e6be849a..85e0c391f7 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 re # noqa: F401 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 7806b60943..eaab273e35 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 re # noqa: F401 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 5aa3d3cc98..d2b2c89b07 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 re # noqa: F401 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 c2a4a6bda6..34e71ff924 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 re # noqa: F401 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 13f3918c29..b3cf5e03ed 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 re # noqa: F401 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 efe52c782a..5ed7daaea2 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 re # noqa: F401 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 6dd9f2e705..9d6a3d34de 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 re # noqa: F401 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 7b02652c67..964d6d3c96 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 re # noqa: F401 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 e23d17f178..adb22afe7c 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 re # noqa: F401 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 f4902dc1dd..f1f38546d1 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 re # noqa: F401 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 9ed4ab9ba7..d6e61bb2f1 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 re # noqa: F401 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 aaf700010f..04e29018fa 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 re # noqa: F401 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 72d149623d..5ccf44cceb 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 ef41c29ee0..f7e9ee9336 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 5277c2baec..c9ba9a4dc3 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 81432c292c..92b478614a 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 b71b750c20..31ab2facb7 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 550938873c..45915e6420 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 b492f2f619..669e8c1436 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 bc32550164..107b8ad0c5 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 894a7637dc..71519bb0ee 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 109255ce63..ea1353a02c 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 96d70497a9..3f73c652b8 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 50c11fbe21..a541336f64 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 6a220ce9e3..2e32429c76 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 a2af10f84c..ccb8e8364e 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 78ef8439e7..5534b804c8 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 8207dcbacb..32fd6d33ab 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 540b1675c2..eef932bcc1 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 6c4ee7034b..b6955c0c38 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 c61420c182..1be687ece1 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 49e7156f97..db84ecedc3 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 228d6f5b0b..f3f6bb2005 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 bc276507ae..698d6b5eb3 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 0c9cb8c83b..e43e618a44 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 @@ -84,10 +86,32 @@ class Cat( # 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 +135,3 @@ class Cat( ) 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/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py deleted file mode 100644 index 5b2f5c1da1..0000000000 --- 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/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py index a2e0278986..9cf45a54e9 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 09a4044652..381628a1d7 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 @@ -84,10 +86,32 @@ class ChildCat( # 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 +134,4 @@ class ChildCat( **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/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 2ac3313558..0000000000 --- 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/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py index ae74da474b..a79a2afefc 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 e4a0bd303f..976072a8b3 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 5dd9f537e9..e5a46fb124 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 @@ -84,10 +86,46 @@ class ComplexQuadrilateral( # 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 +148,4 @@ class ComplexQuadrilateral( **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/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 1442efce78..0000000000 --- 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/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 e6436681f7..c113226e09 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 3a546a53c7..248d470db9 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 cb9d41450a..8cb6de2269 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 45ab708138..4a6dca2dfc 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 1b825daf48..81140f5a8a 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 bf352b4101..9f5f707b20 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 0401b8fc51..3dcf8d990c 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 c3925d8dfa..5925aa1b14 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/composition_in_property.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py deleted file mode 100644 index fe30b52eb5..0000000000 --- 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/currency.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py index 2b0afd2736..5d6fa533e1 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 0c900458d9..ec281c4eff 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 e69d1bed68..2b9c4a1fb3 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 abd34a7a1d..c7236b7e93 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 f90fff654d..701dceec4b 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 7b79cd07a0..02d99b636e 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 b3848ee7a5..ff43310012 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 @@ -84,10 +86,32 @@ class Dog( # 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 +135,3 @@ class Dog( ) 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/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py deleted file mode 100644 index 82cee4c2f8..0000000000 --- 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/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py index 05ccaa5f9b..54083c9704 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 be3c956095..7061dcbac0 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 5062446c15..7d12b8cb99 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 a294d590bb..965f861eb5 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 e190cfad35..82a9ae6427 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 @@ -84,10 +86,46 @@ class EquilateralTriangle( # 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 +148,4 @@ class EquilateralTriangle( **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/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 080dcc90d2..0000000000 --- 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/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py index cb84c0c1f7..0d39c45d8e 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 be2511cec9..659e0a552c 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 806d8e8ffb..7a8df91102 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 f7de7f9b6d..f9b32e2327 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 1031f8302a..6d8f255c5b 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 b1737345c3..5729f1625a 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 73e441074a..f591a7ff3e 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 b29175ff9b..a8b0106897 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 de7b2ae5fa..ca6317b245 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 1f9b1f7346..7f67db6e23 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/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py deleted file mode 100644 index 68e9c325c8..0000000000 --- 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/integer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py index b55bb1bb1d..515755e788 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 f7c5f87db5..5d92610f1a 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 d0b73258d0..f934e35f25 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 b79bee62ba..401cd77dd5 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 8f32a44b6c..3c515835a4 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 f4796d8076..d7d070c222 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 a5a8dfe379..178878c06d 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 @@ -84,10 +86,46 @@ class IsoscelesTriangle( # 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 +148,4 @@ class IsoscelesTriangle( **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/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 b166abba12..0000000000 --- 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/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py index 7c9c2b54c6..33af6e183f 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 @@ class Mammal( @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_bean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py deleted file mode 100644 index f5356269e7..0000000000 --- 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/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py index 180be2c144..68ff2efbf0 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 979d365b83..8ed67fef17 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 261e8e22c6..8d1c230153 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_200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py deleted file mode 100644 index 828b961983..0000000000 --- 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/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py index ea6632b190..f963afda00 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 c4ef5aa02d..1569585e7a 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 0c5ad03772..1fcc02437f 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 c1f887be25..0ea307c5ce 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 9066c714ee..cecd378116 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 007bdfb718..95b354fbb1 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 249dadf8ad..a2aeca7fa8 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 f31e355362..0008b50857 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 fb8f6d4fd8..9f5613e28d 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 f762950bf5..96d1f661df 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 df41557461..be1f174ae8 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 abc6a7f119..148779aa98 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 409bfc5d4f..d19b61f8d6 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 57b8b24963..a657bead06 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 35e659da7d..4b0017d3af 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 @@ -76,12 +77,53 @@ class ObjectWithInlineCompositionProperty( class someProp( - _SchemaValidator( - min_length=1, - ), - StrSchema + ComposedSchema ): - pass + + @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 + # 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/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 4007c64efc..0000000000 --- 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/object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py index 3717ae6bc9..812aea156a 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 dbf535def2..6c2ec31a93 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 cf8e85bca1..bcb200fd76 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 @@ class ParentPet( @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 14f783ee2f..18a2feaf80 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 408620d596..410dd496ae 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 @@ class Pig( @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 836c81189b..d4b2cb288c 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 657f3ebe30..aef042f053 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 @@ class Quadrilateral( @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 9560bc5a54..70c2ce8b06 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 2a3b06dcd3..0896f3db9c 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 b6dcf5a318..cd193e90d8 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 @@ -84,10 +86,46 @@ class ScaleneTriangle( # 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 +148,4 @@ class ScaleneTriangle( **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/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 257d28bb7c..0000000000 --- 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/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py index 9b1382f329..777d40b641 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 @@ class Shape( @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 44cb181502..91aef06add 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 @@ class ShapeOrNull( @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 ac25d65da0..3e375e3f56 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 @@ -84,10 +86,46 @@ class SimpleQuadrilateral( # 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 +149,3 @@ class SimpleQuadrilateral( ) 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/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 ae5179cb5b..0000000000 --- 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/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py index 8481ed59d6..2d8e71360a 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 f9870a3962..5325437bd1 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 bad8f8fed8..a36e155069 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 ef02720321..2b4b5435f6 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 800ee5a3ba..93ff207691 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 91bfd93fad..6ab987f43e 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 5b6ab6047e..b82088d24f 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 c19aeb33a5..6d166baafa 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 ddc61be69d..0d02cfba1e 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 @@ class Triangle( @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 7949415fe1..f0241962c0 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 38876f70fa..bf1320556a 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 User( @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 1a0e1a55be..fb4c32c0dc 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 1e126220ef..78a28fa763 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 0d6ad534ca..649555d548 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/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py index 0872c91c80..48f6957f02 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 import Boolean 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_number import ComposedNumber 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_time_with_validations import DateTimeWithValidation 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.gm_fruit import GmFruit 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_enum_with_default_value import IntegerEnumWithDe 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 import Quadrilateral 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 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 fc203c2dba..0000000000 --- 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 98839fa674..0000000000 --- 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 d6d7fa4cba..0000000000 --- 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 adddcae8b7..0000000000 --- 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 3a11693e9b..0000000000 --- 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 8ff85083ff..0000000000 --- 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 ecf7f95042..22a984c5ea 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 @@ class TestFakeApi(unittest.TestCase): """ 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 @@ class TestFakeApi(unittest.TestCase): """ 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 @@ class TestFakeApi(unittest.TestCase): """ 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 19408e88f6..0000000000 --- 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 a9a8903953..0000000000 --- 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 06ae68186c..0000000000 --- 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 eade978083..0000000000 --- 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 cc3e7fe255..0000000000 --- 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 8907e705a9..0000000000 --- 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 af618a8051..0000000000 --- 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() 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 e3443becb1..c5dd6cb2ca 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 @@ class TestAnimal(unittest.TestCase): 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 @@ class TestAnimal(unittest.TestCase): 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 @@ class TestAnimal(unittest.TestCase): 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 @@ class TestAnimal(unittest.TestCase): 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 c628ddfb76..cc62ccff3c 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.array_with_validations_in_items import ( 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 @@ from petstore_api.schemas import ( NumberSchema, Schema, ValidationMetadata, - Int64Schema, - StrBase, - NumberBase, - DictBase, - ListBase, frozendict, ) @@ -105,7 +98,7 @@ class TestValidateResults(unittest.TestCase): 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]), }