diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 25ac019fa939..ab5862d321b9 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |packageVersion|python package version.| |1.0.0| |projectName|python project name in setup.py (e.g. petstore-api).| |null| |recursionLimit|Set the recursion limit. If not set, use the system default value.| |null| +|useInlineModelResolver|use the inline model resolver, if true inline complex models will be extracted into components and $refs to them will be used| |false| |useNose|use the nose test framework| |false| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 2c8dcdb681fa..f0a7b3a5cc24 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -319,4 +319,6 @@ public interface CodegenConfig { String generatorLanguageVersion(); List getSupportedVendorExtensions(); + + boolean getUseInlineModelResolver(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 1dc1cd8713b5..0055956f21bb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4713,12 +4713,12 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) String parameterDataType = this.getParameterDataType(parameter, parameterSchema); if (parameterDataType != null) { codegenParameter.dataType = parameterDataType; + if (ModelUtils.isObjectSchema(parameterSchema)) { + codegenProperty.complexType = codegenParameter.dataType; + } } else { codegenParameter.dataType = codegenProperty.dataType; } - if (ModelUtils.isObjectSchema(parameterSchema)) { - codegenProperty.complexType = codegenParameter.dataType; - } if (ModelUtils.isSet(parameterSchema)) { imports.add(codegenProperty.baseType); } @@ -7429,4 +7429,7 @@ public String generatorLanguageVersion() { public List getSupportedVendorExtensions() { return new ArrayList<>(); } + + @Override + public boolean getUseInlineModelResolver() { return true; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 520a4a196a3b..7030c75c1a1d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -872,8 +872,10 @@ public List generate() { } // resolve inline models - InlineModelResolver inlineModelResolver = new InlineModelResolver(); - inlineModelResolver.flatten(openAPI); + if (config.getUseInlineModelResolver()) { + InlineModelResolver inlineModelResolver = new InlineModelResolver(); + inlineModelResolver.flatten(openAPI); + } configureGeneratorProperties(); configureOpenAPIInfo(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java index 97e5b650ee7a..13e748c5ca60 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java @@ -70,11 +70,13 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen { // nose is a python testing framework, we use pytest if USE_NOSE is unset public static final String USE_NOSE = "useNose"; public static final String RECURSION_LIMIT = "recursionLimit"; + public static final String USE_INLINE_MODEL_RESOLVER = "useInlineModelResolver"; protected String packageUrl; protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; - protected boolean useNose = Boolean.FALSE; + protected boolean useNose = false; + protected boolean useInlineModelResolver = false; protected Map regexModifiers; @@ -192,6 +194,8 @@ public PythonExperimentalClientCodegen() { cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework"). defaultValue(Boolean.FALSE.toString())); cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value.")); + cliOptions.add(CliOption.newBoolean(USE_INLINE_MODEL_RESOLVER, "use the inline model resolver, if true inline complex models will be extracted into components and $refs to them will be used"). + defaultValue(Boolean.FALSE.toString())); supportedLibraries.put("urllib3", "urllib3-based client"); CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: urllib3"); @@ -260,7 +264,7 @@ public void processOpts() { } modelTemplateFiles.put("model." + templateExtension, ".py"); - apiTemplateFiles.put("api." + templateExtension, ".py"); + apiTemplateFiles.put("api." + templateExtension, ".py"); modelTestTemplateFiles.put("model_test." + templateExtension, ".py"); apiTestTemplateFiles.put("api_test." + templateExtension, ".py"); modelDocTemplateFiles.put("model_doc." + templateExtension, ".md"); @@ -321,6 +325,10 @@ public void processOpts() { setUseNose((String) additionalProperties.get(USE_NOSE)); } + if (additionalProperties.containsKey(USE_INLINE_MODEL_RESOLVER)) { + setUseInlineModelResolver((String) additionalProperties.get(USE_INLINE_MODEL_RESOLVER)); + } + // check to see if setRecursionLimit is set and whether it's an integer if (additionalProperties.containsKey(RECURSION_LIMIT)) { try { @@ -1254,20 +1262,31 @@ private String getTypeString(Schema p, String prefix, String suffix, List 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 8dfd16400b64..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md deleted file mode 100644 index 8e151789e012..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangleAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# EquilateralTriangleAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**triangleType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 626f18ba6df6..961e2a4cf30f 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -1413,7 +1413,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **inline_composition** -> object inline_composition() +> bool, date, datetime, dict, float, int, list, str, none_type inline_composition() testing composed schemas at inline locations @@ -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 d28a65a74d9f..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/InlineResponseDefault.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponseDefault - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md deleted file mode 100644 index 12881c0177ab..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangleAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# IsoscelesTriangleAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**triangleType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md b/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md deleted file mode 100644 index ef98f7ce8e94..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/MapBean.md +++ /dev/null @@ -1,10 +0,0 @@ -# MapBean - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**keyword** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md b/samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md deleted file mode 100644 index 279ea183d9bb..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/Model_200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# Model_200Response - -model with an invalid class name for python, starts with a number - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **int** | | [optional] -**class** | **str** | this is a reserved python keyword | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md b/samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md deleted file mode 100644 index f81000f580e5..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/Model_Return.md +++ /dev/null @@ -1,12 +0,0 @@ -# Model_Return - -Model for testing reserved words - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**return** | **int** | this is a reserved python keyword | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionProperty.md index a74c35a74b77..fbd037b732bc 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 143ed732ea92..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithInlineCompositionPropertySomeProp.md +++ /dev/null @@ -1,9 +0,0 @@ -# ObjectWithInlineCompositionPropertySomeProp - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md deleted file mode 100644 index 3ac4ed161258..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangleAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# ScaleneTriangleAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**triangleType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md deleted file mode 100644 index e8bf2861915a..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateralAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SimpleQuadrilateralAllOf - -#### Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**quadrilateralType** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/petstore/python-experimental/docs/User.md b/samples/openapi3/client/petstore/python-experimental/docs/User.md index 1083391d7c64..58f817c0cf44 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 1e7d5354fd4b..56af9d5ca2bd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py index 3e9e2852a166..d671e247cb84 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions @@ -63,11 +64,36 @@ _SchemaEnumMaker ) -from petstore_api.model.inline_response_default import InlineResponseDefault +from petstore_api.model.foo import Foo _path = '/foo' _method = 'GET' -SchemaFor0ResponseBodyApplicationJson = InlineResponseDefault + + +class SchemaFor0ResponseBodyApplicationJson( + DictSchema +): + + @classmethod + @property + def string(cls) -> typing.Type['Foo']: + return Foo + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + string: typing.Union['Foo', Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'SchemaFor0ResponseBodyApplicationJson': + return super().__new__( + cls, + *args, + string=string, + _configuration=_configuration, + **kwargs, + ) @dataclass diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py index 8ca397016011..7ff42a0ec8c0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py index 611ab3daf784..e011b7055fd0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py index 71c91efd5329..8caf1316be60 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py index dde001190c70..f8e55f9d062d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py index 6f5e3caaaccd..845c9c4327b6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py index 78767b2fbd6b..860b0e83a945 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py index 7bacd80c11a0..d82ce87b9f5d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py index 5dca29adefbf..3ab153fac40a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py index dfaf495bc3a5..a88e6edf20de 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py index 0a216079896a..fbe686c3d13e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py index 289f5210680d..9e7fcd818071 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py index 3204f18df65c..ba01a663ef82 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py index b6b4f59f5b1f..1c2362b929db 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py index f2607c324c57..27f281927f80 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py index c1a2a4fe64b6..352df0a9d79d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_composition.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions @@ -63,8 +64,6 @@ _SchemaEnumMaker ) -from petstore_api.model.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 someProp( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -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 someProp( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py index e441d4136c4e..acd9f45f01d7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py index 3f7bb730be3a..9c6fbd690341 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_with_charset.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py index 4ea35cb0b75f..204bbbe2a27c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py index c0168e471e01..62c561b954c7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py index 73b6d14e6746..674c383d599f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_in_query.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 @@ -62,8 +63,6 @@ _SchemaEnumMaker ) -from petstore_api.model.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 de0ae7c01551..9e0d6feab28b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py index 5b9813bb3c2a..12c0aa0f3478 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py index 66b8ffeb5030..a699b9cc2490 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py index 23cbe2dbd24e..7d3870b10ae5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/ref_object_in_query.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py index 448f8397fde1..6eed5a523cc7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/response_without_schema.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py index 2cdc192effea..e14f80853bed 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py index 27981dea7eab..3ed9a3b291e9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py index f87fe3dd9955..2d5f58120bff 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py index 02f2eb70a893..66a2e5dcd469 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py index 0d41fccc4f44..a9461e803a48 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py index 4eec66c1e23f..741d34f0d6ab 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags123_api_endpoints/classname.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py index 244e606a0497..9a03737b99d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py index a79e75ec889a..5b17fd295834 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py index 42fe59410bae..0a2963d69c60 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py index 57b6876bfe50..613545c92f90 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py index 0cafed897082..527154463f21 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py index 67c4a60a52bc..0912f57656ee 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py index d1a00b38d45c..47012f008d1f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py index 5ee4d68cdf36..26629273ee0c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py index 2eafa03b4377..80ed3f149bef 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py index 12e6be849ab2..85e0c391f74a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py index 7806b609430a..eaab273e3517 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py index 5aa3d3cc9899..d2b2c89b07b3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py index c2a4a6bda698..34e71ff92420 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py index 13f3918c29b4..b3cf5e03ed2f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py index efe52c782a9f..5ed7daaea2bc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py index 6dd9f2e70561..9d6a3d34de47 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py index 7b02652c6792..964d6d3c968a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py index e23d17f17883..adb22afe7c7c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py index f4902dc1ddbb..f1f38546d102 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py index 9ed4ab9ba7f1..d6e61bb2f1a8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from petstore_api import api_client, exceptions import decimal # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py index aaf700010f51..04e29018fac7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py @@ -11,6 +11,7 @@ import sys # noqa: F401 import typing import urllib3 +import functools # noqa: F401 from urllib3._collections import HTTPHeaderDict from petstore_api import api_client, exceptions diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py index 72d149623d03..5ccf44cceb0a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py index ef41c29ee0fd..f7e9ee933676 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py index 5277c2baec46..c9ba9a4dc32a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py index 81432c292c64..92b478614a3a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py index b71b750c2076..31ab2facb71e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py index 550938873c5c..45915e64206f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/any_type_not_string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class AnyTypeNotString( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py index b492f2f619fb..669e8c14366a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py index bc3255016400..107b8ad0c56a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py index 894a7637dcdd..71519bb0ee06 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py index 109255ce635d..ea1353a02c5e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py index 96d70497a9e0..3f73c652b89a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py index 50c11fbe216e..a541336f645f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py index 6a220ce9e3a1..2e32429c76f1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py index a2af10f84c45..ccb8e8364e37 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py index 78ef8439e749..5534b804c81a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py index 8207dcbacbd3..32fd6d33aba7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py index 540b1675c26c..eef932bcc170 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py index 6c4ee7034bcb..b6955c0c38ad 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py index c61420c182df..1be687ece164 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py index 49e7156f9758..db84ecedc303 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py index 228d6f5b0b7a..f3f6bb200539 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py index bc276507ae52..698d6b5eb3bc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py index 0c9cb8c83bfb..e43e618a4419 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class Cat( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -84,10 +86,32 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + declawed = BoolSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + declawed: typing.Union[declawed, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + declawed=declawed, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ Animal, - CatAllOf, + allOf_1, ], 'oneOf': [ ], @@ -111,4 +135,3 @@ def __new__( ) from petstore_api.model.animal import Animal -from petstore_api.model.cat_all_of import CatAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py deleted file mode 100644 index 5b2f5c1da1d9..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class CatAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - declawed = BoolSchema - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - declawed: typing.Union[declawed, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'CatAllOf': - return super().__new__( - cls, - *args, - declawed=declawed, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py index a2e0278986de..9cf45a54e988 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py index 09a40446524a..381628a1d706 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class ChildCat( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -84,10 +86,32 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + name = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + name: typing.Union[name, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + name=name, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ ParentPet, - ChildCatAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +134,4 @@ def __new__( **kwargs, ) -from petstore_api.model.child_cat_all_of import ChildCatAllOf from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py deleted file mode 100644 index 2ac33135589e..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class ChildCatAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - name = StrSchema - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - name: typing.Union[name, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'ChildCatAllOf': - return super().__new__( - cls, - *args, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py index ae74da474bd4..a79a2afefce9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py index e4a0bd303f2c..976072a8b311 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py index 5dd9f537e9b3..e5a46fb124d2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class ComplexQuadrilateral( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -84,10 +86,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class quadrilateralType( + _SchemaEnumMaker( + enum_value_to_name={ + "ComplexQuadrilateral": "COMPLEXQUADRILATERAL", + } + ), + StrSchema + ): + + @classmethod + @property + def COMPLEXQUADRILATERAL(cls): + return cls("ComplexQuadrilateral") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + quadrilateralType=quadrilateralType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ QuadrilateralInterface, - ComplexQuadrilateralAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +148,4 @@ def __new__( **kwargs, ) -from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf from petstore_api.model.quadrilateral_interface import QuadrilateralInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py deleted file mode 100644 index 1442efce783d..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class ComplexQuadrilateralAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class quadrilateralType( - _SchemaEnumMaker( - enum_value_to_name={ - "ComplexQuadrilateral": "COMPLEXQUADRILATERAL", - } - ), - StrSchema - ): - - @classmethod - @property - def COMPLEXQUADRILATERAL(cls): - return cls("ComplexQuadrilateral") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'ComplexQuadrilateralAllOf': - return super().__new__( - cls, - *args, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py index e6436681f7bf..c113226e096c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class ComposedAnyOfDifferentTypesNoValidations( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py index 3a546a53c70f..248d470db972 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py index cb9d41450a8c..8cb6de2269e9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedBool( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py index 45ab7081386e..4a6dca2dfcd3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedNone( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py index 1b825daf4838..81140f5a8adf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedNumber( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py index bf352b410160..9f5f707b20d6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedObject( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py index 0401b8fc51f7..3dcf8d990cb4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -78,6 +79,7 @@ class ComposedOneOfDifferentTypes( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py index c3925d8dfa87..5925aa1b14a8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class ComposedString( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py deleted file mode 100644 index fe30b52eb528..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composition_in_property.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class CompositionInProperty( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class someProp( - _SchemaValidator( - min_length=1, - ), - StrSchema - ): - pass - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - someProp: typing.Union[someProp, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'CompositionInProperty': - return super().__new__( - cls, - *args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py index 2b0afd273650..5d6fa533e1d1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py index 0c900458d907..ec281c4eff69 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py index e69d1bed68cd..2b9c4a1fb34f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py index abd34a7a1d82..c7236b7e93d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py index f90fff654dc7..701dceec4bd0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py index 7b79cd07a059..02d99b636e1f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py index b3848ee7a542..ff4331001290 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class Dog( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -84,10 +86,32 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + breed = StrSchema + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + breed: typing.Union[breed, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + breed=breed, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ Animal, - DogAllOf, + allOf_1, ], 'oneOf': [ ], @@ -111,4 +135,3 @@ def __new__( ) from petstore_api.model.animal import Animal -from petstore_api.model.dog_all_of import DogAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py deleted file mode 100644 index 82cee4c2f86b..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class DogAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - breed = StrSchema - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - breed: typing.Union[breed, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'DogAllOf': - return super().__new__( - cls, - *args, - breed=breed, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py index 05ccaa5f9b6b..54083c970497 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py index be3c95609587..7061dcbac014 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py index 5062446c15ae..7d12b8cb99b8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py index a294d590bb80..965f861eb53f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py index e190cfad35f9..82a9ae642782 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class EquilateralTriangle( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -84,10 +86,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "EquilateralTriangle": "EQUILATERALTRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def EQUILATERALTRIANGLE(cls): + return cls("EquilateralTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + triangleType=triangleType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ TriangleInterface, - EquilateralTriangleAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +148,4 @@ def __new__( **kwargs, ) -from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py deleted file mode 100644 index 080dcc90d276..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class EquilateralTriangleAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class triangleType( - _SchemaEnumMaker( - enum_value_to_name={ - "EquilateralTriangle": "EQUILATERALTRIANGLE", - } - ), - StrSchema - ): - - @classmethod - @property - def EQUILATERALTRIANGLE(cls): - return cls("EquilateralTriangle") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - triangleType: typing.Union[triangleType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'EquilateralTriangleAllOf': - return super().__new__( - cls, - *args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py index cb84c0c1f7e7..0d39c45d8e5b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py index be2511cec921..659e0a552c04 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py index 806d8e8ffbf4..7a8df9110230 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py index f7de7f9b6d10..f9b32e23273f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py index 1031f8302ade..6d8f255c5b0a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class Fruit( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py index b1737345c31c..5729f1625ad1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class FruitReq( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py index 73e441074a88..f591a7ff3ee7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -77,6 +78,7 @@ class GmFruit( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py index b29175ff9b08..a8b0106897f0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py index de7b2ae5fa20..ca6317b2457e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py index 1f9b1f7346e9..7f67db6e2318 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py deleted file mode 100644 index 68e9c325c84d..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class InlineResponseDefault( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @classmethod - @property - def string(cls) -> typing.Type['Foo']: - return Foo - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - string: typing.Union['Foo', Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'InlineResponseDefault': - return super().__new__( - cls, - *args, - string=string, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.foo import Foo diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py index b55bb1bb1dd8..515755e788fb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py index f7c5f87db593..5d92610f1acb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py index d0b73258d090..f934e35f25aa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py index b79bee62ba7b..401cd77dd569 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py index 8f32a44b6ccb..3c515835a496 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py index f4796d80769b..d7d070c22205 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py index a5a8dfe379bb..178878c06d63 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class IsoscelesTriangle( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -84,10 +86,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "IsoscelesTriangle": "ISOSCELESTRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def ISOSCELESTRIANGLE(cls): + return cls("IsoscelesTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + triangleType=triangleType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ TriangleInterface, - IsoscelesTriangleAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +148,4 @@ def __new__( **kwargs, ) -from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py deleted file mode 100644 index b166abba12be..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class IsoscelesTriangleAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class triangleType( - _SchemaEnumMaker( - enum_value_to_name={ - "IsoscelesTriangle": "ISOSCELESTRIANGLE", - } - ), - StrSchema - ): - - @classmethod - @property - def ISOSCELESTRIANGLE(cls): - return cls("IsoscelesTriangle") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - triangleType: typing.Union[triangleType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'IsoscelesTriangleAllOf': - return super().__new__( - cls, - *args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py index 7c9c2b54c6c8..33af6e183f61 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -87,6 +88,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py deleted file mode 100644 index f5356269e7ba..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_bean.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class MapBean( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - keyword = StrSchema - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - keyword: typing.Union[keyword, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'MapBean': - return super().__new__( - cls, - *args, - keyword=keyword, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py index 180be2c14494..68ff2efbf01d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py index 979d365b83cc..8ed67fef179c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py index 261e8e22c6c9..8d1c230153e6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py deleted file mode 100644 index 828b96198341..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_200_response.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class Model_200Response( - AnyTypeSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - model with an invalid class name for python, starts with a number - """ - name = Int32Schema - _class = StrSchema - locals()['class'] = _class - del locals()['_class'] - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - name: typing.Union[name, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'Model_200Response': - return super().__new__( - cls, - *args, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py index ea6632b190c0..f963afda001f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py index c4ef5aa02dde..1569585e7a86 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py index 0c5ad0377293..1fcc02437f5d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py index c1f887be25db..0ea307c5ce9e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py index 9066c714ee39..cecd3781163f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py index 007bdfb71826..95b354fbb1f6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -78,6 +79,7 @@ class NullableShape( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py index 249dadf8ad72..a2aeca7fa845 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py index f31e355362e5..0008b50857ea 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py index fb8f6d4fd8e4..9f5613e28d04 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py index f762950bf5a8..96d1f661df40 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py index df415574612f..be1f174ae81b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py index abc6a7f119db..148779aa9885 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py index 409bfc5d4f96..d19b61f8d689 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py index 57b8b24963fc..a657bead0601 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py index 35e659da7db4..4b0017d3af4c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -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 4007c64efc31..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_inline_composition_property_some_prop.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class ObjectWithInlineCompositionPropertySomeProp( - ComposedSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @classmethod - @property - def _composed_schemas(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - - - class allOf_0( - _SchemaValidator( - min_length=1, - ), - StrSchema - ): - pass - return { - 'allOf': [ - allOf_0, - ], - 'oneOf': [ - ], - 'anyOf': [ - ], - 'not': - None - } - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'ObjectWithInlineCompositionPropertySomeProp': - return super().__new__( - cls, - *args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py index 3717ae6bc9a0..812aea156aa4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py index dbf535def294..6c2ec31a9376 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py index cf8e85bca108..bcb200fd763e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -86,6 +87,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py index 14f783ee2fda..18a2feaf8012 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py index 408620d59677..410dd496ae34 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -86,6 +87,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py index 836c81189b34..d4b2cb288cf5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py index 657f3ebe30bb..aef042f053b7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -86,6 +87,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py index 9560bc5a5483..70c2ce8b0601 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py index 2a3b06dcd334..0896f3db9c94 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py index b6dcf5a3180c..cd193e90d849 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class ScaleneTriangle( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -84,10 +86,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class triangleType( + _SchemaEnumMaker( + enum_value_to_name={ + "ScaleneTriangle": "SCALENETRIANGLE", + } + ), + StrSchema + ): + + @classmethod + @property + def SCALENETRIANGLE(cls): + return cls("ScaleneTriangle") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + triangleType: typing.Union[triangleType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + triangleType=triangleType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ TriangleInterface, - ScaleneTriangleAllOf, + allOf_1, ], 'oneOf': [ ], @@ -110,5 +148,4 @@ def __new__( **kwargs, ) -from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py deleted file mode 100644 index 257d28bb7c6b..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class ScaleneTriangleAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class triangleType( - _SchemaEnumMaker( - enum_value_to_name={ - "ScaleneTriangle": "SCALENETRIANGLE", - } - ), - StrSchema - ): - - @classmethod - @property - def SCALENETRIANGLE(cls): - return cls("ScaleneTriangle") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - triangleType: typing.Union[triangleType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'ScaleneTriangleAllOf': - return super().__new__( - cls, - *args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py index 9b1382f32902..777d40b64104 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -86,6 +87,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py index 44cb1815023e..91aef06addbc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -88,6 +89,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py index ac25d65da037..3e375e3f562e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class SimpleQuadrilateral( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run @@ -84,10 +86,46 @@ def _composed_schemas(cls): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + + + class allOf_1( + DictSchema + ): + + + class quadrilateralType( + _SchemaEnumMaker( + enum_value_to_name={ + "SimpleQuadrilateral": "SIMPLEQUADRILATERAL", + } + ), + StrSchema + ): + + @classmethod + @property + def SIMPLEQUADRILATERAL(cls): + return cls("SimpleQuadrilateral") + + + def __new__( + cls, + *args: typing.Union[dict, frozendict, ], + quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Type[Schema], + ) -> 'allOf_1': + return super().__new__( + cls, + *args, + quadrilateralType=quadrilateralType, + _configuration=_configuration, + **kwargs, + ) return { 'allOf': [ QuadrilateralInterface, - SimpleQuadrilateralAllOf, + allOf_1, ], 'oneOf': [ ], @@ -111,4 +149,3 @@ def __new__( ) from petstore_api.model.quadrilateral_interface import QuadrilateralInterface -from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py deleted file mode 100644 index ae5179cb5b14..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 -import typing # noqa: F401 - -from frozendict import frozendict # noqa: F401 - -import decimal # noqa: F401 -from datetime import date, datetime # noqa: F401 -from frozendict import frozendict # noqa: F401 - -from petstore_api.schemas import ( # noqa: F401 - AnyTypeSchema, - ComposedSchema, - DictSchema, - ListSchema, - StrSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - NumberSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BoolSchema, - BinarySchema, - NoneSchema, - none_type, - Configuration, - Unset, - unset, - ComposedBase, - ListBase, - DictBase, - NoneBase, - StrBase, - IntBase, - Int32Base, - Int64Base, - Float32Base, - Float64Base, - NumberBase, - UUIDBase, - DateBase, - DateTimeBase, - BoolBase, - BinaryBase, - Schema, - _SchemaValidator, - _SchemaTypeChecker, - _SchemaEnumMaker -) - - -class SimpleQuadrilateralAllOf( - DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class quadrilateralType( - _SchemaEnumMaker( - enum_value_to_name={ - "SimpleQuadrilateral": "SIMPLEQUADRILATERAL", - } - ), - StrSchema - ): - - @classmethod - @property - def SIMPLEQUADRILATERAL(cls): - return cls("SimpleQuadrilateral") - - - def __new__( - cls, - *args: typing.Union[dict, frozendict, ], - quadrilateralType: typing.Union[quadrilateralType, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'SimpleQuadrilateralAllOf': - return super().__new__( - cls, - *args, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py index 8481ed59d6ed..2d8e71360af0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -76,6 +77,7 @@ class SomeObject( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py index f9870a39623c..5325437bd127 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py index bad8f8fed86b..a36e15506995 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py index ef02720321b5..2b4b5435f600 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py index 800ee5a3baf0..93ff20769122 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py index 91bfd93fad44..6ab987f43efa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py index 5b6ab6047ec5..b82088d24f4f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py index c19aeb33a5ac..6d166baafafa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py index ddc61be69d6a..0d02cfba1edf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -87,6 +88,7 @@ def _discriminator(cls): @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py index 7949415fe153..f0241962c07e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py index 38876f70fa8b..bf1320556ac2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 @@ -112,6 +113,7 @@ class anyTypeExceptNullProp( @classmethod @property + @functools.cache def _composed_schemas(cls): # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py index 1a0e1a55be56..fb4c32c0dc22 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/uuid_string.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py index 1e126220ef97..78a28fa763ce 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py index 0d6ad534ca6f..649555d548af 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py @@ -12,6 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 import typing # noqa: F401 +import functools # noqa: F401 from frozendict import frozendict # noqa: F401 diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py index 0872c91c8092..48f6957f02cb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py @@ -34,14 +34,11 @@ from petstore_api.model.boolean_enum import BooleanEnum from petstore_api.model.capitalization import Capitalization from petstore_api.model.cat import Cat -from petstore_api.model.cat_all_of import CatAllOf from petstore_api.model.category import Category from petstore_api.model.child_cat import ChildCat -from petstore_api.model.child_cat_all_of import ChildCatAllOf from petstore_api.model.class_model import ClassModel from petstore_api.model.client import Client from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral -from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf from petstore_api.model.composed_any_of_different_types_no_validations import ComposedAnyOfDifferentTypesNoValidations from petstore_api.model.composed_array import ComposedArray from petstore_api.model.composed_bool import ComposedBool @@ -50,7 +47,6 @@ from petstore_api.model.composed_object import ComposedObject from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes from petstore_api.model.composed_string import ComposedString -from petstore_api.model.composition_in_property import CompositionInProperty from petstore_api.model.currency import Currency from petstore_api.model.danish_pig import DanishPig from petstore_api.model.date_time_test import DateTimeTest @@ -58,13 +54,11 @@ from petstore_api.model.date_with_validations import DateWithValidations from petstore_api.model.decimal_payload import DecimalPayload from petstore_api.model.dog import Dog -from petstore_api.model.dog_all_of import DogAllOf from petstore_api.model.drawing import Drawing from petstore_api.model.enum_arrays import EnumArrays from petstore_api.model.enum_class import EnumClass from petstore_api.model.enum_test import EnumTest from petstore_api.model.equilateral_triangle import EquilateralTriangle -from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf from petstore_api.model.file import File from petstore_api.model.file_schema_test_class import FileSchemaTestClass from petstore_api.model.foo import Foo @@ -75,7 +69,6 @@ from petstore_api.model.grandparent_animal import GrandparentAnimal from petstore_api.model.has_only_read_only import HasOnlyReadOnly from petstore_api.model.health_check_result import HealthCheckResult -from petstore_api.model.inline_response_default import InlineResponseDefault from petstore_api.model.integer_enum import IntegerEnum from petstore_api.model.integer_enum_big import IntegerEnumBig from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue @@ -83,9 +76,7 @@ from petstore_api.model.integer_max10 import IntegerMax10 from petstore_api.model.integer_min15 import IntegerMin15 from petstore_api.model.isosceles_triangle import IsoscelesTriangle -from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf from petstore_api.model.mammal import Mammal -from petstore_api.model.map_bean import MapBean from petstore_api.model.map_test import MapTest from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass from petstore_api.model.model200_response import Model200Response @@ -114,11 +105,9 @@ from petstore_api.model.quadrilateral_interface import QuadrilateralInterface from petstore_api.model.read_only_first import ReadOnlyFirst from petstore_api.model.scalene_triangle import ScaleneTriangle -from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf from petstore_api.model.shape import Shape from petstore_api.model.shape_or_null import ShapeOrNull from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral -from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf from petstore_api.model.some_object import SomeObject from petstore_api.model.special_model_name import SpecialModelName from petstore_api.model.string import String diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py deleted file mode 100644 index fc203c2dbaad..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.cat_all_of import CatAllOf - - -class TestCatAllOf(unittest.TestCase): - """CatAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_CatAllOf(self): - """Test CatAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = CatAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py deleted file mode 100644 index 98839fa67486..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.child_cat_all_of import ChildCatAllOf - - -class TestChildCatAllOf(unittest.TestCase): - """ChildCatAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ChildCatAllOf(self): - """Test ChildCatAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = ChildCatAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py deleted file mode 100644 index d6d7fa4cba4f..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.complex_quadrilateral_all_of import ComplexQuadrilateralAllOf - - -class TestComplexQuadrilateralAllOf(unittest.TestCase): - """ComplexQuadrilateralAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ComplexQuadrilateralAllOf(self): - """Test ComplexQuadrilateralAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = ComplexQuadrilateralAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composition_in_property.py b/samples/openapi3/client/petstore/python-experimental/test/test_composition_in_property.py deleted file mode 100644 index adddcae8b758..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_composition_in_property.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composition_in_property import CompositionInProperty - - -class TestCompositionInProperty(unittest.TestCase): - """CompositionInProperty unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_CompositionInProperty(self): - """Test CompositionInProperty""" - # FIXME: construct object with mandatory attributes with example values - # model = CompositionInProperty() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py deleted file mode 100644 index 3a11693e9b15..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.dog_all_of import DogAllOf - - -class TestDogAllOf(unittest.TestCase): - """DogAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_DogAllOf(self): - """Test DogAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = DogAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py deleted file mode 100644 index 8ff85083ffde..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.equilateral_triangle_all_of import EquilateralTriangleAllOf - - -class TestEquilateralTriangleAllOf(unittest.TestCase): - """EquilateralTriangleAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_EquilateralTriangleAllOf(self): - """Test EquilateralTriangleAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = EquilateralTriangleAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py index ecf7f950429d..22a984c5ea8f 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fake_api.py @@ -130,6 +130,13 @@ def test_json_form_data(self): """ pass + def test_json_with_charset(self): + """Test case for json_with_charset + + json with charset tx and rx # noqa: E501 + """ + pass + def test_mammal(self): """Test case for mammal @@ -142,6 +149,13 @@ def test_number_with_validations(self): """ pass + def test_object_in_query(self): + """Test case for object_in_query + + user list # noqa: E501 + """ + pass + def test_object_model_with_ref_props(self): """Test case for object_model_with_ref_props @@ -161,6 +175,20 @@ def test_query_parameter_collection_format(self): """ pass + def test_ref_object_in_query(self): + """Test case for ref_object_in_query + + user list # noqa: E501 + """ + pass + + def test_response_without_schema(self): + """Test case for response_without_schema + + receives a response without schema # noqa: E501 + """ + pass + def test_string(self): """Test case for string diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py deleted file mode 100644 index 19408e88f662..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.inline_response_default import InlineResponseDefault - - -class TestInlineResponseDefault(unittest.TestCase): - """InlineResponseDefault unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_InlineResponseDefault(self): - """Test InlineResponseDefault""" - # FIXME: construct object with mandatory attributes with example values - # model = InlineResponseDefault() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py deleted file mode 100644 index a9a8903953b6..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.isosceles_triangle_all_of import IsoscelesTriangleAllOf - - -class TestIsoscelesTriangleAllOf(unittest.TestCase): - """IsoscelesTriangleAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_IsoscelesTriangleAllOf(self): - """Test IsoscelesTriangleAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = IsoscelesTriangleAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py b/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py deleted file mode 100644 index 06ae68186c2d..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_map_bean.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.map_bean import MapBean - - -class TestMapBean(unittest.TestCase): - """MapBean unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_MapBean(self): - """Test MapBean""" - # FIXME: construct object with mandatory attributes with example values - # model = MapBean() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py deleted file mode 100644 index eade978083f6..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_model_200_response.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.model_200_response import Model_200Response - - -class TestModel_200Response(unittest.TestCase): - """Model_200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_Model_200Response(self): - """Test Model_200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = Model_200Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py deleted file mode 100644 index cc3e7fe25525..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_inline_composition_property_some_prop.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_inline_composition_property_some_prop import ObjectWithInlineCompositionPropertySomeProp - - -class TestObjectWithInlineCompositionPropertySomeProp(unittest.TestCase): - """ObjectWithInlineCompositionPropertySomeProp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ObjectWithInlineCompositionPropertySomeProp(self): - """Test ObjectWithInlineCompositionPropertySomeProp""" - # FIXME: construct object with mandatory attributes with example values - # model = ObjectWithInlineCompositionPropertySomeProp() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py deleted file mode 100644 index 8907e705a985..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.scalene_triangle_all_of import ScaleneTriangleAllOf - - -class TestScaleneTriangleAllOf(unittest.TestCase): - """ScaleneTriangleAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ScaleneTriangleAllOf(self): - """Test ScaleneTriangleAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = ScaleneTriangleAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py deleted file mode 100644 index af618a805178..000000000000 --- a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.simple_quadrilateral_all_of import SimpleQuadrilateralAllOf - - -class TestSimpleQuadrilateralAllOf(unittest.TestCase): - """SimpleQuadrilateralAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_SimpleQuadrilateralAllOf(self): - """Test SimpleQuadrilateralAllOf""" - # FIXME: construct object with mandatory attributes with example values - # model = SimpleQuadrilateralAllOf() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py index e3443becb141..c5dd6cb2ca9a 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_animal.py @@ -10,14 +10,11 @@ """ -import sys import unittest import petstore_api from petstore_api.model.cat import Cat -from petstore_api.model.cat_all_of import CatAllOf from petstore_api.model.dog import Dog -from petstore_api.model.dog_all_of import DogAllOf from petstore_api.model.animal import Animal from petstore_api.schemas import StrSchema, BoolSchema, frozendict @@ -45,7 +42,7 @@ def testAnimal(self): assert isinstance(animal, Animal) assert isinstance(animal, frozendict) assert isinstance(animal, Cat) - assert isinstance(animal, CatAllOf) + assert isinstance(animal, Cat._composed_schemas['allOf'][1]) assert set(animal.keys()) == {'className', 'color'} assert animal.className == 'Cat' assert animal.color == 'black' @@ -57,7 +54,7 @@ def testAnimal(self): assert isinstance(animal, Animal) assert isinstance(animal, frozendict) assert isinstance(animal, Cat) - assert isinstance(animal, CatAllOf) + assert isinstance(animal, Cat._composed_schemas['allOf'][1]) assert set(animal.keys()) == {'className', 'color', 'declawed'} assert animal.className == 'Cat' assert animal.color == 'black' @@ -71,7 +68,7 @@ def testAnimal(self): assert isinstance(animal, Animal) assert isinstance(animal, frozendict) assert isinstance(animal, Dog) - assert isinstance(animal, DogAllOf) + assert isinstance(animal, Dog._composed_schemas['allOf'][1]) assert set(animal.keys()) == {'className', 'color'} assert animal.className == 'Dog' assert animal.color == 'black' @@ -83,7 +80,7 @@ def testAnimal(self): assert isinstance(animal, Animal) assert isinstance(animal, frozendict) assert isinstance(animal, Dog) - assert isinstance(animal, DogAllOf) + assert isinstance(animal, Dog._composed_schemas['allOf'][1]) assert set(animal.keys()) == {'className', 'color', 'breed'} assert animal.className == 'Dog' assert animal.color == 'black' diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py index c628ddfb76dc..cc62ccff3cc3 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py +++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_validate.py @@ -2,7 +2,6 @@ from collections import defaultdict from decimal import Decimal -import sys import typing from unittest.mock import patch import unittest @@ -18,7 +17,6 @@ from petstore_api.model.foo import Foo from petstore_api.model.animal import Animal from petstore_api.model.dog import Dog -from petstore_api.model.dog_all_of import DogAllOf from petstore_api.model.boolean_enum import BooleanEnum from petstore_api.model.pig import Pig from petstore_api.model.danish_pig import DanishPig @@ -32,11 +30,6 @@ NumberSchema, Schema, ValidationMetadata, - Int64Schema, - StrBase, - NumberBase, - DictBase, - ListBase, frozendict, ) @@ -105,7 +98,7 @@ def test_discriminated_dict_validate(self): frozendict(className="Dog", color="black"), validation_metadata=vm ) assert path_to_schemas == { - ("args[0]",): set([Animal, Dog, DogAllOf, frozendict]), + ("args[0]",): set([Animal, Dog, Dog._composed_schemas['allOf'][1], frozendict]), ("args[0]", "className"): set([StrSchema, AnyTypeSchema, str]), ("args[0]", "color"): set([StrSchema, AnyTypeSchema, str]), }