diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 25ac019fa93..ab5862d321b 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 2c8dcdb681f..f0a7b3a5cc2 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 1d9d27eb471..fdf55a2b837 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 520a4a196a3..7030c75c1a1 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 97e5b650ee7..13e748c5ca6 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 bb060d0799a..eec855c368f 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 d8c1e63ae4d..03f72a86b82 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 17a77ff9f36..8fa99842e1b 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 b2acef46f4f..af47fddb538 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 f6b927f9a77..19c6f9a6933 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 cf88f5b25d9..9e727e732d3 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 f2a9f7d35b7..00000000000 --- 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 1e0f07a3628..00000000000 --- 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 d2cb47a3c42..00000000000 --- 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 923b00a2185..00000000000 --- 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 71f36c7bc6b..c001abdb9f2 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 8dfd16400b6..00000000000 --- 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 8e151789e01..00000000000 --- 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 626f18ba6df..961e2a4cf30 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 d28a65a74d9..00000000000 --- 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 12881c0177a..00000000000 --- 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 ef98f7ce8e9..00000000000 --- 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 279ea183d9b..00000000000 --- 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 f81000f580e..00000000000 --- 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 a74c35a74b7..fbd037b732b 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 143ed732ea9..00000000000 --- 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 3ac4ed16125..00000000000 --- 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 e8bf2861915..00000000000 --- 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 1083391d7c6..58f817c0cf4 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 1e7d5354fd4..56af9d5ca2b 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 3e9e2852a16..d671e247cb8 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 8ca39701601..7ff42a0ec8c 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 611ab3daf78..e011b7055fd 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 71c91efd532..8caf1316be6 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 dde001190c7..f8e55f9d062 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 6f5e3caaacc..845c9c4327b 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 78767b2fbd6..860b0e83a94 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 7bacd80c11a..d82ce87b9f5 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 5dca29adefb..3ab153fac40 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 dfaf495bc3a..a88e6edf20d 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 0a216079896..fbe686c3d13 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 289f5210680..9e7fcd81807 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 3204f18df65..ba01a663ef8 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 b6b4f59f5b1..1c2362b929d 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 f2607c324c5..27f281927f8 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 c1a2a4fe64b..352df0a9d79 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 e441d4136c4..acd9f45f01d 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 3f7bb730be3..9c6fbd69034 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 4ea35cb0b75..204bbbe2a27 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 c0168e471e0..62c561b954c 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 73b6d14e674..674c383d599 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 de0ae7c0155..9e0d6feab28 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 5b9813bb3c2..12c0aa0f347 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 66b8ffeb503..a699b9cc249 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 23cbe2dbd24..7d3870b10ae 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 448f8397fde..6eed5a523cc 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 2cdc192effe..e14f80853be 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 27981dea7ea..3ed9a3b291e 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 f87fe3dd995..2d5f58120bf 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 02f2eb70a89..66a2e5dcd46 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 0d41fccc4f4..a9461e803a4 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 4eec66c1e23..741d34f0d6a 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 244e606a049..9a03737b99d 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 a79e75ec889..5b17fd29583 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 42fe59410ba..0a2963d69c6 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 57b6876bfe5..613545c92f9 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 0cafed89708..527154463f2 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 67c4a60a52b..0912f57656e 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 d1a00b38d45..47012f008d1 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 5ee4d68cdf3..26629273ee0 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 2eafa03b437..80ed3f149be 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 12e6be849ab..85e0c391f74 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 7806b609430..eaab273e351 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 5aa3d3cc989..d2b2c89b07b 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 c2a4a6bda69..34e71ff9242 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 13f3918c29b..b3cf5e03ed2 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 efe52c782a9..5ed7daaea2b 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 6dd9f2e7056..9d6a3d34de4 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 7b02652c679..964d6d3c968 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 e23d17f1788..adb22afe7c7 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 f4902dc1ddb..f1f38546d10 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 9ed4ab9ba7f..d6e61bb2f1a 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 aaf700010f5..04e29018fac 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 72d149623d0..5ccf44cceb0 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 ef41c29ee0f..f7e9ee93367 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 5277c2baec4..c9ba9a4dc32 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 81432c292c6..92b478614a3 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 b71b750c207..31ab2facb71 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 550938873c5..45915e64206 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 b492f2f619f..669e8c14366 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 bc325501640..107b8ad0c56 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 894a7637dcd..71519bb0ee0 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 109255ce635..ea1353a02c5 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 96d70497a9e..3f73c652b89 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 50c11fbe216..a541336f645 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 6a220ce9e3a..2e32429c76f 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 a2af10f84c4..ccb8e8364e3 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 78ef8439e74..5534b804c81 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 8207dcbacbd..32fd6d33aba 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 540b1675c26..eef932bcc17 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 6c4ee7034bc..b6955c0c38a 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 c61420c182d..1be687ece16 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 49e7156f975..db84ecedc30 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 228d6f5b0b7..f3f6bb20053 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 bc276507ae5..698d6b5eb3b 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 0c9cb8c83bf..e43e618a441 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 5b2f5c1da1d..00000000000 --- 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 a2e0278986d..9cf45a54e98 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 09a40446524..381628a1d70 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 2ac33135589..00000000000 --- 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 ae74da474bd..a79a2afefce 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 e4a0bd303f2..976072a8b31 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 5dd9f537e9b..e5a46fb124d 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 1442efce783..00000000000 --- 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 e6436681f7b..c113226e096 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 3a546a53c70..248d470db97 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 cb9d41450a8..8cb6de2269e 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 45ab7081386..4a6dca2dfcd 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 1b825daf483..81140f5a8ad 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 bf352b41016..9f5f707b20d 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 0401b8fc51f..3dcf8d990cb 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 c3925d8dfa8..5925aa1b14a 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 fe30b52eb52..00000000000 --- 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 2b0afd27365..5d6fa533e1d 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 0c900458d90..ec281c4eff6 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 e69d1bed68c..2b9c4a1fb34 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 abd34a7a1d8..c7236b7e93d 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 f90fff654dc..701dceec4bd 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 7b79cd07a05..02d99b636e1 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 b3848ee7a54..ff433100129 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 82cee4c2f86..00000000000 --- 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 05ccaa5f9b6..54083c97049 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 be3c9560958..7061dcbac01 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 5062446c15a..7d12b8cb99b 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 a294d590bb8..965f861eb53 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 e190cfad35f..82a9ae64278 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 080dcc90d27..00000000000 --- 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 cb84c0c1f7e..0d39c45d8e5 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 be2511cec92..659e0a552c0 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 806d8e8ffbf..7a8df911023 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 f7de7f9b6d1..f9b32e23273 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 1031f8302ad..6d8f255c5b0 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 b1737345c31..5729f1625ad 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 73e441074a8..f591a7ff3ee 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 b29175ff9b0..a8b0106897f 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 de7b2ae5fa2..ca6317b2457 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 1f9b1f7346e..7f67db6e231 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 68e9c325c84..00000000000 --- 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 b55bb1bb1dd..515755e788f 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 f7c5f87db59..5d92610f1ac 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 d0b73258d09..f934e35f25a 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 b79bee62ba7..401cd77dd56 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 8f32a44b6cc..3c515835a49 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 f4796d80769..d7d070c2220 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 a5a8dfe379b..178878c06d6 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 b166abba12b..00000000000 --- 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 7c9c2b54c6c..33af6e183f6 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 f5356269e7b..00000000000 --- 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 180be2c1449..68ff2efbf01 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 979d365b83c..8ed67fef179 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 261e8e22c6c..8d1c230153e 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 828b9619834..00000000000 --- 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 ea6632b190c..f963afda001 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 c4ef5aa02dd..1569585e7a8 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 0c5ad037729..1fcc02437f5 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 c1f887be25d..0ea307c5ce9 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 9066c714ee3..cecd3781163 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 007bdfb7182..95b354fbb1f 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 249dadf8ad7..a2aeca7fa84 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 f31e355362e..0008b50857e 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 fb8f6d4fd8e..9f5613e28d0 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 f762950bf5a..96d1f661df4 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 df415574612..be1f174ae81 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 abc6a7f119d..148779aa988 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 409bfc5d4f9..d19b61f8d68 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 57b8b24963f..a657bead060 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 35e659da7db..4b0017d3af4 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 4007c64efc3..00000000000 --- 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 3717ae6bc9a..812aea156aa 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 dbf535def29..6c2ec31a937 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 cf8e85bca10..bcb200fd763 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 14f783ee2fd..18a2feaf801 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 408620d5967..410dd496ae3 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 836c81189b3..d4b2cb288cf 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 657f3ebe30b..aef042f053b 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 9560bc5a548..70c2ce8b060 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 2a3b06dcd33..0896f3db9c9 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 b6dcf5a3180..cd193e90d84 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 257d28bb7c6..00000000000 --- 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 9b1382f3290..777d40b6410 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 44cb1815023..91aef06addb 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 ac25d65da03..3e375e3f562 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 ae5179cb5b1..00000000000 --- 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 8481ed59d6e..2d8e71360af 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 f9870a39623..5325437bd12 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 bad8f8fed86..a36e1550699 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 ef02720321b..2b4b5435f60 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 800ee5a3baf..93ff2076912 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 91bfd93fad4..6ab987f43ef 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 5b6ab6047ec..b82088d24f4 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 c19aeb33a5a..6d166baafaf 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 ddc61be69d6..0d02cfba1ed 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 7949415fe15..f0241962c07 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 38876f70fa8..bf1320556ac 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 1a0e1a55be5..fb4c32c0dc2 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 1e126220ef9..78a28fa763c 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 0d6ad534ca6..649555d548a 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 0872c91c809..48f6957f02c 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 fc203c2dbaa..00000000000 --- 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 98839fa6748..00000000000 --- 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 d6d7fa4cba4..00000000000 --- 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 adddcae8b75..00000000000 --- 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 3a11693e9b1..00000000000 --- 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 8ff85083ffd..00000000000 --- 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 ecf7f950429..22a984c5ea8 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 19408e88f66..00000000000 --- 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 a9a8903953b..00000000000 --- 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 06ae68186c2..00000000000 --- 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 eade978083f..00000000000 --- 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 cc3e7fe2552..00000000000 --- 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 8907e705a98..00000000000 --- 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 af618a80517..00000000000 --- 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 e3443becb14..c5dd6cb2ca9 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 c628ddfb76d..cc62ccff3cc 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]), }